Hi, The idea is to have a Sofa external to the CAS. A short description is at http://uima.apache.org/downloads/releaseDocs/2.3.0-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aas.accessing_sofa_data_using_java_stream
Regards, Eddie On Wed, Oct 27, 2010 at 6:31 AM, <[email protected]> wrote: > > Hi, > > what is the method setSofaDataURI(String uri, String mime) of JCas good > for? I thought that one could use it as an alternative to > setSofaDataString(). But doing so results in an empty String when > calling getDocumentText() in the analysis engine's process() method. > What am I missing? > > Code snippet: > JCas jCas = analysisEngine.newJCas(); > final String uri = file.toURI().toString(); // gives something like > file:/C:/some/path/to/utf8textfile.txt > jCas.setSofaDataURI(uri, "text/plain"); > analysisEngine.process(jCas); // causes NullPointerException when using > regular expressions on the empty string > > Thanks, > > Armin >
