uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Epstein <eaepst...@gmail.com>
Subject Re: Purpose of setSofaDataURI
Date Wed, 27 Oct 2010 13:44:14 GMT
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,  <Armin.Wegner@bka.bund.de> 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
>

Mime
View raw message