C# Class ABB.Swum.UnigramTagger

Assigns part-of-speech tags to the word nodes in an identifier. This is done based on unigram part-of-speech data.
Inheritance: Tagger
Afficher le fichier Open project: abb-iss/Swum.NET Class Usage Examples

Méthodes publiques

Méthode Description
PreTag ( ProgramElementNode node ) : void

Performs various actions that should occur prior to further tagging. This method tags any digits in the name, identifies and removes any preamble, and tags any prepositions remaining in the name.

TagDigits ( PhraseNode phrase ) : void

Tags any word nodes in the given phrase that contain digits.

TagNounPhrase ( PhraseNode phrase ) : void

Assigns part-of-speech tags to the word nodes in the given phrase, assuming it is a noun phrase.

TagNounPhrase ( PhraseNode phrase, int startIndex, int stopIndex ) : void

Assigns part-of-speech tags to the word nodes in the given phrase, assuming it is a noun phrase. Only the words between startIndex and stopIndex, inclusive, are tagged.

TagPrepostions ( PhraseNode phrase ) : void

Tags any word nodes in the given phrase that are prepositions.

TagType ( PhraseNode parsedName ) : void

Assigns part-of-speech tags to the word nodes in the given type name.

TagVariableName ( PhraseNode parsedName ) : void

Assigns part-of-speech tags to the word nodes in the given variable name.

UnigramTagger ( ) : System

Creates a new UnigramTagger object. The default values are used for necessary data sets.

UnigramTagger ( PartOfSpeechData posData ) : System

Creates a new UnigramTagger object, using the specified part-of-speech data.

UnigramTagger ( PartOfSpeechData posData, PositionalFrequencies frequencies ) : System

Creates a new UnigramTagger object, using the supplied data sets.

Method Details

PreTag() public méthode

Performs various actions that should occur prior to further tagging. This method tags any digits in the name, identifies and removes any preamble, and tags any prepositions remaining in the name.
public PreTag ( ProgramElementNode node ) : void
node ABB.Swum.Nodes.ProgramElementNode The node to be tagged.
Résultat void

TagDigits() public méthode

Tags any word nodes in the given phrase that contain digits.
public TagDigits ( PhraseNode phrase ) : void
phrase ABB.Swum.Nodes.PhraseNode The phrase to tag.
Résultat void

TagNounPhrase() public méthode

Assigns part-of-speech tags to the word nodes in the given phrase, assuming it is a noun phrase.
public TagNounPhrase ( PhraseNode phrase ) : void
phrase ABB.Swum.Nodes.PhraseNode The noun phrase to tag.
Résultat void

TagNounPhrase() public méthode

Assigns part-of-speech tags to the word nodes in the given phrase, assuming it is a noun phrase. Only the words between startIndex and stopIndex, inclusive, are tagged.
startIndex or stopIndex are not valid indices, or stopIndex is less than startIndex
public TagNounPhrase ( PhraseNode phrase, int startIndex, int stopIndex ) : void
phrase ABB.Swum.Nodes.PhraseNode The noun phrase to tag.
startIndex int The index of the first word to tag.
stopIndex int The index of the last word to tag.
Résultat void

TagPrepostions() public méthode

Tags any word nodes in the given phrase that are prepositions.
public TagPrepostions ( PhraseNode phrase ) : void
phrase ABB.Swum.Nodes.PhraseNode The phrase to tag.
Résultat void

TagType() public méthode

Assigns part-of-speech tags to the word nodes in the given type name.
public TagType ( PhraseNode parsedName ) : void
parsedName ABB.Swum.Nodes.PhraseNode The parsed type name to tag.
Résultat void

TagVariableName() public méthode

Assigns part-of-speech tags to the word nodes in the given variable name.
public TagVariableName ( PhraseNode parsedName ) : void
parsedName ABB.Swum.Nodes.PhraseNode The parsed variable name to tag.
Résultat void

UnigramTagger() public méthode

Creates a new UnigramTagger object. The default values are used for necessary data sets.
public UnigramTagger ( ) : System
Résultat System

UnigramTagger() public méthode

Creates a new UnigramTagger object, using the specified part-of-speech data.
public UnigramTagger ( PartOfSpeechData posData ) : System
posData ABB.Swum.WordData.PartOfSpeechData The part-of-speech data to use.
Résultat System

UnigramTagger() public méthode

Creates a new UnigramTagger object, using the supplied data sets.
public UnigramTagger ( PartOfSpeechData posData, PositionalFrequencies frequencies ) : System
posData ABB.Swum.WordData.PartOfSpeechData The part-of-speech data to use.
frequencies ABB.Swum.WordData.PositionalFrequencies The positional frequency data to use.
Résultat System