Class GeniaTreebankXMLHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- de.julielab.jcore.ae.opennlp.chunk.convert.GeniaTreebankXMLHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class GeniaTreebankXMLHandler extends DefaultHandler
* Copyright (c) 2015, JULIE Lab. All rights reserved. This program and the accompanying materials are made available under the terms of the BSD-2-Clause License this class is faced with the problem to extract the flat chunk categories from the hierarchical constituent categories given in the Genia Treebank This is solved by giving each chunk the lowest / closest category of the corresponding constitute When a token is read it belongs to consCatStack.top()- Author:
- rubruck
-
-
Constructor Summary
Constructors Constructor Description GeniaTreebankXMLHandler(String out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(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 org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
GeniaTreebankXMLHandler
public GeniaTreebankXMLHandler(String out)
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
-