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

BestSequence method in BeamSearch can cause NullPointerException if it can not find a valid sequence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • tools-1.5.2-incubating
    • None
    • POS Tagger
    • None

    Description

      I am using the standard sequence validator of POS Tagger with a TagDictionary. Sometimes there are no outcome that matches with the tags in the dictionary. That is causing a NullPointerException in bestSequence method.
      I think we should add an extra validation: if the heap 'next' still empty after advancing all valid sequences (line 159) we should let it advance invalid sequences. It would make the POS Tagger more robust.

      Attachments

        Issue Links

          Activity

            People

              colen William Colen
              colen William Colen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: