Projet de fin de session
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12 lines
270 B

  1. from nltk.corpus import wordnet as wn
  2. def wn_pos_from_ud_pos(tag):
  3. if tag=='ADJ':
  4. return wn.ADJ
  5. elif tag=='NOUN':
  6. return wn.NOUN
  7. elif tag=='VERB':
  8. return wn.VERB
  9. elif tag=='ADV':
  10. return wn.ADV
  11. else:
  12. return None