MCPcopy Index your code
hub / github.com/clips/pattern / _multilingual

Function _multilingual

pattern/text/__init__.py:1796–1802  ·  view source on GitHub ↗

Returns the value from the function with the given name in the given language module. By default, language="en".

(function, *args, **kwargs)

Source from the content-addressed store, hash-verified

1794
1795_modules = {}
1796def _multilingual(function, *args, **kwargs):
1797 """ Returns the value from the function with the given name in the given language module.
1798 By default, language="en".
1799 """
1800 language = kwargs.pop("language", "en")
1801 module = _modules.setdefault(language, __import__(language, globals(), {}, [], -1))
1802 return getattr(module, function)(*args, **kwargs)
1803
1804def tokenize(*args, **kwargs):
1805 return _multilingual("tokenize", *args, **kwargs)

Callers 11

tokenizeFunction · 0.85
parseFunction · 0.85
parsetreeFunction · 0.85
splitFunction · 0.85
tagFunction · 0.85
sentimentFunction · 0.85
singularizeFunction · 0.85
pluralizeFunction · 0.85
conjugateFunction · 0.85
predicativeFunction · 0.85
suggestFunction · 0.85

Calls 2

popMethod · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…