I am trying to pass the URI of the file I want to process to my
engine.   The code that I am using works as expected when I extract
the text from a text document and add it to a CAS using its
setDocumentText() method.  What is the proper set of methods that need
to be called when sending just the URI?  This is the basic code that I
am using:

AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
CAS cas = ae.newCAS();
MimetypesFileTypeMap mimetypeMap = new MimetypesFileTypeMap ();
cas.setSofaDataURI(inputFileURI,  mimetypeMap.getContentType(inputFileURI));

At the last line I get this error (this is the complete trace):

java.lang.ArrayIndexOutOfBoundsException: -1


Presumably, I am not configuring the CAS correctly.  Any advice?  The
examples that I have been studying have all set the document text
after extracting it from the file.

Thank you.

Reply via email to