edu.stanford.nlp.ie.test
Class ExtractorTest

java.lang.Object
  |
  +--edu.stanford.nlp.ie.test.ExtractorTest

public class ExtractorTest
extends Object

A simple command line demonstration of information extraction interfaced to the KAON Karlsruhe Ontology framework. This demo starts with an ontology, does extraction from a file, shows the results, and then writes to stdout a bigger ontology which additionally incorporates as instances things which have been extracted from the file. This RDF output is not very human readable.


Constructor Summary
ExtractorTest(String ontologyFilenameOrURL, String conceptName, File extractionDir)
           
 
Method Summary
 void extractFrom(String sourceText)
          Extract from the named file
static void main(String[] args)
          Runs a simple demonstration of the extraction system.
 void storeRDF(PrintStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractorTest

public ExtractorTest(String ontologyFilenameOrURL,
                     String conceptName,
                     File extractionDir)
              throws Exception
Method Detail

extractFrom

public void extractFrom(String sourceText)
                 throws IOException,
                        org.w3c.rdf.model.ModelException,
                        edu.unika.aifb.sitris.exception.NotSupportedException
Extract from the named file

IOException
org.w3c.rdf.model.ModelException
edu.unika.aifb.sitris.exception.NotSupportedException

storeRDF

public void storeRDF(PrintStream out)
              throws IOException,
                     org.w3c.rdf.model.ModelException,
                     org.w3c.rdf.syntax.SerializationException
IOException
org.w3c.rdf.model.ModelException
org.w3c.rdf.syntax.SerializationException

main

public static void main(String[] args)
Runs a simple demonstration of the extraction system. It loads an ontology, a set of serialized extractors, and extracts instances of a given Concept from one or more given text files.

Usage: java edu.stanford.nlp.ie.test.ExtractorTest ontologyFileOrUrl conceptToExtract serializedExtractorDir fileToExtractFrom*

Parameters:
args - Command line arguments, as above


Stanford NLP Group