edu.northwestern.at.morphadorner.corpuslinguistics.postagger.trigramhybrid

## Class TrigramHybridTagger

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.AbstractPartOfSpeechTagger
    - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.trigram.TrigramTagger
      - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.trigramhybrid.TrigramHybridTagger

- All Implemented Interfaces:
    UsesLexicon, PartOfSpeechTagger, IsCloseable, UsesLogger

      public class TrigramHybridTagger
      extends TrigramTagger
      implements PartOfSpeechTagger

  Hybrid Trigram Part of Speech tagger.

  This trigram part of speech tagger assigns tags to words in a sentence assigning the most probable set of tags given the previous tag assignments. The Viterbi algorithm is used to reduce the amount of computation required to find the optimal tag assignments. The Hepple rule-based tagger is used to apply corrections to each sentence after the trigram tagger has assigned the initial set of tags.

- - ### Field Summary

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.postagger.trigram.TrigramTagger

      `beamSearchRejections, contextualProbabilities, debug, linesTagged, viterbi, wordsTagged`

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.postagger.AbstractPartOfSpeechTagger

      `contextRules, contextualSmoother, dynamicLexicon, lexicalRules, lexicalSmoother, lexicon, logger, partOfSpeechGuesser, postTokenizer, retagger, ruleCorrections, transitionMatrix`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrigramHybridTagger()` Create a trigram hybrid tagger.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `toString()` Return tagger description.
    `boolean` | `usesContextRules()` See if tagger uses contextual rules.

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.postagger.trigram.TrigramTagger

      `processWord, reportEndOfTaggingStats, setLogger, tagAdornedWordList, tagAdornedWordSentences, tagSentences, usesTransitionProbabilities`

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.postagger.AbstractPartOfSpeechTagger

      `clearRuleCorrections, createPartOfSpeechGuesser, getContextualSmoother, getDynamicLexicon, getLexicalSmoother, getLexicon, getLexicon, getLogger, getMostCommonTag, getPartOfSpeechGuesser, getPostTokenizer, getRetagger, getRuleCorrections, getTagCount, getTagsForWord, getTransitionMatrix, incrementRuleCorrections, retagWords, setContextRules, setContextualSmoother, setLexicalRules, setLexicalSmoother, setLexicon, setPartOfSpeechGuesser, setPostTokenizer, setRetagger, setTransitionMatrix, tagAdornedWordSentence, tagSentence, usesLexicalRules`

    - ### Methods inherited from class edu.northwestern.at.utils.IsCloseableObject

      `close`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface edu.northwestern.at.morphadorner.corpuslinguistics.postagger.PartOfSpeechTagger

      `clearRuleCorrections, getContextualSmoother, getLexicalSmoother, getLexicon, getLexicon, getPartOfSpeechGuesser, getPostTokenizer, getRetagger, getRuleCorrections, getTagCount, getTagsForWord, getTransitionMatrix, incrementRuleCorrections, retagWords, setContextRules, setContextualSmoother, setLexicalRules, setLexicalSmoother, setLexicon, setPartOfSpeechGuesser, setPostTokenizer, setRetagger, setTransitionMatrix, tagAdornedWordList, tagAdornedWordSentence, tagAdornedWordSentences, tagSentence, tagSentences, usesLexicalRules, usesTransitionProbabilities`

    - ### Methods inherited from interface edu.northwestern.at.utils.IsCloseable

      `close`

- - ### Constructor Detail

    - #### TrigramHybridTagger

          public TrigramHybridTagger()

      Create a trigram hybrid tagger.

  - ### Method Detail

    - #### usesContextRules

          public boolean usesContextRules()

      See if tagger uses contextual rules.
      Specified by:
        `usesContextRules` in interface `PartOfSpeechTagger`
      Overrides:
        `usesContextRules` in class `AbstractPartOfSpeechTagger`
      Returns:
        True since hybrid tagger uses contextual rules.

    - #### toString

          public java.lang.String toString()

      Return tagger description.
      Overrides:
        `toString` in class `TrigramTagger`
      Returns:
        Tagger description.