Interface IComponentBuilder<TComponent>
Generic Interface for Hugging Face tokenizer component builders.
Namespace: Unity.InferenceEngine.Tokenization.Parsers.HuggingFace
Assembly: Unity.InferenceEngine.Tokenization.dll
Syntax
public interface IComponentBuilder<out TComponent> : IComponentBuilder
Type Parameters
| Name | Description |
|---|---|
| TComponent | The type of the component for builder produces. |
Methods
Build(JToken, HuggingFaceParser)
Builds an instance of the specified TComponent.
Declaration
TComponent Build(JToken parameters, HuggingFaceParser parser)
Parameters
| Type | Name | Description |
|---|---|---|
| JToken | parameters | JSON-serialized form of the component. |
| HuggingFaceParser | parser | A reference to the parser instance actually building the tokenizer. In case of sequences (SequenceNormalizer, SequencePostProcessor, …), it allows the implementation to parse subcomponents. |
Returns
| Type | Description |
|---|---|
| TComponent | A new instance of |