red-rocket-dev / pyplwnxml

Parser for plwnxml (format of polish wordnet, słowosieć)
ISC License
4 stars 0 forks source link

ValueError: 3425 is not a valid RelationType - when loading Słowosieć 4.0 #1

Open rnoxy opened 6 years ago

rnoxy commented 6 years ago

`--------------------------------------------------------------------------- ValueError Traceback (most recent call last)

in () 4 5 if __name__ == "__main__": ----> 6 wordnet = PlwnxmlParser(WORDNET_LOCATION).read_wordnet() 7 for lu in wordnet.lemma("zły")[0].synsets[0].lexical_units: 8 print(lu.name) ~/miniconda3/envs/nlp/lib/python3.6/site-packages/pyplwnxml/parser.py in read_wordnet(self) 115 lus = self._process_lexical_units(lus_tags) 116 synsets = self._process_synsets(synsets_tags, lus) --> 117 self._process_relations(lexical_relations_tags, lus) 118 self._process_relations(synset_relations_tags, synsets) 119 ~/miniconda3/envs/nlp/lib/python3.6/site-packages/pyplwnxml/parser.py in _process_relations(self, relations_tags, units_dict) 102 child_id = int(relation_tag.get('child')) 103 relation_type_id = int(relation_tag.get('relation')) --> 104 relation_type = RelationType(relation_type_id) 105 units_dict[child_id].relations[relation_type].append(units_dict[parent_id]) 106 ~/miniconda3/envs/nlp/lib/python3.6/site-packages/aenum/__init__.py in __call__(cls, value, names, module, type, start) 1957 """ 1958 if names is None: # simple value lookup -> 1959 return cls.__new__(cls, value) 1960 # otherwise, functional API: we're creating a new Enum type 1961 return cls._create_(value, names, module=module, type=type, start=start) ~/miniconda3/envs/nlp/lib/python3.6/site-packages/aenum/__init__.py in __new__(cls, value) 2345 return result 2346 else: -> 2347 raise ValueError("%r is not a valid %s" % (value, cls.__name__)) 2348 temp_enum_dict['__new__'] = __new__ 2349 del __new__ ValueError: 3425 is not a valid RelationType`
red-rocket-dev commented 6 years ago

Hi, Can you provide link to Słowosiec 4.0? As far as I remember lib Was tested using Słowosieć 3.2.

rnoxy commented 6 years ago

Hi, I am afraid I cannot share that link. It is probably expired. However, you can download the WordNet from the site http://plwordnet.pwr.wroc.pl/wordnet/download The registration is very quick and easy.

Best regards


Rafal Nowak

2018-09-10 23:39 GMT+02:00 red.rocket.dev <notifications@github.com>:

> Hi,
> Can you provide link to Słowosiec 4.0? As far as I remember lib Was tested
> using Słowosieć 3.2.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/red-rocket-dev/pyplwnxml/issues/1#issuecomment-420070257>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ALeWsFjWK_9jhCUrWLIm-InP2n0cmTRDks5uZtv8gaJpZM4WH6-Q>
> .
>
emilekm2142 commented 5 years ago

The error still occurs.