Skip to content

Commit a69e418

Browse files
committed
Address review's last concerns
1 parent 0265a80 commit a69e418

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

nltk/corpus/reader/wordnet.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,13 @@ def langs(self):
13831383
return list(self.provenances.keys())
13841384

13851385
def _scan_satellites(self):
1386+
"""
1387+
Scans the adjective data file and populates self.satellite_offsets with all adjective satellite synset offsets.
1388+
1389+
This method reads the adjective data file associated with the corpus reader,
1390+
identifies synsets of type 's' (adjective satellites), and adds their offsets
1391+
to the self.satellite_offsets set. The method does not return a value.
1392+
"""
13861393
adj_data_file = self._data_file(ADJ)
13871394
satellite_offsets = set()
13881395
adj_data_file.seek(0)
@@ -1449,11 +1456,8 @@ def _next_token():
14491456
satellite_offsets = [
14501457
of for of in synset_offsets if of in self.satellite_offsets
14511458
]
1452-
if satellite_offsets:
1453-
# Duplicate only real satellites
1454-
self._lemma_pos_offset_map[lemma][
1455-
ADJ_SAT
1456-
] = satellite_offsets
1459+
# Duplicate only real satellites
1460+
self._lemma_pos_offset_map[lemma][ADJ_SAT] = satellite_offsets
14571461

14581462
def _load_exception_map(self):
14591463
# load the exception file data into memory

0 commit comments

Comments
 (0)