public class EnglishHeadRules extends Object implements opennlp.tools.parser.HeadRules, opennlp.tools.parser.GapLabeler
| Constructor and Description |
|---|
EnglishHeadRules(Reader rulesReader)
Creates a new set of head rules based on the specified reader.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
opennlp.tools.parser.Parse |
getHead(opennlp.tools.parser.Parse[] constituents,
String type) |
Set<String> |
getPunctuationTags() |
int |
hashCode() |
void |
labelGaps(Stack<opennlp.tools.parser.Constituent> stack) |
void |
serialize(Writer writer)
Writes the head rules to the writer in a format suitable for loading the
head rules again with the constructor.
|
public EnglishHeadRules(Reader rulesReader) throws IOException
rulesReader - the head rules reader.IOException - if the head rules reader can not be read.public Set<String> getPunctuationTags()
getPunctuationTags in interface opennlp.tools.parser.HeadRulespublic opennlp.tools.parser.Parse getHead(opennlp.tools.parser.Parse[] constituents,
String type)
getHead in interface opennlp.tools.parser.HeadRulespublic void labelGaps(Stack<opennlp.tools.parser.Constituent> stack)
labelGaps in interface opennlp.tools.parser.GapLabelerpublic void serialize(Writer writer) throws IOException
After the entries have been written, the writer is flushed. The writer remains open after this method returns.
writer - the writerIOException - if io exceptionCopyright © 2017. All rights reserved.