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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtractorTest
public ExtractorTest(String ontologyFilenameOrURL,
String conceptName,
File extractionDir)
throws Exception
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