|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopennlp.tools.lang.english.HeadRules
public class HeadRules
Class for storing the English head rules associated with parsing.
| Constructor Summary | |
|---|---|
HeadRules(java.io.BufferedReader rulesReader)
Creates a new set of head rules based on the specified reader. |
|
HeadRules(java.lang.String ruleFile)
Creates a new set of head rules based on the specified head rules file. |
|
| Method Summary | |
|---|---|
Parse |
getHead(Parse[] constituents,
java.lang.String type)
Returns the head constituent for the specified constituents of the specified type. |
java.util.Set |
getPunctuationTags()
Returns the set of punctuation tags. |
void |
labelGaps(java.util.Stack stack)
Labels the constituents found in the stack with gap labels if appropiate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeadRules(java.lang.String ruleFile)
throws java.io.IOException
ruleFile - the head rules file.
java.io.IOException - if the head rules file can not be read.
public HeadRules(java.io.BufferedReader rulesReader)
throws java.io.IOException
rulesReader - the head rules reader.
java.io.IOException - if the head rules reader can not be read.| Method Detail |
|---|
public java.util.Set getPunctuationTags()
HeadRules
getPunctuationTags in interface HeadRules
public Parse getHead(Parse[] constituents,
java.lang.String type)
HeadRules
getHead in interface HeadRulesconstituents - The constituents which make up a constituent of the specified type.type - The type of a constituent which is made up of the specifed constituents.
public void labelGaps(java.util.Stack stack)
GapLabeler
labelGaps in interface GapLabelerstack - The stack of un-completed constituents.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||