From 5b7ff3ac853c2706ea10108996fd0f84116a54e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Fri, 27 Dec 2019 00:26:38 -0500 Subject: [PATCH] =?UTF-8?q?ajout=20de=20plusieurs=20graphiques=20et=20m?= =?UTF-8?q?=C3=A9triques=20dans=20le=20rapport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wn_pos_from_ud_pos.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 wn_pos_from_ud_pos.py 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