From a736103400276ce5f8cbdb84c3bc15c218b7a74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Hernandez?= Date: Thu, 9 Sep 2021 09:04:36 +0000 Subject: [PATCH] fix some typos --- docs/source/FAQ.md | 2 +- onmt/inputters/corpus.py | 2 +- onmt/inputters/text_dataset.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/FAQ.md b/docs/source/FAQ.md index 3e73ec78dc..b194de3bb9 100644 --- a/docs/source/FAQ.md +++ b/docs/source/FAQ.md @@ -542,7 +542,7 @@ During inference you can pass features by using the `--src_feats` argument. `src python translate.py -model model_step_10.pt -src ../data.txt.tok -output ../data.out --src_feats "{'feat_0': '../data.txt.feats0', 'feat_1': '../data.txt.feats1'}" ``` -When using the Transformer arquitechture make sure the following options are appropiately set: +When using the Transformer architechture make sure the following options are appropriately set: - `src_word_vec_size` and `tgt_word_vec_size` or `word_vec_size` - `feat_merge`: how to handle features vecs diff --git a/onmt/inputters/corpus.py b/onmt/inputters/corpus.py index cc903d3154..87da65139b 100644 --- a/onmt/inputters/corpus.py +++ b/onmt/inputters/corpus.py @@ -74,7 +74,7 @@ def _process(item, is_train): maybe_example['src'] = {"src": ' '.join(maybe_example['src'])} - # Make features part of src as in MultiTextField + # Make features part of src as in TextMultiField # {'src': {'src': ..., 'feat1': ...., 'feat2': ....}} if 'src_feats' in maybe_example: for feat_name, feat_value in maybe_example['src_feats'].items(): diff --git a/onmt/inputters/text_dataset.py b/onmt/inputters/text_dataset.py index 46df8c91c3..a55d2593b2 100644 --- a/onmt/inputters/text_dataset.py +++ b/onmt/inputters/text_dataset.py @@ -18,7 +18,7 @@ def read(self, sequences, side, features={}): side (str): Prefix used in return dict. Usually ``"src"`` or ``"tgt"``. features: (Dict[str or Iterable[str]]): - dictionary mapping feature names with th path to feature + dictionary mapping feature names with the path to feature file or iterable of the actual feature data. Yields: