Base:
method
Normalize
Microsoft.ML.Tokenizers.Normalizer.Normalize(System.String)
21 references to Normalize
Microsoft.ML.Tokenizers.Tests (21)
LlamaTests.cs (21)
398
Assert.Equal("Hello, World!", normalizer.
Normalize
("Hello, World!"));
402
Assert.Equal("Hello, World!", normalizer.
Normalize
("Hello, World!"));
406
Assert.Equal(" Hello, World!", normalizer.
Normalize
("Hello, World!"));
410
Assert.Equal("▁Hello,▁World!", normalizer.
Normalize
("Hello, World!"));
414
Assert.Equal("▁Hello,▁▁▁▁▁▁World!", normalizer.
Normalize
("Hello, World!"));
418
Assert.Equal("Hello,▁World!▁", normalizer.
Normalize
("Hello, World!"));
422
Assert.Equal("Hello,▁World!", normalizer.
Normalize
("Hello, World!"));
426
Assert.Equal("Hello,▁▁▁▁▁▁World!▁", normalizer.
Normalize
("Hello, World!"));
430
Assert.Equal("Hello, World! ", normalizer.
Normalize
("Hello, World!"));
434
Assert.Equal("<|user|>", normalizer.
Normalize
("<|user|>"));
435
Assert.Equal("<|user|><|system|><|assistant|><|endoftext|>", normalizer.
Normalize
("<|user|><|system|><|assistant|><|endoftext|>"));
436
Assert.Equal("▁Hello<|user|>", normalizer.
Normalize
("Hello<|user|>"));
437
Assert.Equal("▁Hello,▁<|user|>World", normalizer.
Normalize
("Hello, <|user|>World"));
438
Assert.Equal("<|endoftext|>▁Hello<|user|>", normalizer.
Normalize
("<|endoftext|>Hello<|user|>"));
439
Assert.Equal("", normalizer.
Normalize
(""));
442
Assert.Equal("<|user|>", normalizer.
Normalize
("<|user|>"));
443
Assert.Equal("<|user|><|system|><|assistant|><|endoftext|>", normalizer.
Normalize
("<|user|><|system|><|assistant|><|endoftext|>"));
444
Assert.Equal("Hello▁<|user|>", normalizer.
Normalize
("Hello<|user|>"));
445
Assert.Equal("Hello,▁<|user|>World▁", normalizer.
Normalize
("Hello, <|user|>World"));
446
Assert.Equal("<|endoftext|>Hello▁<|user|>", normalizer.
Normalize
("<|endoftext|>Hello<|user|>"));
447
Assert.Equal("", normalizer.
Normalize
(""));