uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Armin.Weg...@bka.bund.de>
Subject Purpose of setSofaDataURI
Date Wed, 27 Oct 2010 10:31:33 GMT

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