Class CTAKESParser

  • All Implemented Interfaces:
    Serializable, org.apache.tika.parser.Parser

    public class CTAKESParser
    extends org.apache.tika.parser.ParserDecorator
    CTAKESParser decorates a 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.

    See Also:
    Serialized Form
    • Constructor Detail

      • CTAKESParser

        public CTAKESParser()
        Wraps the default Parser
      • CTAKESParser

        public CTAKESParser​(org.apache.tika.config.TikaConfig config)
        Wraps the default Parser for this Config
      • CTAKESParser

        public CTAKESParser​(org.apache.tika.parser.Parser parser)
        Wraps the specified Parser
    • Method Detail

      • parse

        public void parse​(InputStream stream,
                          ContentHandler handler,
                          org.apache.tika.metadata.Metadata metadata,
                          org.apache.tika.parser.ParseContext context)
                   throws IOException,
                          SAXException,
                          org.apache.tika.exception.TikaException
        Specified by:
        parse in interface org.apache.tika.parser.Parser
        Overrides:
        parse in class org.apache.tika.parser.ParserDecorator
        Throws:
        IOException
        SAXException
        org.apache.tika.exception.TikaException
      • getDecorationName

        public String getDecorationName()
        Overrides:
        getDecorationName in class org.apache.tika.parser.ParserDecorator