File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1327,7 +1327,7 @@ def _load_lang_data(self, lang):
1327
1327
self .add_omw ()
1328
1328
1329
1329
if lang not in self .langs ():
1330
- raise WordNetError ("Language is not supported." )
1330
+ raise WordNetError (f "Language { lang } is not supported." )
1331
1331
1332
1332
if self ._exomw_reader and lang not in self .omw_langs :
1333
1333
reader = self ._exomw_reader
@@ -1452,11 +1452,14 @@ def _next_token():
1452
1452
# map lemmas and parts of speech to synsets
1453
1453
self ._lemma_pos_offset_map [lemma ][pos ] = synset_offsets
1454
1454
if pos == ADJ :
1455
- # Filter adjective satellites:
1455
+ # index.adj uses only the ADJ pos, so identify ADJ_SAT using satellites set
1456
1456
satellite_offsets = [
1457
- of for of in synset_offsets if of in self .satellite_offsets
1457
+ # Keep the ordering from index.adj
1458
+ offset
1459
+ for offset in synset_offsets
1460
+ if offset in self .satellite_offsets
1458
1461
]
1459
- # Duplicate only real satellites
1462
+ # Duplicate only a (possibly empty) list of real satellites
1460
1463
self ._lemma_pos_offset_map [lemma ][ADJ_SAT ] = satellite_offsets
1461
1464
1462
1465
def _load_exception_map (self ):
You can’t perform that action at this time.
0 commit comments