edu.northwestern.at.morphadorner.corpuslinguistics.postagger.allunknown

## Class AllUnknownTagger

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.AbstractPartOfSpeechTagger
    - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.allunknown.AllUnknownTagger

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

      public class AllUnknownTagger
      extends AbstractPartOfSpeechTagger
      implements PartOfSpeechTagger, CanTagOneWord

  All Unknown Part of Speech tagger.

  The all unknown part of speech tagger assigns an "unknown" type part of speech to all words.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.String` | `unknownPOS` Unknown part of speech tag.

    - ### 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
    `AllUnknownTagger()` Create all unknown tagger.
    `AllUnknownTagger(java.lang.String unknownPOS)` Create all unknown tagger.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends AdornedWord> java.util.List<T>` | `tagAdornedWordList(java.util.List<T> sentence)` Tag a sentence.
    `java.lang.String` | `tagWord(AdornedWord word)` Tag a single adorned word.
    `java.lang.String` | `tagWord(java.lang.String word)` Tag a single word.
    `java.lang.String` | `toString()` Return tagger description.

    - ### 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, tagAdornedWordSentence, tagAdornedWordSentences, tagSentence, tagSentences, usesContextRules, usesLexicalRules, usesTransitionProbabilities`

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

      `close`

- - ### Field Detail

    - #### unknownPOS

          protected static java.lang.String unknownPOS

      Unknown part of speech tag. "zz" is NUPos unknown.

  - ### Constructor Detail

    - #### AllUnknownTagger

          public AllUnknownTagger()

      Create all unknown tagger.

    - #### AllUnknownTagger

          public AllUnknownTagger(java.lang.String unknownPOS)

      Create all unknown tagger.
      Parameters:
        `unknownPOS` - Part of speech for unknown word.

  - ### Method Detail

    - #### tagAdornedWordList

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

      Tag a sentence.
      Specified by:
        `tagAdornedWordList` in interface `PartOfSpeechTagger`
      Specified by:
        `tagAdornedWordList` in class `AbstractPartOfSpeechTagger`
      Parameters:
        `sentence` - The sentence as an `AdornedWord`
      Returns:
        The input List with its words tagged with parts of speech.

    - #### tagWord

          public java.lang.String tagWord(java.lang.String word)

      Tag a single word.
      Specified by:
        `tagWord` in interface `CanTagOneWord`
      Parameters:
        `word` - The word.
      Returns:
        The part of speech for the word.

    - #### tagWord

          public java.lang.String tagWord(AdornedWord word)

      Tag a single adorned word.
      Specified by:
        `tagWord` in interface `CanTagOneWord`
      Parameters:
        `word` - The adorned word.
      Returns:
        The adorned word with the part of speech assigned.

    - #### toString

          public java.lang.String toString()

      Return tagger description.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Tagger description.