You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Peter Klügl (JIRA)" <de...@uima.apache.org> on 2015/06/25 15:25:04 UTC
[jira] [Comment Edited] (UIMA-4484) Ruta: improve usage as helper
lib in java code similar to the uimaFIT helper classes
[ https://issues.apache.org/jira/browse/UIMA-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14601152#comment-14601152 ]
Peter Klügl edited comment on UIMA-4484 at 6/25/15 1:24 PM:
------------------------------------------------------------
Wish-lists are welcome :-)
I have been thinking about adding a default query type like "Select" in the ruta type system, which can be used for these situations. The initial reason was to specify more complex queries in the UIMA Ruta Workbench...
// returns all sentences that end with a number and are part of a paragraph that starts with a Bold annotation:
{noformat}
List<Annotation> select = Ruta.select(cas, "Paragragh{STARTSWITH(Bold)}->{Sentence{ENDSWITH(NUM)-> Select};};");
{noformat}
was (Author: pkluegl):
Wish-lists are welcome :-)
I have been thinking about adding a default query type like "Select" in the ruta type system, which can be used for these situations. The initial reason was to specify more complex queries in the UIMA Ruta Workbench...
// returns all sentences that end with a number and are part of a paragraph that starts with a Bold annotation:
List<Annotation> select = Ruta.select(cas, "Paragragh{STARTSWITH(Bold)}->{Sentence{ENDSWITH(NUM)-> Select};};");
> Ruta: improve usage as helper lib in java code similar to the uimaFIT helper classes
> ------------------------------------------------------------------------------------
>
> Key: UIMA-4484
> URL: https://issues.apache.org/jira/browse/UIMA-4484
> Project: UIMA
> Issue Type: New Feature
> Components: ruta
> Affects Versions: 2.3.0ruta
> Reporter: Peter Klügl
>
> Some extensions to the Ruta class could be helpful. Here are some inital thoughts:
> // returns the spans where the rules of the script have been applied
> List<AnnotationFS> result = Ruta.select(CAS cas, String script);
> // returns the spans where the "amount" last rules of the script have been applied
> List<AnnotationFS> result = Ruta.selectLast(CAS cas, String script, int amount);
> // returns annotations that have been created by the rules of the script
> List<clazz> result = Ruta.select(JCas cas, String script, Class clazz);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)