MCPcopy
hub / github.com/OpenNMT/OpenNMT-py / get_transforms_cls

Function get_transforms_cls

onmt/transforms/__init__.py:18–25  ·  view source on GitHub ↗

Return valid transform class indicated in `transform_names`.

(transform_names)

Source from the content-addressed store, hash-verified

16
17
18def get_transforms_cls(transform_names):
19 """Return valid transform class indicated in `transform_names`."""
20 transforms_cls = {}
21 for name in transform_names:
22 if name not in AVAILABLE_TRANSFORMS:
23 raise ValueError("%s transform not supported!" % name)
24 transforms_cls[name] = AVAILABLE_TRANSFORMS[name]
25 return transforms_cls
26
27
28__all__ = [

Callers 15

mainFunction · 0.90
__init__Method · 0.90
__init__Method · 0.90
_init_trainFunction · 0.90
spawned_inferFunction · 0.90
warm_upMethod · 0.90
test_transform_pipeMethod · 0.90
test_prefixMethod · 0.90
test_filter_too_longMethod · 0.90

Calls

no outgoing calls

Tested by 15

test_transform_pipeMethod · 0.72
test_prefixMethod · 0.72
test_filter_too_longMethod · 0.72
test_bpeMethod · 0.72
test_sentencepieceMethod · 0.72
test_pyonmttok_bpeMethod · 0.72
test_pyonmttok_spMethod · 0.72
test_tokendropMethod · 0.72
test_tokenmaskMethod · 0.72