MCPcopy Create free account
hub / github.com/FLC777/GLAT / build_dictionary

Function build_dictionary

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls 1

build_dictionaryMethod · 0.45

Tested by

no test coverage detected