Package org.apache.tika.parser.ctakes
Class CTAKESContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.tika.sax.ContentHandlerDecorator
-
- org.apache.tika.parser.ctakes.CTAKESContentHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class CTAKESContentHandler extends ContentHandlerDecorator
Class used to extract biomedical information while parsing.This class relies on Apache cTAKES that is a natural language processing system for extraction of information from electronic medical record clinical free-text.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CTAKES_META_PREFIX
-
Constructor Summary
Constructors Constructor Description CTAKESContentHandler()
Default constructor.CTAKESContentHandler(ContentHandler handler, Metadata metadata)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.CTAKESContentHandler(ContentHandler handler, Metadata metadata, CTAKESConfig config)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endDocument()
Metadata
getMetadata()
Returns metadata that includes cTAKES annotations.-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
endElement, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, warning
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, resolveEntity, unparsedEntityDecl
-
-
-
-
Field Detail
-
CTAKES_META_PREFIX
public static String CTAKES_META_PREFIX
-
-
Constructor Detail
-
CTAKESContentHandler
public CTAKESContentHandler(ContentHandler handler, Metadata metadata, CTAKESConfig config)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.- Parameters:
handler
- theContentHandler
object to be decorated.metadata
- theMetadata
object that will be populated using biomedical information extracted by cTAKES.config
- theCTAKESConfig
object used to configure the handler.
-
CTAKESContentHandler
public CTAKESContentHandler(ContentHandler handler, Metadata metadata)
Creates a newCTAKESContentHandler
for the givenContentHandler
and Metadata objects.- Parameters:
handler
- theContentHandler
object to be decorated.metadata
- theMetadata
object that will be populated using biomedical information extracted by cTAKES.
-
CTAKESContentHandler
public CTAKESContentHandler()
Default constructor.
-
-
Method Detail
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classContentHandlerDecorator
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
- Throws:
SAXException
-
-