OpenNMTTokenizer
- class opennmt.tokenizers.OpenNMTTokenizer(**kwargs)[source]
Tokenizer based on the OpenNMT Tokenizer: https://github.com/OpenNMT/Tokenizer.
Inherits from:
opennmt.tokenizers.Tokenizer
- __init__(**kwargs)[source]
Initializes the tokenizer.
- Parameters
**kwargs – Tokenization options, see https://github.com/OpenNMT/Tokenizer/blob/master/docs/options.md.
- property config
The tokenization configuration.
- property opennmt_tokenizer
The
pyonmttok.Tokenizer
instance.