|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopennlp.tools.parser.lang.en.HeadRules
public class HeadRules
Class for storing the English head rules associated with parsing.
| Constructor Summary | |
|---|---|
HeadRules(java.io.Reader rulesReader)
Creates a new set of head rules based on the specified reader. |
|
HeadRules(java.lang.String ruleFile)
Deprecated. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
Parse |
getHead(Parse[] constituents,
java.lang.String type)
Returns the head constituent for the specified constituents of the specified type. |
java.util.Set<java.lang.String> |
getPunctuationTags()
Returns the set of punctuation tags. |
void |
labelGaps(java.util.Stack<Constituent> stack)
Labels the constituents found in the stack with gap labels if appropriate. |
void |
serialize(java.io.Writer writer)
Writes the head rules to the writer in a format suitable for loading the head rules again with the constructor. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
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.Reader 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<java.lang.String> 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 specified constituents.
public void labelGaps(java.util.Stack<Constituent> stack)
GapLabeler
labelGaps in interface GapLabelerstack - The stack of un-completed constituents.
public void serialize(java.io.Writer writer)
throws java.io.IOException
After the entries have been written, the writer is flushed. The writer remains open after this method returns.
writer -
java.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||