rxn.onmt_models.training_files.OnmtPreprocessedFiles
- class rxn.onmt_models.training_files.OnmtPreprocessedFiles(preprocessed_dir)[source]
Bases:
object
Class to make it easy to get the names/paths of the OpenNMT-preprocessed files.
- Parameters
preprocessed_dir (
Union
[str
,PathLike
]) –
Methods
__init__
(preprocessed_dir)- param preprocessed_dir
Attributes
PREFIX
Absolute path to the prefix for the preprocessed files; during preprocessing, OpenNMT will append ".train.0.pt", ".valid.0.pt", ".vocab.pt", etc.
vocab_file
- rtype
Path
- property preprocess_prefix: Path
Absolute path to the prefix for the preprocessed files; during preprocessing, OpenNMT will append “.train.0.pt”, “.valid.0.pt”, “.vocab.pt”, etc.
- Return type
Path