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
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
-
Constructor Summary
ConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
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 Details
-
CTAKES_META_PREFIX
-
-
Constructor Details
-
CTAKESContentHandler
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
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 Details
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classContentHandlerDecorator
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classContentHandlerDecorator
- Throws:
SAXException
-
getMetadata
Returns metadata that includes cTAKES annotations.- Returns:
Metadata
object that includes cTAKES annotations.
-