Class RegexReplaceNormalizer
Replaces a specified pattern by another string.
Implements
Inherited Members
Namespace: Unity.InferenceEngine.Tokenization.Normalizers
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public class RegexReplaceNormalizer : INormalizer
Constructors
RegexReplaceNormalizer(Regex, string)
Initializes a new instance of the RegexReplaceNormalizer type.
Declaration
public RegexReplaceNormalizer(Regex pattern, string replacement)
Parameters
| Type | Name | Description |
|---|---|---|
| Regex | pattern | The pattern to look for in the input string. |
| string | replacement | The string to replace the pattern with. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The |
Methods
Normalize(SubString)
Applies transformations to the input string before pre-tokenization.
Declaration
public SubString Normalize(SubString input)
Parameters
| Type | Name | Description |
|---|---|---|
| SubString | input | The string to transform. |
Returns
| Type | Description |
|---|---|
| SubString | The resulting string. |