Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-2106

Handling tokens not present in the language model (and also with no suffix present in the model) causes a null pointer exception in the tagger process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3
    • 2.3
    • Sandbox-Tagger
    • None

    Description

      The HMMTagger Analysis Engine class uses the org.apache.uima.examples.tagger.Viterbi.java implementation to determine the pos tag list of a given sentence.
      In practice this implementation is partially dependant on the part of speech tagging (likewise the remaining HMMTagger classes actually).
      For exemple it makes strong assumptions on the kind of tokens it can take as input. It assumes no restriction about the token covertext values.
      It results in using some covertext probabilities for initialization or default value when the tagger processes an unknown token...

      As a consequence if the coveredText used for setting the default value is not present in the training model an error occurs. Roughly speaking, the process looks first for probability associated to the current token coverText, if the coverText is not present in the model, it looks in the model for the probability of its longest suffix, and finally if it does not found a match, the process assigns to the unknown coverText the probability of the arbitrary coverText : "("
      The problem is that if the probability of this coverText is not available in the model, the probability of the unknown token is not defined and a null pointer exception occurs latter when the variable is called.

      Why the probability of the "(" text would not be available in the model ? In a large training corpus if we consider all the tokens, there is little chance not to find at least one occurrence of "(".
      Nevertheless if we use the HMM training AE to build a model for predicting noun gender and number, or verb tense and person, or "being a part of" named entity... these tokens won t have the "(" coverText... and consequently an error will occurs when the tagging will be performed.

      A patch has been proposed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nicolas.hernandez Nicolas Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified