|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.lang.AbstractWordFeatures
public abstract class AbstractWordFeatures
Provides a default abstract implementation of the WordFeatures
interface.
Field Summary | |
---|---|
protected static Symbol |
unknownWordSym
The unique symbol to represent unknown words. |
Constructor Summary | |
---|---|
protected |
AbstractWordFeatures()
Default constructor, to be called by subclasses (usually implicitly). |
Method Summary | |
---|---|
abstract Symbol |
defaultFeatureVector()
The symbol that represents the case where none of the features fires for a particular word. |
Symbol |
features(Symbol word,
boolean firstWord)
Returns a symbol representing the orthographic and/or morphological features of the specified word. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Symbol unknownWordSym
Symbol.add("+unknown+")
;
if this maps to an actual word in a particular language or Treebank,
this data member should be reassigned in a subclass.
Constructor Detail |
---|
protected AbstractWordFeatures()
Method Detail |
---|
public Symbol features(Symbol word, boolean firstWord)
features
in interface WordFeatures
word
- the word whose features are to be computedfirstWord
- whether word
is the first word in the
sentence (useful when computing capitalization features for certain
languages, such as English)
word
unknownWordSym
public abstract Symbol defaultFeatureVector()
defaultFeatureVector
in interface WordFeatures
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |