Hi,

the subject suggests a pretty trivial question. Actually it is,
but then again it is not.

The uimaFIT JCasFactory defines several convenience methods to
create JCases. The difference between the methods is basically
how they get their type system information:

1) automatically through classpath scanning
2) using named descriptors from the classpath
3) using named descriptors from the file system
4) using a type system description

However, I recently find myself more in need of a method
that creates a JCas and initializes it with a text and
a language. I've become quite accustomed to uimaFIT's
type discovery mechanism, so that I do not actually need
any parameter to specify a type system.

Naively, I'd create a new method with the signature

  JCas createJCas(String language, String text)

but there is already a signature 

  JCas createJCas(String… typeSystemDescriptorNames)

so this is not possible. So I currently still end up writing

  JCas jcas = JCasFactory.createJCas();
  jcas.setDocumentText(…);
  jcas.setDocumentLanguage(…);

Did anybody else ever miss this method that I describe?
If so, do you have any suggestion how to call it other
than createJCas()?

Cheers,

-- Richard

P.S.: Feel free to call me crazy for suggesting this in the
first place - but one aspect of uimaFIT is to provide very
concise language for often-used functionality. This is targeting
folks who want to write as few lines/commands as possible while
getting the most out of it.


Reply via email to