uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Karl Thompson <...@northwestern.edu>
Subject RE: Extending TextMarker with new actions
Date Thu, 25 Apr 2013 17:16:46 GMT
Hi Peter,

 Many thanks! I was just about to try it out before reading your latest email. Should I check
out the latest trunk version from the svn repository tomorrow?

In terms of feature requests, I appreciate your willingness to consider extensions. My strategy
will be to try accomplishing a few tasks first, to see what can be abstracted that is of sufficient
generality. As background info, I am creating some NLP applications for clinical text using
cTAKES, and I think TextMarker is a nice option to have for rule-based alternatives to certain
tasks (like relating two annotations to each other, DiseaseDisorder and AnatomicalLocation
in the same sentence). The current cTAKES relation extractor is based on machine learning,
and requires an annotated corpus for training, whereas sometimes it's just easier to create
a set of rules.

Cheers,

Will

-----Original Message-----
From: Peter Klügl [mailto:pkluegl@uni-wuerzburg.de] 
Sent: Thursday, April 25, 2013 10:49 AM
To: user@uima.apache.org
Subject: Re: Extending TextMarker with new actions

Hi,

I checked the language extensions and unfortunately they do not work right now. There are
some small bugs, but they will be fixed tomorrow.

Best,

Peter

Am 25.04.2013 11:37, schrieb Peter Klügl:
> Hi,
>
> Am 25.04.2013 03:29, schrieb William Karl Thompson:
>> Hello,
>>
>> (My apologies, I mistakenly sent this to the dev list initially)
>>
>> I'm very interested in using the TextMarker project, but the current 
>> set of action types doesn't quite do what I need. I found references 
>> to an extension mechanism, have also found the 
>> ITextMarkerActionExtension interface in the source code. I also found 
>> the antlr grammar and lexer files where the TextMarker language is 
>> defined, which appears to be where new action type names are to be 
>> added. So I surmise the steps to add new actions is to
>>
>>
>> 1.       Add the desired action signature to the antlr grammar
>>
>> 2.       Define an implementation of ITextMarkerActionExtension that 
>> implements the functionality.
>>
>> Is there an easier way to do this? My concern is that I need to 
>> modify TextMarker source files (the grammar and lexer files), which 
>> would be overwritten on any updated version of TextMarker.
>
> This should be possible without changing any textmarker code.
>
> There is a generic parsing rule in the grammar, which creates an 
> external action using the set of ITextMarkerExtension mentioned in the 
> descriptor (parameter: additionalExtensions). There is no default 
> syntax check since the possible arguments are of course not yet known 
> by the engine. Syntax checks need to be implemented in the 
> ITextMarkerActionExtension.createAction(), which throws an 
> ANTLRException. The arguments of the action are delegated to this 
> method, which return the action implementation, so there will probably 
> many casts and "if instanceOf" checks. Language constructs like 
> assignments ("feature" = Type) known by the CREATE action, are not yet 
> supported.
>
> Unfortunately, there is no automatic integration in the workbench yet. 
> You have to modify the BasicEngine (add the extension) in the 
> textmarker project yourself. The implemenatation of the extension 
> needs of course then also be available to the workbench.
>
> I haven't used the language extensions since 2009 (it was a wordnet
> integration) and they are not yet covered by unit tests. So, there are 
> maybe some bugs due to the changes after the contribution to Apache 
> UIMA. However, I will check the functionality, add a test case and 
> extend the documentation.
>
> Concerning the list of available actions: You are of course also 
> welcome to create feature requests for new actions. The current set of 
> actions is mainly based on my own requirements and I will gladly add 
> new reasonable/generic actions (within the limits of my available time).
>
> Best,
>
> Peter
>
>> Thanks!
>>
>> Will Thompson
>>


Mime
View raw message