Uploaded image for project: 'OpenNLP'
  1. OpenNLP
  2. OPENNLP-749

Entity Linker cmd line tools throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • Entity Linker
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            joern Jörn Kottmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: