|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.classify.Classifier
LBJ2.nlp.Capitalization
public class Capitalization
This class implements a classifier that takes a Word as input and
generates Boolean features representing the capitalizations of the words
in a [-2, +2] window around the input word. The generated features
consist of the capitalization (as read from Word.capitalized) of
the input word as well as the capitalizations of the two words before the
input word in the sentence and the capitalizations of the two words after
the input word in the sentence. If any of those words do not exist, the
corresponding feature isn't generated.
This class's implementation was automatically generated by the LBJ compiler.
| Field Summary | |
|---|---|
private static java.lang.ThreadLocal |
cache
|
private static java.lang.ThreadLocal |
exampleCache
|
| Fields inherited from class LBJ2.classify.Classifier |
|---|
containingPackage, name |
| Constructor Summary | |
|---|---|
Capitalization()
|
|
| Method Summary | |
|---|---|
java.lang.String[] |
allowableValues()
Returns the array of allowable values that a feature returned by this classifier may take. |
FeatureVector |
classify(java.lang.Object __example)
This method makes one or more decisions about a single object, returning those decisions as Features in a vector. |
FeatureVector[] |
classify(java.lang.Object[] examples)
Use this method to make a batch of classification decisions about several objects. |
static void |
clearCache()
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getInputType()
Returns a string describing the input type of this classifier. |
java.lang.String |
getOutputType()
Returns a string describing the output feature type of this classifier. |
int |
hashCode()
|
| Methods inherited from class LBJ2.classify.Classifier |
|---|
binaryRead, binaryRead, binaryRead, binaryRead, binaryWrite, binaryWrite, clone, discreteValue, discreteValueArray, getCompositeChildren, realValue, realValueArray, test, toString, valueIndexOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static java.lang.ThreadLocal cache
private static java.lang.ThreadLocal exampleCache
| Constructor Detail |
|---|
public Capitalization()
| Method Detail |
|---|
public static void clearCache()
public java.lang.String getInputType()
Classifier"java.lang.Object"This method should be overridden by derived classes.
getInputType in class Classifierpublic java.lang.String getOutputType()
Classifierdiscrete or
real) and square brackets or a percent sign if the
classifier returns an array or is a generator respectively, or simply
mixed%. In the case that the basic type is
discrete, the curly braces containing a list of allowable
values should be omitted, as this list is provided by the
allowableValues() method. The default return value of this
method is: "discrete"This method should be overridden by derived classes.
getOutputType in class Classifierpublic java.lang.String[] allowableValues()
Classifier
allowableValues in class Classifierpublic FeatureVector classify(java.lang.Object __example)
ClassifierFeatures in a vector.
classify in class Classifier__example - The object to make decisions about.
Features about the input object.public FeatureVector[] classify(java.lang.Object[] examples)
Classifierclassify(Object) repeatedly) and should be
overridden if there is a more efficient implementation.
classify in class Classifierexamples - The objects to make decisions about.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||