MCPcopy Create free account
hub / github.com/OFA-Sys/OFA / build_dictionary

Function build_dictionary

fairseq/fairseq_cli/preprocess.py:63–71  ·  view source on GitHub ↗
(filenames, src=False, tgt=False)

Source from the content-addressed store, hash-verified

61 return dest_path("dict", lang) + ".txt"
62
63 def build_dictionary(filenames, src=False, tgt=False):
64 assert src ^ tgt
65 return task.build_dictionary(
66 filenames,
67 workers=args.workers,
68 threshold=args.thresholdsrc if src else args.thresholdtgt,
69 nwords=args.nwordssrc if src else args.nwordstgt,
70 padding_factor=args.padding_factor,
71 )
72
73 target = not args.only_source
74

Callers 1

mainFunction · 0.85

Calls 1

build_dictionaryMethod · 0.45

Tested by

no test coverage detected