Esempio n. 1
0
def custom_lemmas(tab_file, lang: str):
    """
        This function reads a custom tab file
        (see: http://compling.hss.ntu.edu.sg/omw/)
        containing mappings of lemmas in the given language.

        :param tab_file: Tab file as a file or file-like object
        :param str lang: abbreviation of language (i.e. *eng*, *tha*).
    """
    return wordnet.custom_lemmas(tab_file, lang)
Esempio n. 2
0
def add_omw_wikt():
    for lang, code in [("fin", "qwf"), ("cmn", "qwc")]:
        wordnet.custom_lemmas(
            open(get_data_path("wn-wikt-{}.tab".format(lang))), lang=code
        )
Esempio n. 3
0
def custom_lemmas(tab_file, lang):
	return wordnet.custom_lemmas(tab_file, lang)
Esempio n. 4
0
def fix_cmn():
    wordnet.custom_lemmas(open(get_data_path("wn-data-cmn-fixed.tab")), lang="cmn")
Esempio n. 5
0
def custom_lemmas(tab_file, lang):
    return wordnet.custom_lemmas(tab_file, lang)