|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.ling.WordLemmaTagFactory
public class WordLemmaTagFactory
/**
A WordLemmaTagFactory acts as a factory for creating
objects of class WordLemmaTag.
| Field Summary | |
|---|---|
static int |
LEMMA_LABEL
|
static int |
TAG_LABEL
|
| Constructor Summary | |
|---|---|
WordLemmaTagFactory()
Create a new WordLemmaTagFactory. |
|
WordLemmaTagFactory(char divider)
Create a new WordLemmaTagFactory. |
|
| Method Summary | |
|---|---|
Label |
newLabel(Label oldLabel)
Create a new WordLemmaTag Label, where the label is
formed from the Label object passed in. |
Label |
newLabel(java.lang.String labelStr)
Make a new label with this String as the value (word). |
Label |
newLabel(java.lang.String labelStr,
int options)
Make a new label with this String as a value component. |
Label |
newLabelFromString(java.lang.String labelStr)
Create a new word, where the label is formed from the String passed in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEMMA_LABEL
public static final int TAG_LABEL
| Constructor Detail |
|---|
public WordLemmaTagFactory()
WordLemmaTagFactory.
The divider will be taken as '/'.
public WordLemmaTagFactory(char divider)
WordLemmaTagFactory.
divider - This character will be used in calls to the one
argument version of newLabel(), to divide
word from lemma and tag.| Method Detail |
|---|
public Label newLabel(java.lang.String labelStr)
String as the value (word).
Any other fields of the label would normally be null.
newLabel in interface LabelFactorylabelStr - The String that will be used for value
null)
public Label newLabel(java.lang.String labelStr,
int options)
String as a value component.
Any other fields of the label would normally be null.
newLabel in interface LabelFactorylabelStr - The String that will be used for valueoptions - what to make (use labelStr as word, lemma or tag)
null)public Label newLabelFromString(java.lang.String labelStr)
String passed in. The String is divided according
to the divider character. We assume that we can always just
divide on the rightmost divider character, rather than trying to
parse up escape sequences. If the divider character isn't found
in the word, then the whole string becomes the word, and lemma and tag
are null.
We assume that if only one divider character is found, word and tag are presents in
the String, and lemma will be computed.
newLabelFromString in interface LabelFactorylabelStr - The word that will go into the Word
public Label newLabel(Label oldLabel)
WordLemmaTag Label, where the label is
formed from the Label object passed in. Depending on what fields
each label has, other things will be null.
newLabel in interface LabelFactoryoldLabel - The Label that the new label is being created from
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||