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

NameSample overlap exception not helpful

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.2
    • 2.0.0
    • Name Finder
    • None
    • Patch

    Description

      I got this for some very large training file.

               Computing event counts...  Exception in thread "main" java.lang.RuntimeException: name spans [27..29) person and [27..27) person are overlapped in file: null
              at opennlp.tools.namefind.NameSample.<init>(NameSample.java:79)
              at opennlp.tools.namefind.NameSample.<init>(NameSample.java:97)
              at opennlp.tools.namefind.NameSample.<init>(NameSample.java:101)
      

      With this exception it is impossible to track the error if you have a large training file.

       

      Exceptions about mismatching <START:> and <END> tags at least give a little bit of context. This patch adds the sentence parts to the exception, making it simple to grep the training file for the bad sentence.

      Attachments

        1. OPENNLP-1306.patch
          0.9 kB
          Markus Jelsma

        Activity

          People

            Unassigned Unassigned
            markus17 Markus Jelsma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: