edu.northwestern.at.morphadorner.corpuslinguistics.postagger.guesser

## Class DefaultPartOfSpeechGuesser

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.guesser.AbstractPartOfSpeechGuesser
    - - edu.northwestern.at.morphadorner.corpuslinguistics.postagger.guesser.DefaultPartOfSpeechGuesser

- All Implemented Interfaces:
    PartOfSpeechGuesser, UsesLogger

      public class DefaultPartOfSpeechGuesser
      extends AbstractPartOfSpeechGuesser
      implements PartOfSpeechGuesser

  Default part of speech guesser.

  This default guesser returns a noun, number or punctuation tag. The lexicon provides the part of speech tags for these items.

- - ### Field Summary

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

      `abbreviations, auxiliarySpellingStandardizer, auxiliaryWordLists, cachedLexicons, cachedWords, checkPossessives, debug, logger, names, spellingStandardizer, suffixLexicon, tryStandardSpellings, wordLexicon`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultPartOfSpeechGuesser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,MutableInteger>` | `guessPartsOfSpeech(java.util.List<java.lang.String> sentence, int wordIndex)` Guesses part of speech for a word in a sentence.
    `java.util.Map<java.lang.String,MutableInteger>` | `guessPartsOfSpeech(java.lang.String theWord)` Guesses candidate parts of speech for a word.

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

      `addAuxiliaryWordList, addCachedWord, checkAbbreviation, checkAllUpperCase, checkAuxiliaryWordLists, checkCachedWord, checkCurrency, checkHyphenatedWord, checkName, checkNumber, checkPossessiveNoun, checkPunctuation, checkRomanNumeral, checkStandardSpellings, checkSuffixes, checkSuffixes, checkSymbol, clonePosTagMap, getAuxiliaryWordLists, getCachedLexiconForWord, getLogger, getNoun, getSpellingStandardizer, getStandardizedSpellings, getSuffixLexicon, getWordLexicon, guessPartsOfSpeech, posTagsToMap, posTagToMap, removeCompoundTags, removeProperNounTags, setAbbreviations, setCheckPossessives, setLogger, setSpellingStandardizer, setSuffixLexicon, setTryStandardSpellings, setWordLexicon`

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

      `close`

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

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

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

      `addAuxiliaryWordList, getAuxiliaryWordLists, getCachedLexiconForWord, getSpellingStandardizer, getSuffixLexicon, getWordLexicon, guessPartsOfSpeech, setAbbreviations, setCheckPossessives, setSpellingStandardizer, setSuffixLexicon, setTryStandardSpellings, setWordLexicon`

- - ### Constructor Detail

    - #### DefaultPartOfSpeechGuesser

          public DefaultPartOfSpeechGuesser()

  - ### Method Detail

    - #### guessPartsOfSpeech

          public java.util.Map<java.lang.String,MutableInteger> guessPartsOfSpeech(java.lang.String theWord)

      Guesses candidate parts of speech for a word.
      Specified by:
        `guessPartsOfSpeech` in interface `PartOfSpeechGuesser`
      Specified by:
        `guessPartsOfSpeech` in class `AbstractPartOfSpeechGuesser`
      Parameters:
        `theWord` - The word.
      Returns:
        Guessed parts of speech.

    - #### guessPartsOfSpeech

          public java.util.Map<java.lang.String,MutableInteger> guessPartsOfSpeech(java.util.List<java.lang.String> sentence,
                                                                          int wordIndex)

      Guesses part of speech for a word in a sentence.
      Specified by:
        `guessPartsOfSpeech` in interface `PartOfSpeechGuesser`
      Parameters:
        `sentence` - Sentence as a list of words.
        `wordIndex` - The word index in the sentence.
      Returns:
        Guessed parts of speech.