public class CTAKESParser extends ParserDecorator
Parser
and leverages on
CTAKESContentHandler
to extract biomedical information from
clinical text using Apache cTAKES.
It is normally called by supplying an instance to
AutoDetectParser
, such as:
AutoDetectParser parser = new AutoDetectParser(new CTAKESParser());
It can also be used by giving a Tika Config file similar to:
Because this is a Parser Decorator, and not a normal Parser in it's own right, it isn't normally selected via the Parser Service Loader.
Constructor and Description |
---|
CTAKESParser()
Wraps the default Parser
|
CTAKESParser(Parser parser)
Wraps the specified Parser
|
CTAKESParser(TikaConfig config)
Wraps the default Parser for this Config
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDecorationName() |
void |
parse(java.io.InputStream stream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
ParseContext context)
Delegates the method call to the decorated parser.
|
getSupportedTypes, getWrappedParser, withFallbacks, withoutTypes, withTypes
parse
public CTAKESParser()
public CTAKESParser(TikaConfig config)
public CTAKESParser(Parser parser)
public void parse(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata, ParseContext context) throws java.io.IOException, org.xml.sax.SAXException, TikaException
ParserDecorator
super.parse()
to invoke
the decorated parser) to implement extra decoration.parse
in interface Parser
parse
in class ParserDecorator
stream
- the document stream (input)handler
- handler for the XHTML SAX events (output)metadata
- document metadata (input and output)context
- parse contextjava.io.IOException
- if the document stream could not be readorg.xml.sax.SAXException
- if the SAX events could not be processedTikaException
- if the document could not be parsedpublic java.lang.String getDecorationName()
getDecorationName
in class ParserDecorator
Copyright © 2010 - 2020 Adobe. All Rights Reserved