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 TypMethodeBeschreibungbooleanClass<?> Retrieves the class which can serialize and recreate this artifact.Retrieves the headconstituentfor the specified constituents of giventype.inthashCode()voidlabelGaps(Stack<Constituent> stack) Labelsconstituentsfound in thestackwith gap labels if appropriate.voidSerializes the head rules via aWriterin 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- AReaderfor a head rules file.- Löst aus:
IOException- Thrown f the head rules reader can not be read.
-
-
Methodendetails
-
getPunctuationTags
- Angegeben von:
getPunctuationTagsin SchnittstelleHeadRules- Gibt zurück:
- Retrieves the set of punctuation tags. Attachment decisions for these tags will not be modeled.
-
getHead
Beschreibung aus Schnittstelle kopiert:HeadRulesRetrieves the headconstituentfor the specified constituents of giventype.- Angegeben von:
getHeadin SchnittstelleHeadRules- Parameter:
constituents- Theconstituentswhich make up a constituent of the specifiedtype.type- The type of a constituent which is made up of theconstituents.- Gibt zurück:
- The
constituentwhich represents the head.
-
labelGaps
Beschreibung aus Schnittstelle kopiert:GapLabelerLabelsconstituentsfound in thestackwith gap labels if appropriate.- Angegeben von:
labelGapsin SchnittstelleGapLabeler- Parameter:
stack- TheStackof un-completedconstituents.
-
serialize
Serializes the head rules via aWriterin 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
writeris flushed.Note: The
writerremains open after this method returns.- Parameter:
writer- TheWriterto 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:SerializableArtifactRetrieves the class which can serialize and recreate this artifact.Note: The serializer class must have a
public zero argument constructoror an exception is thrown during model serialization/loading.- Angegeben von:
getArtifactSerializerClassin SchnittstelleSerializableArtifact- Gibt zurück:
- The corresponding
ArtifactSerializerclass.
-