Class ReplaceDecoder
Replaces a string pattern from the tokens in the list.
Implements
Inherited Members
Namespace: Unity.InferenceEngine.Tokenization.Decoders
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public class ReplaceDecoder : IDecoder
Constructors
ReplaceDecoder(string, string)
Initializes a new instance of the ReplaceDecoder type.
Declaration
public ReplaceDecoder(string pattern, string content)
Parameters
| Type | Name | Description |
|---|---|---|
| string | pattern | The pattern to replace with the |
| string | content | The content replacing the |
Methods
Decode(IReadOnlyList<string>, Output<string>)
Applies modifications to the input detokenized strings.
Declaration
public void Decode(IReadOnlyList<string> tokens, Output<string> output)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<string> | tokens | The string values to modify. |
| Output<string> | output | The recipient of modified strings. |