edu.northwestern.at.morphadorner.corpuslinguistics.postagger.tcpretagger

## Class TCPRetagger

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.AbstractPartOfSpeechTagger
    - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.unigram.UnigramTagger
      - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.tcpretagger.TCPRetagger

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

      public class TCPRetagger
      extends UnigramTagger
      implements PartOfSpeechRetagger

  TCP text retagger.

  This retagger applies a short list of rules to improve tagging in TCP texts (ECCO, Evans, EEBO).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static PartOfSpeechTags` | `posTags` Part of speech tags.

    - ### 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
    `TCPRetagger()` Create TCP retagger.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getCanAddOrDeleteWords()` Can retagger add or delete words in the original sentence?
    `<T extends AdornedWord> java.util.List<T>` | `retagSentence(java.util.List<T> sentence)` Retag a sentence.
    `void` | `setCanAddOrDeleteWords(boolean canAddOrDeleteWords)` Can retagger add or delete words in the original sentence?
    `java.lang.String` | `toString()` Return retagger description.

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

      `tagAdornedWordList, tagWord, tagWord`

    - ### 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, setLogger, setPartOfSpeechGuesser, setPostTokenizer, setRetagger, setTransitionMatrix, tagAdornedWordSentence, tagAdornedWordSentences, tagSentence, tagSentences, usesContextRules, usesLexicalRules, usesTransitionProbabilities`

    - ### 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, usesContextRules, usesLexicalRules, usesTransitionProbabilities`

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

      `close`

- - ### Field Detail

    - #### posTags

          protected static PartOfSpeechTags posTags

      Part of speech tags.

  - ### Constructor Detail

    - #### TCPRetagger

          public TCPRetagger()

      Create TCP retagger.

  - ### Method Detail

    - #### retagSentence

          public <T extends AdornedWord> java.util.List<T> retagSentence(java.util.List<T> sentence)

      Retag a sentence.
      Specified by:
        `retagSentence` in interface `PartOfSpeechRetagger`
      Parameters:
        `sentence` - The sentence as an `AdornedWord` .
      Returns:
        The sentence with words retagged.

    - #### getCanAddOrDeleteWords

          public boolean getCanAddOrDeleteWords()

      Can retagger add or delete words in the original sentence?
      Specified by:
        `getCanAddOrDeleteWords` in interface `PartOfSpeechRetagger`
      Returns:
        true if retagger can add or delete words.

    - #### setCanAddOrDeleteWords

          public void setCanAddOrDeleteWords(boolean canAddOrDeleteWords)

      Can retagger add or delete words in the original sentence?
      Specified by:
        `setCanAddOrDeleteWords` in interface `PartOfSpeechRetagger`
      Parameters:
        `canAddOrDeleteWords` - true if retagger can add or delete words.

        Ignored here.

    - #### toString

          public java.lang.String toString()

      Return retagger description.
      Overrides:
        `toString` in class `UnigramTagger`
      Returns:
        Retagger description.