Skip to content

Commit 937fcb3

Browse files
committed
Move import to top-level
1 parent 8a1130f commit 937fcb3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nltk/corpus/reader/wordnet.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from nltk.corpus.reader import CorpusReader
4343
from nltk.internals import deprecated
4444
from nltk.probability import FreqDist
45+
from nltk.tag import map_tag
4546
from nltk.util import binary_search_file as _binary_search_file
4647

4748
######################################################################
@@ -2123,7 +2124,7 @@ def tag2pos(self, tag, tagset="en-ptb"):
21232124
Supported tagsets are those recognized by the `map_tag` function
21242125
from `nltk.tag`. Common examples include:
21252126
- "en-ptb" (Penn Treebank tagset for English)
2126-
- "universal" (Universal POS tagset)
2127+
- "en-brown" (Brown tagset)
21272128
For a complete list of supported tagsets, refer to the `map_tag`
21282129
documentation or its source code in the NLTK library.
21292130
@@ -2138,8 +2139,6 @@ def tag2pos(self, tag, tagset="en-ptb"):
21382139
[('Banks', 'NNS', 'n'), ('check', 'VBP', 'v'), ('books', 'NNS', 'n'), ('.', '.', None)]
21392140
"""
21402141

2141-
from nltk.tag import map_tag
2142-
21432142
return UTAG2WN_POS.get(map_tag(tagset, "universal", tag), None)
21442143

21452144
#############################################################

0 commit comments

Comments
 (0)