valeriobasile / learningbyreading

Learning by Reading pipeline of NLP and Entity Linking tools
GNU General Public License v2.0
82 stars 24 forks source link

Babelfy API broken #22

Closed dstrohmaier closed 5 years ago

dstrohmaier commented 5 years ago

The Babelfy WSD no longer works resulting in the following error:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at BabelfyAloof.main(BabelfyAloof.java:28)

Traceback (most recent call last):
  File "src/pipeline.py", line 120, in <module>
    synsets, entities = disambiguation(tokenized, semantics)
  File "/auto/homes/ds858/lbr/src/disambiguation.py", line 22, in disambiguation
    synsets = disambiguated['synsets']
TypeError: 'NoneType' object has no attribute '__getitem__'

This might be due to a change in the BabelNet API.

valeriobasile commented 5 years ago

Thanks for the notification. The API must have changed with the new version. I chenged the babelfy module from using the Java library via subprocess to the babeply module in native Python. This also made the code and the repo cleanier. https://github.com/valeriobasile/learningbyreading/commit/8902db1182ee22aa4f4ed3f41879bc15e4dfb11f