|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.uzh.ifi.attempto.chartparser.LexicalRule
public class LexicalRule
This class represents a lexical rule. Lexical rules can also be called "lexicon entries". A lexical rule consists of a word (in the form of a terminal category) and a pre-terminal category. In the pre-terminal category of a lexical rule is simply called its "category".
Constructor Summary | |
---|---|
LexicalRule(Annotation annotation,
java.util.List<Category> categories)
Creates a new lexical rule. |
|
LexicalRule(Annotation annotation,
Preterminal category,
Terminal word)
Creates a new lexical rule. |
|
LexicalRule(Preterminal category,
java.lang.String word)
Creates a new lexical rule. |
|
LexicalRule(Preterminal category,
Terminal word)
Creates a new lexical rule. |
|
LexicalRule(java.lang.String categoryName,
java.lang.String word)
Creates a new lexical rule. |
Method Summary | |
---|---|
LexicalRule |
deepCopy()
Creates a deep copy of this lexicon entry. |
Annotation |
getAnnotation()
Returns the annotation object of this rule. |
Preterminal |
getCategory()
Returns the category of the lexical rule. |
Terminal |
getWord()
Returns the word of the lexical rule. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LexicalRule(Annotation annotation, Preterminal category, Terminal word)
annotation
- The annotation object.category
- The category of the lexical rule.word
- The word of the lexical rule as a terminal category.public LexicalRule(Preterminal category, Terminal word)
category
- The category of the lexical rule.word
- The word of the lexical rule as a terminal category.public LexicalRule(Preterminal category, java.lang.String word)
category
- The category of the lexical rule.word
- The word of the lexical rule.public LexicalRule(java.lang.String categoryName, java.lang.String word)
categoryName
- The category name of the lexical rule.word
- The word of the lexical rule.public LexicalRule(Annotation annotation, java.util.List<Category> categories)
annotation
- The annotation object.categories
- This list must contain exactly two elements. The first one must be a
pre-terminal category representing the category of the lexical rule. The second one
must be a terminal category representing the word of the lexical rule.Method Detail |
---|
public Preterminal getCategory()
public Terminal getWord()
public Annotation getAnnotation()
public LexicalRule deepCopy()
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 |