Am 20.07.2011 um 21:20 schrieb Jörn Kottmann: > So in the sample above a user defines this type system: > > Type: com.foo.Token > Feature: double tokenConfidence > Feature: String posTag > Feature: double posConfidence > > The tokenizer also defined its type system: > Type: opennlp.Token > Feature: float confidence > > And one more type system for the pos tagger: > Type: opennlp.POSToken > Feature: float confidence > Feature: String tag > > The user defined AAE only knows the user type system and needs to > define "rules" which tell it how to transform opennlp.Token annotations > to com.foo.Token annotations, and then it needs a rule to transform > a com.foo.Token into an opennlp.POSToken, and back. > > Sure this is also already possible today, by writing these type mapping AEs, > as you would need to do for JCas. But I think having better framework > support for this would make it easier.
In DKPro we have a Token type and a POS from which several types inherit (V, NP, ADJ, etc.) The Token type has a feature of type POS on which we set an instance e.g. V or NP. Token t = new Token(jcas); t.setPos(new N(jcas)); We find this quite convenient because it allows us to easily select particular type from the CAS, e.g. for (N noun : select(jcas, N.class)) { ... do something with nouns ... } Similarly it's convenient to write rules over POS tags in TextMarker with our type system. With such type systems or with type systems using lists, arrays etc, a simple rule-based mapping won't work I think. JCas is a nice convenience API, but I don't think its more. I'm not sure if the effort of implementing a mapping rule framework is worth the outcome. Cheers, Richard -- ------------------------------------------------------------------- Richard Eckart de Castilho Technical Lead Ubiquitous Knowledge Processing Lab FB 20 Computer Science Department Technische Universität Darmstadt Hochschulstr. 10, D-64289 Darmstadt, Germany phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117 eckar...@tk.informatik.tu-darmstadt.de www.ukp.tu-darmstadt.de Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de -------------------------------------------------------------------