Skip to content

Commit 838080a

Browse files
ekafCopilot
andauthored
Update nltk/corpus/reader/wordnet.py
Co-authored-by: Copilot <[email protected]>
1 parent 8e3ca55 commit 838080a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nltk/corpus/reader/wordnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,7 @@ def tag2pos(self, tag, tagset="en-ptb") -> Optional[str]:
21222122

21232123
from nltk.tag import map_tag
21242124

2125-
utag2wnpos = {self._FILEMAP[pos].upper(): pos for pos in self._FILEMAP}
2125+
utag2wnpos = {'NOUN': 'n', 'VERB': 'v', 'ADJ': 'a', 'ADV': 'r'}
21262126
return utag2wnpos.get(map_tag(tagset, "universal", tag), None)
21272127

21282128
#############################################################

0 commit comments

Comments
 (0)