MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / code_to_language

Function code_to_language

test/general/lm_eval/tasks/translation.py:241–244  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

239
240
241def code_to_language(code):
242 # key is alpha_2 or alpha_3 depending on the code length
243 language_tuple = pycountry.languages.get(**{f"alpha_{len(code)}": code})
244 return language_tuple.name

Callers 2

doc_to_textMethod · 0.85
__str__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected