[
https://issues.apache.org/jira/browse/UIMA-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188257#comment-14188257
]
Peter Klügl edited comment on UIMA-4062 at 10/29/14 11:38 AM:
--------------------------------------------------------------
I think it's important not to introduce many special language constructs in
order to represent information. I'd rather prefer something like the following
with only string expressions.
{noformat}
WORDTABLE wordTableDatabase =
RESOURCE(org.apache.uima.ruta.resources.MyWordTable,
"username", "dbuser", "pass", "dbpass", "driver", "jdbcdriver", "dialect",
"hibernatedialect", ...);
{noformat}
The java code would be something like:
{noformat}
ExternalResourceDescription wordTableDatabase =
createExternalResourceDescrption(classByName, args...)
{noformat}
This reminds me that it would be reasonable to initiate the values of variables
using the configuration parameters of the engine. Then, the user could use
string variables, e.g., for the user name and password, which are not set in
the ruta script, but in the analysis engine descriptor when it's acutally used.
Is someone interested in this general functionality?
Back to the topic:
I am not content with the syntax yet and I still have in mind that the complete
implementation needs refactoring. The current idea is to introduce DICT instead
of WORDLIST and WORDTABLE, which stay for compatibility reasons. However,
nothing of that will happen soon. A simple solution with reflection for 2.2.2
and a complete refactoring with external resoucres for 3.0.0 is maybe the most
reasonable approach.
Is there any reason to retain the current implementation of resource loading
and not to replace everything with external resources?
was (Author: pkluegl):
I thinks it's important not to introduce amny special language constructs in
order to represent information. I'd rather prefer something like with only
string expressions.
{noformat}
WORDTABLE wordTableDatabase =
RESOURCE(org.apache.uima.ruta.resources.MyWordTable,
"username", "dbuser", "pass", "dbpass", "driver", "jdbcdriver", "dialect",
"hibernatedialect", ...);
{noformat}
The java code would be something like:
{noformat}
ExternalResourceDescription wordTableDatabase =
createExternalResourceDescrption(classByName, args...)
{noformat}
This remind me that it would be reasonable to initiate the values of variables
using the configuration parameters of the engine. Then, the user could use
string variables, e.g., for the user name and password, which are not set in
the ruta script, but in the analysis engine descriptor when it's acutally used.
Is someone interested in this general functionality?
Back to the topic:
I am not content with the syntax yet and I still have in mind that the complete
implementation needs refactoring. The current idea is to introduce DICT instead
of WORDLIST and WORDTABLE, which stay for compatibility reasons. However,
nothing of that will happen soon.
Is there any reason to retain the current implementation of resource loading
and not to replace everything with external resources?
> Plugable external resources on UIMA RUTA
> ----------------------------------------
>
> Key: UIMA-4062
> URL: https://issues.apache.org/jira/browse/UIMA-4062
> Project: UIMA
> Issue Type: Improvement
> Components: ruta
> Affects Versions: 2.2.1ruta
> Reporter: Silvestre Losada Alonso
> Assignee: Peter Klügl
> Labels: enhancement, uima
> Fix For: 2.2.2ruta
>
>
> Currently UIMA ruta has WORDLIST and WORDTABLE, it is a list or table of text
> items that can used to detect occurrences. This is nice feature and very
> powerfull, however there is no way to plug my own WORDLIST/WORDTABLE
> implementation, for example WORDLIST that find matches in database table or
> in lucene index etc...
> I think that the WORDLIST/WORTABLE implementation can be defined as UIMA
> external resource, in resources section, and then pass a reference to
> WORDLIST/WORDTABLE in ruta script. The other option is to specify the class
> that implements WORDLIST/WORDTABLE to RutaEnvionment and instantiate it in
> ruta environment using Reflection.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)