Package opennlp.tools.parser.lang.en
Klasse HeadRules
java.lang.Object
opennlp.tools.parser.lang.en.HeadRules
- Alle implementierten Schnittstellen:
GapLabeler
,HeadRules
,SerializableArtifact
Class for storing the English
HeadRules
associated with parsing.-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Class
<?> Retrieves the class which can serialize and recreate this artifact.Retrieves the headconstituent
for the specified constituents of giventype
.int
hashCode()
void
labelGaps
(Stack<Constituent> stack) Labelsconstituents
found in thestack
with gap labels if appropriate.void
Serializes the head rules via aWriter
in a format suitable for loading the head rules again.
-
Konstruktordetails
-
HeadRules
Creates a new set of head rules based on the specified reader.- Parameter:
rulesReader
- AReader
for a head rules file.- Löst aus:
IOException
- Thrown f the head rules reader can not be read.
-
-
Methodendetails
-
getPunctuationTags
- Angegeben von:
getPunctuationTags
in SchnittstelleHeadRules
- Gibt zurück:
- Retrieves the set of punctuation tags. Attachment decisions for these tags will not be modeled.
-
getHead
Beschreibung aus Schnittstelle kopiert:HeadRules
Retrieves the headconstituent
for the specified constituents of giventype
.- Angegeben von:
getHead
in SchnittstelleHeadRules
- Parameter:
constituents
- Theconstituents
which make up a constituent of the specifiedtype
.type
- The type of a constituent which is made up of theconstituents
.- Gibt zurück:
- The
constituent
which represents the head.
-
labelGaps
Beschreibung aus Schnittstelle kopiert:GapLabeler
Labelsconstituents
found in thestack
with gap labels if appropriate.- Angegeben von:
labelGaps
in SchnittstelleGapLabeler
- Parameter:
stack
- TheStack
of un-completedconstituents
.
-
serialize
Serializes the head rules via aWriter
in a format suitable for loading the head rules again. The encoding must be taken into account while working with the writer and reader.Once the entries have been written, the
writer
is flushed.Note: The
writer
remains open after this method returns.- Parameter:
writer
- TheWriter
to write the head rules to.- Löst aus:
IOException
- Thrown if IO errors occurred during write operation.
-
hashCode
public int hashCode() -
equals
-
getArtifactSerializerClass
Beschreibung aus Schnittstelle kopiert:SerializableArtifact
Retrieves the class which can serialize and recreate this artifact.Note: The serializer class must have a
public zero argument constructor
or an exception is thrown during model serialization/loading.- Angegeben von:
getArtifactSerializerClass
in SchnittstelleSerializableArtifact
- Gibt zurück:
- The corresponding
ArtifactSerializer
class.
-