osdict_project/spider/wordpropertyconversion.py

15 lines
359 B
Python

def word_property_conversion(text):
vc = ("vi.", "vt.", "aux.")
pronc = ("det.",)
interjc = ("int.",)
abbrc = ("pref.", "symb.")
if text in vc:
return "v."
elif text in pronc:
return "pron."
elif text in interjc:
return "interj."
elif text in abbrc:
return "abbr."
return text