Skip to content

Commit 8a1130f

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nltk/corpus/reader/wordnet.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,12 @@ def tag2pos(self, tag, tagset="en-ptb"):
21202120
Args:
21212121
tag (str): The part-of-speech tag to convert.
21222122
tagset (str): The tagset of the input tag. Defaults to "en-ptb".
2123+
Supported tagsets are those recognized by the `map_tag` function
2124+
from `nltk.tag`. Common examples include:
2125+
- "en-ptb" (Penn Treebank tagset for English)
2126+
- "universal" (Universal POS tagset)
2127+
For a complete list of supported tagsets, refer to the `map_tag`
2128+
documentation or its source code in the NLTK library.
21232129
21242130
Returns:
21252131
The corresponding WordNet POS tag ('n', 'v', 'a', 'r') or None

0 commit comments

Comments
 (0)