Skip to content

Commit

Permalink
Merge pull request #1 from francoishernandez/fix_typos_2090
Browse files Browse the repository at this point in the history
Fix some typos -- Source Features 2.0 PR
  • Loading branch information
anderleich authored Sep 9, 2021
2 parents d18392c + a736103 commit ee7de03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion onmt/inputters/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion onmt/inputters/text_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ee7de03

Please sign in to comment.