diff --git a/wn_pos_from_ud_pos.py b/wn_pos_from_ud_pos.py new file mode 100644 index 0000000..e9094d9 --- /dev/null +++ b/wn_pos_from_ud_pos.py @@ -0,0 +1,12 @@ +from nltk.corpus import wordnet as wn +def wn_pos_from_ud_pos(tag): + if tag=='ADJ': + return wn.ADJ + elif tag=='NOUN': + return wn.NOUN + elif tag=='VERB': + return wn.VERB + elif tag=='ADV': + return wn.ADV + else: + return None \ No newline at end of file