Richard Eckart de Castilho <rec@...> writes:

> 
> On 12.02.2014, at 11:22, Peter Litsegård <peter.litsegard@...> wrote:
> 
> > Why would the
> > ConceptMapper want to use these as the types declared on those xmls have
> > already been "Cas generated" and their .class files are present in the
CM-jar?
> 
> The generated JCas classes are just a way of mapping the UIMA type system
to the
> Java type system. They offer a convenience for programming using the known
> class/getter/setter concepts in Java.
> 
> These classes are not a substitute for the XML-based type system definitions.
> The type system definitions are always required in addition to the JCas
classes.
> 
> When you use only the JCas classes, but did not initialize the CAS with
the proper
> types, you'll get such an error message:
> 
> "JCas type used in Java code, but was not declared in the XML type descriptor"
> 
> Cheers,
> 

Hi!

I've had some progress on this - no exceptions that is:) I don't get any
hits however when I use the ConceptMapper. I've set PrintDictionary = true
which shows that it successfully loads 49 dictentries and no exceptions
while executing the code below. I use the following code:

XMLInputSource in = new XMLInputSource(".../ConceptMapperOffsetTokenizer.xml");
ResourceSpecifier specifier =
UIMAFramework.getXMLParser().parseResourceSpecifier(in);
AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

JCas jcas = ae.newJCas();
jcas.setDocumentText("...some text containing a number of dictentries");
ae.process(jcas);

Now, how do I loop through the hits in the jcas-instance (the dictionary 
entry together with begin/end positions, SemClass which is part of the 
dictionary entry attributes etc.)?

I'm very sorry for posting these trivial questions but...

Reply via email to