Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos -- Source Features 2.0 PR #1

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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