Package opennlp.tools.parser.lang.es
Klasse AncoraSpanishHeadRules
java.lang.Object
opennlp.tools.parser.lang.es.AncoraSpanishHeadRules
- Alle implementierten Schnittstellen:
- GapLabeler,- HeadRules,- SerializableArtifact
public class AncoraSpanishHeadRules
extends Object
implements HeadRules, GapLabeler, SerializableArtifact
Class for storing the Ancora Spanish head rules associated with parsing. In this class
 headrules for noun phrases are specified. The rest of the rules are
 in opennlp-tools/lang/es/parser/es-head-rules
 
NOTE: This class has been adapted from opennlp.tools.parser.lang.en.HeadRules
The main change is the constituents search direction in the first for loop.
Note also the change in the return of the getHead() method: In the lang.en.HeadRules class: return constituents[ci].getHead(); Now: return constituents[ci];
Other changes include removal of deprecated methods.
- 
Verschachtelte Klassen - ÜbersichtVerschachtelte Klassen
- 
KonstruktorübersichtKonstruktorenKonstruktorBeschreibungAncoraSpanishHeadRules(Reader rulesReader) Creates a new set of head rules based on the specified reader.
- 
MethodenübersichtModifizierer 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- 
AncoraSpanishHeadRulesCreates a new set of head rules based on the specified reader.- Parameter:
- rulesReader- A- Readerfor a head rules file.
- Löst aus:
- IOException- Thrown f the head rules reader can not be read.
 
 
- 
- 
Methodendetails- 
getPunctuationTags- Angegeben von:
- getPunctuationTagsin Schnittstelle- HeadRules
- Gibt zurück:
- Retrieves the set of punctuation tags. Attachment decisions for these tags will not be modeled.
 
- 
getHeadBeschreibung aus Schnittstelle kopiert:HeadRulesRetrieves the headconstituentfor the specified constituents of giventype.- Angegeben von:
- getHeadin Schnittstelle- HeadRules
- Parameter:
- constituents- The- constituentswhich make up a constituent of the specified- type.
- type- The type of a constituent which is made up of the- constituents.
- Gibt zurück:
- The constituentwhich represents the head.
 
- 
labelGapsBeschreibung aus Schnittstelle kopiert:GapLabelerLabelsconstituentsfound in thestackwith gap labels if appropriate.- Angegeben von:
- labelGapsin Schnittstelle- GapLabeler
- Parameter:
- stack- The- Stackof un-completed- constituents.
 
- 
serializeSerializes 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- The- Writerto write the head rules to.
- Löst aus:
- IOException- Thrown if IO errors occurred during write operation.
 
- 
hashCodepublic int hashCode()
- 
equals
- 
getArtifactSerializerClassBeschreibung 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 Schnittstelle- SerializableArtifact
- Gibt zurück:
- The corresponding ArtifactSerializerclass.
 
 
-