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 |
---|---|
String |
getDecorationName() |
void |
parse(InputStream stream,
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(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, 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 contextIOException
- if the document stream could not be readSAXException
- if the SAX events could not be processedTikaException
- if the document could not be parsedpublic String getDecorationName()
getDecorationName
in class ParserDecorator
Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.