|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.IsCloseableObject
edu.northwestern.at.utils.corpuslinguistics.postagger.AbstractPartOfSpeechTagger
edu.northwestern.at.utils.corpuslinguistics.postagger.simple.SimpleTagger
public class SimpleTagger
Simple Part of Speech tagger.
The simple part of speech tagger assigns a "noun" type part of speech to all words, except those that appear to be numbers. Numbers are assigned a "number" part of speech. Words starting with a capital letter can be assigned a separate "proper name" part of speech.
This simple tagger is useful as a backup for a more sophisticated tagger when unknown words are encountered.
| Field Summary | |
|---|---|
protected static java.lang.String |
namePOS
Proper name part of speech tag. |
protected static java.lang.String |
nounPOS
Noun part of speech tag. |
protected static java.lang.String |
numberPOS
Number part of speech tag. |
| Fields inherited from class edu.northwestern.at.utils.corpuslinguistics.postagger.AbstractPartOfSpeechTagger |
|---|
contextRules, contextualSmoother, dynamicLexicon, lexicalRules, lexicalSmoother, lexicon, logger, partOfSpeechGuesser, postTokenizer, retagger, ruleCorrections, transitionMatrix |
| Constructor Summary | |
|---|---|
SimpleTagger()
Create a simple tagger. |
|
SimpleTagger(java.lang.String nounPOS,
java.lang.String namePOS,
java.lang.String numberPOS)
Create a simple tagger. |
|
| Method Summary | ||
|---|---|---|
|
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.utils.corpuslinguistics.postagger.AbstractPartOfSpeechTagger |
|---|
clearRuleCorrections, createPartOfSpeechGuesser, getDynamicLexicon, getLexicon, getLexicon, getLogger, getMostCommonTag, getPartOfSpeechGuesser, getRetagger, getRuleCorrections, getTagCount, getTagsForWord, getTransitionMatrix, incrementRuleCorrections, retagWords, setContextRules, setLexicalRules, setLexicon, setLogger, setPartOfSpeechGuesser, 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.utils.corpuslinguistics.postagger.PartOfSpeechTagger |
|---|
clearRuleCorrections, getLexicon, getLexicon, getPartOfSpeechGuesser, getRetagger, getRuleCorrections, getTagCount, getTagsForWord, getTransitionMatrix, incrementRuleCorrections, retagWords, setContextRules, setLexicalRules, setLexicon, setPartOfSpeechGuesser, setRetagger, setTransitionMatrix, tagAdornedWordSentence, tagAdornedWordSentences, tagSentence, tagSentences, usesContextRules, usesLexicalRules, usesTransitionProbabilities |
| Methods inherited from interface edu.northwestern.at.utils.IsCloseable |
|---|
close |
| Field Detail |
|---|
protected static java.lang.String nounPOS
protected static java.lang.String namePOS
protected static java.lang.String numberPOS
| Constructor Detail |
|---|
public SimpleTagger()
public SimpleTagger(java.lang.String nounPOS,
java.lang.String namePOS,
java.lang.String numberPOS)
nounPOS - Part of speech for a noun.namePOS - Part of speech for a proper name.numberPOS - Part of speech tag for a number.| Method Detail |
|---|
public <T extends AdornedWord> java.util.List<T> tagAdornedWordList(java.util.List<T> sentence)
tagAdornedWordList in interface PartOfSpeechTaggertagAdornedWordList in class AbstractPartOfSpeechTaggersentence - The sentence as an AdornedWord
public java.lang.String tagWord(java.lang.String word)
tagWord in interface CanTagOneWordword - The word.
public java.lang.String tagWord(AdornedWord word)
tagWord in interface CanTagOneWordword - The adorned word.
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||