Skip to content

Commit

Permalink
Rewind Wordnet data file after each lookup (#2868)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaf committed Nov 4, 2021
1 parent bf9813d commit ec1d49d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nltk/corpus/reader/wordnet.py
Expand Up @@ -1423,6 +1423,7 @@ def synset_from_pos_and_offset(self, pos, offset):
raise WordNetError(
f"No WordNet synset found for pos={pos} at offset={offset}."
)
data_file.seek(0)
return synset

@deprecated("Use public method synset_from_pos_and_offset() instead")
Expand Down

0 comments on commit ec1d49d

Please sign in to comment.