On 7/11/11 6:03 PM, Jörn Kottmann wrote:
The configuration parameter part can done better if the code
is part of the core framework. So working together here, would
be a win for UIMA and uimaFIT.

Over at OpenNLP we have a lot of code which just deals with that,
I believe such a configuration framework needs to solve three issues:

- Defining the mandatory parameters, which are currently specified
   in the descriptor.

  This will greatly reduce the risk of running an AE with a non-compatible
descriptor. The mandatory parameter checks can do their work more reliable. In the current implementation an AE might need to declare a new mandatory parameter, but a user runs it with an old descriptor (where it is not declared), in this case
  the built-in checks cannot detect that a parameter is missing.
  But when the class itself defines the mandatory parameters it will.

- It should be able to inject parameter values into instance variables.

- Type system mapping should be supported by the framework itself,
   e.g. declaring new value types, which is a type system Type and Feature.

OpenNLP also needs to load resources, but this cannot be improved by annotations, because the initialize method needs to create a "wrapper" object per loaded resource,
the loaded resource is hidden behind the wrapper.

For example, it declares a NameFinderModelResource, which has a method getModel(), this model is then used to instantiated a NameFinderME object, which is written into
an instance field and then called from the process method.

Jörn

Reply via email to