Bonnie MacKellar | 8 Feb 00:37 2016
Picon

question on REGEXP in Ruta

Hi,

I am trying to write RUTA rules using regular expressions and capturing
groups. I want the matches to be line by line. I can do this using the
following script

ENGINE utils.PlainTextAnnotator;
TYPESYSTEM utils.PlainTextTypeSystem;
Document{-> RETAINTYPE(BREAK)};
Document{-> EXEC(PlainTextAnnotator)};
DECLARE Rule1NoPattern, Group1, Group2;
Line{REGEXP(".*no|No (.*)") -> Rule1NoPattern};

Given this text
Not pregnant or nursing
Fertile patients must use effective contraception (hormonal contraception
or intra-uterine device [IUD])
No concurrent participation in another clinical trial that would preclude
the interventions or outcome assessment of this clinical trial
No other concurrent anticancer therapy

it correctly matches the last two lines and annotates them with
Rule1NoPattern
The problem is, I want to use the capturing group information as well. I
can do this using the simple regular expression syntax
".*no|No (.*)\n|S" -> Rule1NoPattern, 1=Group1;

if I just give it one line, say
No other concurrent anticancer therapy

(Continue reading)

AmyJacksonKatrina | 5 Feb 12:47 2016
Picon

uima ruta to edit src

i just want add some regex rules in seed.flex files which should work on 
eclipse while displaying output. How to make this to run. give me a 
detailed explanation. i just use the code below to add an annotaion as TAG 
in seed.flex file.

{\<}+ {

                TAG t = new TAG(cas);
                t.setBegin(yychar);
                t.setEnd(yychar + yytext().length());
       }

Richard Eckart de Castilho | 4 Feb 23:47 2016
Picon

Apache UIMA is back on Twitter

Hi all,

the Apache UIMA project is back on Twitter:  <at> ApacheUIMA

The account is controlled by the Apache UIMA developer team (PMC).

... tweet about UIMA
... follow us :)

Cheers,

-- Richard

José Tomás Atria | 4 Feb 21:25 2016
Picon
Gravatar

JCasGen: Import typesystem from Maven dependency jar

Hello All,

I'm using JCasGen to generate the type system for a specific research
project. This type system is an extension of a generic type system that we
use internally in our lab.

Until now, I have been doing this by copying the XML descriptor for the
generic type system to a file in my development machine, and then including
a hard coded reference to its path in the specified type system, but I
would like to remove that hard-coded reference and reference instead the
copy of the type system description that is included in the resources of
our lab's API library, distributed over maven.

e.g. right now, my type system descriptor includes the line:

<import location="file://path/to/a/local/folder/LabTypeSystem.xml"/>

I want to remove that reference and instead pull "LabTypeSystem.xml" from
the resources contained in the jar of a maven dependency.

I tried doing this instead:

<import location="
jar:file:/path/to/maven/repo/lab/group/id/lab-api-artifact/version/
lab-api-artifact-version.jar!/desc/type/LabTypeSystem.xml"/>

(i.e. the URL I got from
doing getClass().getResource("desc/type/LabTypeSystem.xml").toString() )

