Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The cmd line tool for the Entity Linker throws the following NPE:
Exception in thread "main" java.lang.NullPointerException
at opennlp.tools.util.Span.spansToStrings(Span.java:368)
at opennlp.addons.geoentitylinker.GeoEntityLinker.find(GeoEntityLinker.java:64)
at opennlp.tools.cmdline.entitylinker.EntityLinkerTool.run(EntityLinkerTool.java:124)
at opennlp.tools.cmdline.CLI.main(CLI.java:227)
The reason for this is that the token spans array which is passed to the entity linker implementation contains null values.
The problem seems to be in the EntityLinker tool, line 115. The array index must be ti instead of i.