예제 #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)
예제 #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
        )
예제 #3
0
파일: wordnet.py 프로젝트: zkan/pythainlp
def custom_lemmas(tab_file, lang):
	return wordnet.custom_lemmas(tab_file, lang)
예제 #4
0
def fix_cmn():
    wordnet.custom_lemmas(open(get_data_path("wn-data-cmn-fixed.tab")), lang="cmn")
예제 #5
0
def custom_lemmas(tab_file, lang):
    return wordnet.custom_lemmas(tab_file, lang)