but this resulted in a NullPointerException (which is surely a bug in
(Continue reading)

Baker James D | 4 Feb 10:23 2016
Picon

RE: [UK OFFICIAL] Who is using the Maven uimaFIT plugin in open source?

Classification: UK OFFICIAL

Hi Richard,

It is being used by the Baleen text analytics framework: http://www.github.com/dstl/baleen

James

-----Original Message-----
From: Richard Eckart de Castilho [mailto:rec@...]
Sent: 04 February 2016 09:11
To: user@...
Subject: Who is using the Maven uimaFIT plugin in open source?

Hi all,

I am looking for open source projects or at least publicly distributed components that are using UIMA in
conjunction with Maven and with the uimaFIT Maven plugin.

If you know or have such a project, it would be great if you could post a link here.

Thanks for your help!

-- Richard
"This e-mail and any attachment(s) is intended for the recipient only.   Its unauthorised use, 
disclosure, storage or copying is not permitted.  Communications with Dstl are monitored and/or 
recorded for system efficiency and other lawful purposes, including business intelligence, business 
metrics and training.  Any views or opinions expressed in this e-mail do not necessarily reflect Dstl policy."

"If you are not the intended recipient, please remove it from your system and notify the author of 
(Continue reading)

Richard Eckart de Castilho | 4 Feb 10:11 2016
Picon

Who is using the Maven uimaFIT plugin in open source?

Hi all,

I am looking for open source projects or at least publicly
distributed components that are using UIMA in conjunction
with Maven and with the uimaFIT Maven plugin.

If you know or have such a project, it would be great if
you could post a link here.

Thanks for your help!

-- Richard

Hector Liu | 28 Jan 00:48 2016
Picon
Gravatar

Uima Annotation Viewer view selection causing StackOverflow

Hi,

I've been using UIMA a lot recently, and I relied on the annotation viewer
to check my results. I've run the viewer without any problems for a while
but I got a StackOverFlow error recently. This is likely to be caused by my
recent Java update.

I am getting an StackOverFlow error when running the main class of
 org.apache.uima.tools.AnnotationViewerMain , my Java version output is as
followed:

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

The following is a sample exception message. There seems to be infinite
loop of method calling between swing and the uima viewer. Any help or
suggestions will be appreciated.

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at sun.lwawt.macosx.CCursorManager.nativeGetCursorPosition(Native Method)
at sun.lwawt.macosx.CCursorManager.getCursorPosition(CCursorManager.java:54)
at sun.lwawt.LWCursorManager.updateCursorImpl(LWCursorManager.java:80)
at sun.lwawt.LWCursorManager.updateCursor(LWCursorManager.java:57)
at
sun.lwawt.LWComponentPeer.updateCursorImmediately(LWComponentPeer.java:896)
at java.awt.Component.updateCursorImmediately(Component.java:3137)
at java.awt.Container.validate(Container.java:1640)
at javax.swing.JViewport.validateView(JViewport.java:482)
at javax.swing.JViewport.scrollRectToVisible(JViewport.java:393)
(Continue reading)

Richard Eckart de Castilho | 22 Jan 10:26 2016
Picon

2nd CFP: LREC Workshop on Cross-Platform Text Mining and Natural Language Processing Interoperability

Hi all,

I am co-organizing the an interoperability workshop at LREC. While this is not a pure UIMA event, as a
framework facilitating interoperability, UIMA certainly plays a role here. I am posting the call here
trusting that at least some of you might find it interesting to consider interoperability in Natural
Language Processing and Text & Data Mining beyond the UIMA framework - or might even care to contribute to
or attend the workshop.

Sorry for only posting the second CFP - the deadline for submissions is approaching soon:  February 19, 2016

Best regards,

-- Richard

Note: This is event is not related to ASF activities.

---

                               Workshop on 
                    Cross-Platform Text Mining and 
             Natural Language Processing Interoperability

                                LREC 2016
                Grand Hotel Bernardin Conference Center
                           Portorož, Slovenia
                               23 May 2016

                       Second Call for Submissions

                      http://interop2016.github.io​
(Continue reading)

Baker James D | 18 Jan 09:56 2016
Picon

RE: [UK OFFICIAL] examples of using maven with uima, uimaFit, ruta, etc?

Classification: UK OFFICIAL

Hi Bonnie,

Have you had a look at the source code for Baleen? We use Maven as our build system, and rely heavily on UIMA and
UimaFIT, so it might give you some clues on how to get it working: https://github.com/dstl/baleen


James

-----Original Message-----
From: Bonnie MacKellar [mailto:bkmackellar <at> gmail.com]
Sent: 17 January 2016 19:34
To: user <at> uima.apache.org
Subject: examples of using maven with uima, uimaFit, ruta, etc?

Hi,

I had posted earlier asking about best practices for building a project that uses uimaFit, Ruta, and the
Metamap annotator. My current project, while it works, is inordinately complex and I can't seem to figure
out the right way to structure it. I did get the advice to use Maven. I don't normally use Maven, but I would if
it gave some way to simplify this mess.
However, I can't find any mention of using Maven in the Uima tutorial, so I am at a loss as to how to start. Are
there instructions on the web that I am just not finding? An example project?

thanks,
Bonnie MacKellar

"This e-mail and any attachment(s) is intended for the recipient only.   Its unauthorised use, 
disclosure, storage or copying is not permitted.  Communications with Dstl are monitored and/or 
recorded for system efficiency and other lawful purposes, including business intelligence, business 
(Continue reading)

Bonnie MacKellar | 17 Jan 20:34 2016
Picon

examples of using maven with uima, uimaFit, ruta, etc?

Hi,

I had posted earlier asking about best practices for building a project
that uses uimaFit, Ruta, and the Metamap annotator. My current project,
while it works, is inordinately complex and I can't seem to figure out the
right way to structure it. I did get the advice to use Maven. I don't
normally use Maven, but I would if it gave some way to simplify this mess.
However, I can't find any mention of using Maven in the Uima tutorial, so I
am at a loss as to how to start. Are there instructions on the web that I
am just not finding? An example project?

thanks,
Bonnie MacKellar
Bonnie MacKellar | 14 Jan 16:13 2016
Picon

best practice for building RUTA scripts in Eclipse when they are to be run in Java?

Hi,

I just spent the last 4 days stumbling through the documentation, tutorials, posts to this mailing list, and any code examples I could find on the Internet, so I could integrate the Metamap annotator and a RUTA script in Java using UimaFit. I succeeded, and I have something that runs, but I doubt I am organizing things the best way in Eclipse, and in particular, I am noticing some odd things if I try to build and test the script first in the Ruta development environment in Eclipse and then move the script to my Java environment. I suspect my workflow is not the best possible, so I am looking for advice on how to manage this.

My project was created as a Ruta project so I could have the development environment support. I then added Uima nature to the project to get the Java development folders. I set up the type descriptors for Metamap, and after much reading, realized I needed a types.txt file in my source folder that tells the system how to find the Metamap type descriptors. I then added the Ruta script to the pipeline in my Java class and then copied the type descriptor for that down to my source folders as well. Finally, I realized I needed java classes for the types, and that pressing a jCasGen button in the ComponentDescriptorEditor was the way to do that. However, there are some anomalies when I do this.

So, my project has this structure at the top level



and at the src level, this is the structure. Notice that the Ruta script and types have been copied down to this level




The code that creates the AnalysisEngineDescriptors and runs the pipeline looks like this (it is in PipelineSystem. java)

try {
ae = AnalysisEngineFactory.createEngine(gov.nih.nlm.nls.metamap.uima.MetaMapAnnotator.class);
AnalysisEngineDescription mmEngineDesc =
AnalysisEngineFactory.createEngineDescription(gov.nih.nlm.nls.metamap.uima.MetaMapAnnotator.class);
 
AnalysisEngine rae = AnalysisEngineFactory.createEngine(RutaEngine.class, RutaEngine.PARAM_MAIN_SCRIPT,
           "testrules");
AnalysisEngineDescription rutaEngineDesc =
AnalysisEngineFactory.createEngineDescription(RutaEngine.class, RutaEngine.PARAM_MAIN_SCRIPT,
           "testrules");
JCas jCas = ae.newJCas();
jCas.setDocumentText("serum albumin greater or equal 2g/dL");
SimplePipeline.runPipeline(jCas, mmEngineDesc, rutaEngineDesc);
displayResults(jCas);
displayRutaResults(jCas);

and the types.txt file contains this
classpath*:desc/types/MetaMapApiTypeSystem.xml
classpath*:desc/types/BasicTypeSystem.xml
classpath*:desc/types/InternalTypeSystem.xml
classpath*:desc/types/testrulesTypeSystem.xml


If I want to use the Ruta Workbench to develop my Ruta script, it appears that I have to regenerate the java type files, such as Relational.java, each time I make a change. Is that correct?
And when I do this, I notice that it completely regenerates the org.apache.uima.ruta.type hierarchy, which leads to an odd runtime error  (NoSuchMethodException, caused by trying to call setLowMemoryProfile). I read a chain on this list about this error which recommended to delete the regenerated uima type hierachy. This worked, but it seems I have to go through these steps every time I regenerate the Ruta types, which is a pain.

Also, I notice that the metamap type hierarchy is also regenerated inside my project. I theorize it is because of the import in my Ruta type descriptor
TYPESYSTEM BasicTypeSystem;
TYPESYSTEM BasicMetaMapTypeSystem;
TYPESYSTEM MetaMapApiTypeSystem;
DECLARE Relational,UMLSConcept;
Candidate{ -> MARK(UMLSConcept)};

is this not the right way to make my script aware of the Metamap types?

I also notice that in the type descriptor, this import is generated twice
<imports>
        <import location="BasicTypeSystem.xml"/>
        <import location="BasicTypeSystem.xml"/>
    </imports>

In general, is it a good or bad idea to develop the Ruta script in the workbench and then copy its pieces into the Java source folder? It seems like a very convoluted process.

Thanks for your help

Bonnie MacKellar

Gmane