Skip to content
Open
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
3 changes: 3 additions & 0 deletions fairseq/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def add_preprocess_args(parser):
help="number of parallel workers")
group.add_argument("--dict-only", action='store_true',
help="if true, only builds a dictionary and then exits")
group.add_argument("--no-eos-append", action="store_false",
dest="append_eos", default=True,
help="Do not append EOS to the end of each document")
# fmt: on
return parser

Expand Down
2 changes: 1 addition & 1 deletion fairseq_cli/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _make_binary_dataset(

binarizer = VocabularyDatasetBinarizer(
vocab,
append_eos=True,
append_eos=args.append_eos,
)

input_file = "{}{}".format(input_prefix, ("." + lang) if lang is not None else "")
Expand Down