MCPcopy Create free account
hub / github.com/tensorflow/datasets / _get_tuv_lang

Function _get_tuv_lang

tensorflow_datasets/translate/wmt.py:1046–1050  ·  view source on GitHub ↗
(tuv)

Source from the content-addressed store, hash-verified

1044 """Generates examples from TMX file."""
1045
1046 def _get_tuv_lang(tuv):
1047 for k, v in tuv.items():
1048 if k.endswith("}lang"):
1049 return v
1050 raise AssertionError("Language not found in `tuv` attributes.")
1051
1052 def _get_tuv_seg(tuv):
1053 segs = tuv.findall("seg")

Callers 1

_parse_tmxFunction · 0.85

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected