Hi Richard! I created the XML file, thanks a lot. Can you explain me a bit more how can i pass this XML to the JCasGen programmatically?
Eirini On Thu, Sep 19, 2013 at 12:48 PM, Richard Eckart de Castilho <[email protected] > wrote: > Hi, > > you can generate a type system descriptor in Java (there are Java objects > representing the type system descriptor). Then you can serialize > that to XML and pass it to the JCasGen programmatically, or possibly > pass the descriptor object directly to JCasGen (but I think that is not > supported right now). > > This is a brief example how to create a type system descriptor in code: > > // Create a new type system from scratch > TypeSystemDescription tsd = new TypeSystemDescription_impl(); > TypeDescription tokenTypeDesc = tsd.addType("Token", "", > CAS.TYPE_NAME_ANNOTATION); > tokenTypeDesc.addFeature("length", "", CAS.TYPE_NAME_INTEGER); > > -- Richard > > On 19.09.2013, at 11:03, Eirini Psallida <[email protected]> > wrote: > > > Hi, > > > > i would like to define the Type System for my Annotator and then generate > > the java classes without > > using the XML descriptor and then the JCasGen button. I would like to do > it > > through java code only. > > How can i do this? I suppose i need the uima-tools.jar where JCasGen is > > implemented. > > > > > > Thanks, > > > > Eirini > >
