Class ConstitDocumentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
opennlp.tools.formats.frenchtreebank.ConstitDocumentHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate final List<Constituent> private booleanprivate intprivate static final Stringprivate static final Stringprivate final Stack<Constituent> private Stringprivate final StringBuilderprivate final StringBuilderA token buffer, a token might be build up by multiplecharacters(char[], int, int)calls.private static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) voidstartElement(String uri, String localName, String qName, Attributes attributes) Methods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
SENT_ELEMENT_NAME
- See Also:
-
WORD_ELEMENT_NAME
- See Also:
-
SENT_TYPE_NAME
- See Also:
-
parses
-
insideSentenceElement
private boolean insideSentenceElement -
tokenBuffer
A token buffer, a token might be build up by multiplecharacters(char[], int, int)calls. -
text
-
offset
private int offset -
stack
-
cons
-
cat
-
subcat
-
-
Constructor Details
-
ConstitDocumentHandler
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-