You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Tim Miller <ti...@childrens.harvard.edu> on 2013/12/04 16:09:09 UTC

Re: cTAKES Groovy...

Very cool. I was noticing that it was downloading the umls resources 
which the parser itself doesn't need -- so I made a change to not grab 
clinical-pipeline and grab directly the things it was getting through 
that reference and now it runs even faster with only a 35M initial download.

I'd like to check in my change -- should we keep working out of sandbox 
or can we maybe put groovy scripts somewhere alongside the projects they 
belong to? Maybe in the scripts/ directory or scripts/groovy, 
scripts/perl, etc.? Any opinions on this?

Tim


On 11/27/2013 12:19 PM, Chen, Pei wrote:
> The sample constituency parser printer should be working now...
> Just copy and paste the text to parser.groovy and make it executable.
> All you should need is groovy installed on your machine.
> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
> $ parser.groovy input
> Reading from directory: input
>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>
> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>
> --Pei
>> -----Original Message-----
>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>> Sent: Tuesday, November 26, 2013 10:46 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> That is very cool!
>>
>> Since we're talking Groovy, I'd just like make a plug for Gradle, a fantastic
>> build/deployment/dependency management tool that is in many ways much
>> nicer to work with than Maven, though it plays nicely with Maven (for
>> example, it can use Maven repositories). Gradle is also proven technology:
>> it's the build tool for the Android operating system.
>> ________________________________________
>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>> Sent: Tuesday, November 26, 2013 4:13 PM
>> To: dev@ctakes.apache.org
>> Subject: cTAKES Groovy...
>>
>> Tim had a good end user use case:
>> I just want to use the ctakes constituency parser and output the tree text to
>> console.
>> So I was inspired by Richard example of groovy...
>> Check out:
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>
>> The groovy script will "Automagically" download the required
>> classes,jars,resources and automatically runs.
>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>> Sample:
>> $ parser.groovy input
>> Reading from directory: input
>> patient took 50mg of aspirin for pain in knee.
>> begin:0 end:48
>>
>> Pretty cool, 'eh...
>> --Pei


Re: cTAKES Groovy…Examples? Relatively low effort, potentially game changing

Posted by John Green <jo...@gmail.com>.
I was in passionate agreement with this post by Andy, by the by.




JG

—
Sent from Mailbox for iPhone

On Wed, Dec 4, 2013 at 6:29 PM, Andrew McMurry <mc...@gmail.com>
wrote:

> Most Open Source frameworks come with an "project-examples.zip" folder.  
> I can't help but think that the Groovy parser code and ctakes-gui make excellent EXAMPLES for potential users. 
> https://svn.apache.org/repos/asf/ctakes/sandbox/
> Imagine if each ctakes-component had an example Groovy script that shows how to use each component complete with the pubmed citation for each! 
> http://ctakes.apache.org/components.html
> Now imagine you could just download a VM and run the examples "out of the box". 
> I'll follow up in a separate thread about the VM progress. 
> I am passionate about improving the "first time user" experience. 
> Why? John Resig (creator of jQuery) gave a convincing (if not damning) synopsis of how open source projects lose users. 
> I think our user base could be easily 10X if we follow his advice:  
> http://lanyrd.com/2009/harvard-open-source-retreat/scdrkh/
> Thoughts??  
> PS: My research interest in NLP/ machine learning methods is taking second priority to helping the "first time user" experience. 
> It is imperative we get this stuff right. 
> On Dec 4, 2013, at 7:09 AM, Tim Miller <ti...@childrens.harvard.edu> wrote:
>> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>> 
>> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>> 
>> Tim
>> 
>> 
>> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>>> The sample constituency parser printer should be working now...
>>> Just copy and paste the text to parser.groovy and make it executable.
>>> All you should need is groovy installed on your machine.
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>> $ parser.groovy input
>>> Reading from directory: input
>>>  (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>>> 
>>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>> 
>>> --Pei
>>>> -----Original Message-----
>>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: RE: cTAKES Groovy...
>>>> 
>>>> That is very cool!
>>>> 
>>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a fantastic
>>>> build/deployment/dependency management tool that is in many ways much
>>>> nicer to work with than Maven, though it plays nicely with Maven (for
>>>> example, it can use Maven repositories). Gradle is also proven technology:
>>>> it's the build tool for the Android operating system.
>>>> ________________________________________
>>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: cTAKES Groovy...
>>>> 
>>>> Tim had a good end user use case:
>>>> I just want to use the ctakes constituency parser and output the tree text to
>>>> console.
>>>> So I was inspired by Richard example of groovy...
>>>> Check out:
>>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>> 
>>>> The groovy script will "Automagically" download the required
>>>> classes,jars,resources and automatically runs.
>>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>>> Sample:
>>>> $ parser.groovy input
>>>> Reading from directory: input
>>>> patient took 50mg of aspirin for pain in knee.
>>>> begin:0 end:48
>>>> 
>>>> Pretty cool, 'eh...
>>>> --Pei
>> 

Re: cTAKES Groovy…Examples? Relatively low effort, potentially game changing

Posted by Andrew McMurry <mc...@gmail.com>.
Most Open Source frameworks come with an "project-examples.zip" folder.  

I can't help but think that the Groovy parser code and ctakes-gui make excellent EXAMPLES for potential users. 
https://svn.apache.org/repos/asf/ctakes/sandbox/

Imagine if each ctakes-component had an example Groovy script that shows how to use each component complete with the pubmed citation for each! 
http://ctakes.apache.org/components.html

Now imagine you could just download a VM and run the examples "out of the box". 
I'll follow up in a separate thread about the VM progress. 

I am passionate about improving the "first time user" experience. 

Why? John Resig (creator of jQuery) gave a convincing (if not damning) synopsis of how open source projects lose users. 
I think our user base could be easily 10X if we follow his advice:  
http://lanyrd.com/2009/harvard-open-source-retreat/scdrkh/

Thoughts??  

PS: My research interest in NLP/ machine learning methods is taking second priority to helping the "first time user" experience. 
It is imperative we get this stuff right. 


On Dec 4, 2013, at 7:09 AM, Tim Miller <ti...@childrens.harvard.edu> wrote:

> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
> 
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
> 
> Tim
> 
> 
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>  (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>> 
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>> 
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>> 
>>> That is very cool!
>>> 
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a fantastic
>>> build/deployment/dependency management tool that is in many ways much
>>> nicer to work with than Maven, though it plays nicely with Maven (for
>>> example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>> 
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree text to
>>> console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>> 
>>> The groovy script will "Automagically" download the required
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>> 
>>> Pretty cool, 'eh...
>>> --Pei
> 


Re: cTAKES Groovy...

Posted by "Chen, Pei" <Pe...@childrens.harvard.edu>.
I originally had it had pure java buffered file writer...
But this should work for win7 (tested)

Sent from my iPhone

> On Dec 6, 2013, at 12:09 PM, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily. 
> 
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
> 
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>        at parser.downloadFile(parser.groovy:99)
>        at parser.run(parser.groovy:64)
> 
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
> 
> -- James
> 
> 
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
> 
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
> 
> Tim
> 
> 
>> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>  (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP 
>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC 
>> (IN in) (NP (NN knee)))))))))(. .)))
>> 
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>> 
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>> 
>>> That is very cool!
>>> 
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>>> fantastic build/deployment/dependency management tool that is in many 
>>> ways much nicer to work with than Maven, though it plays nicely with 
>>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>> 
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree 
>>> text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>> 
>>> The groovy script will "Automagically" download the required 
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>> 
>>> Pretty cool, 'eh...
>>> --Pei
> 

RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Sounds good to me. Thanks!

-----Original Message-----
From: dev-return-2289-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2289-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
Sent: Friday, December 06, 2013 11:36 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Sure, I checked it in under 
ctakes-constituency-parser/scripts/groovy/parser.groovy per my 
understanding of the thread from a few days go about where to put these 
things.
Tim

On 12/06/2013 12:03 PM, Masanz, James J. wrote:
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>          at parser.downloadFile(parser.groovy:99)
>          at parser.run(parser.groovy:64)
>
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>
> -- James
>
>
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>
> Tim
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>    (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP
>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC
>> (IN in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a
>>> fantastic build/deployment/dependency management tool that is in many
>>> ways much nicer to work with than Maven, though it plays nicely with
>>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree
>>> text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei


Re: cTAKES Groovy...

Posted by Tim Miller <ti...@childrens.harvard.edu>.
Sure, I checked it in under 
ctakes-constituency-parser/scripts/groovy/parser.groovy per my 
understanding of the thread from a few days go about where to put these 
things.
Tim

On 12/06/2013 12:03 PM, Masanz, James J. wrote:
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>          at parser.downloadFile(parser.groovy:99)
>          at parser.run(parser.groovy:64)
>
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>
> -- James
>
>
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>
> Tim
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>    (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP
>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC
>> (IN in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a
>>> fantastic build/deployment/dependency management tool that is in many
>>> ways much nicer to work with than Maven, though it plays nicely with
>>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree
>>> text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
An update on how things are going with using cTAKES from groovy.

For my purposes, I switched from using grapes/@Grab annotations, to having the groovy script run against what was extracted from the ctakes convenience binary (apache-ctakes-3.1.1-bin.zip)

I have two scripts. In the first (run_cTAKES.groovy), I set a variable pointing to where cTAKES was extracted to, and another pointing to where the separately downloadable ctakesresources (UMLS dictionary + LVG database) was extracted

Then I run the script. The script adds the following to the classpath dynamically using this.class.classLoader.rootLoader.addURL 
 - almost all [1] the jars from cTAKES' lib directory
 - cTAKES' desc directory
 - cTAKES' resources directory
 - the directory where the separately downloadable ctakesresources was extracted

Then it starts the second script (cTAKES-clinical-pipeline.groovy) with 
evaluate(new File('cTAKES-clinical-pipeline.groovy'));

This is just FYI. I plan to share the scripts once they are in better shape.

-- James

[1] groovy and cTAKES do not play nice out of the box. I get the following if I include all the jars from cTAKES bin distribution

Caught: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
        at org.apache.uima.util.impl.SaxDeserializer_impl.<clinit>(SaxDeserializer_impl.java:54)
        at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:174)
        at org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.java:366)
        at org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.java:347)
        at org.uimafit.factory.ResourceCreationSpecifierFactory.createResourceCreationSpecifier(ResourceCreationSpecifierFactory.java:76)
        at org.uimafit.factory.ResourceCreationSpecifierFactory.createResourceCreationSpecifier(ResourceCreationSpecifierFactory.java:55)
        at org.uimafit.factory.AnalysisEngineFactory.createAnalysisEngineDescription(AnalysisEngineFactory.java:110)
        at cTAKES-clinical-pipeline.run(cTAKES.groovy:74)
        at run_cTAKES.run(run_cTAKES.groovy:71)

So for now I skip adding the x*.jar files from the cTAKES convenience binary to the classpath.


-----Original Message-----
From: dev-return-2311-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2311-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
Sent: Thursday, December 12, 2013 12:00 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

I tried with the small script (buh):

export JAVA_OPTS="-Dgroovy.grape.report.downloads=true $JAVA_OPTS"
HighFire-6:~ bluefire$ ./buh
Resolving dependency: edu.mit.findstruct#findstructapi;0.0.1 {default=[default]}
Preparing to download artifact edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar
Downloaded 13 Kbytes in 2326ms:
  [SUCCESSFUL ] edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar (2311ms)
Please specify input directory

looks ok to me.

-- Richard

On 12.12.2013, at 15:54, Tim Miller <ti...@childrens.harvard.edu> wrote:

> I was able to replicate the error after removing the findstruct directories from my .groovy and .m2 repositories.
> 
> On 12/12/2013 12:22 PM, Masanz, James J. wrote:
>> Shouldn't be firewall - other grapes download fine.
>> 
>> I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of
>> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
>> 
>> And I still get
>> 
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> Very odd.
>> 
>> My script is simply:
>> 
>> #!/usr/bin/env groovy
>> @Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1')
>> import java.io.File;
>> 
>> 		if(args.length < 1) {
>> 			System.out.println("Please specify input directory");
>> 			System.exit(1);
>> 		}
>> 		System.out.println("Input parm is: " + args[0]);
>> 		System.exit(0);

Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
I tried with the small script (buh):

export JAVA_OPTS="-Dgroovy.grape.report.downloads=true $JAVA_OPTS"
HighFire-6:~ bluefire$ ./buh
Resolving dependency: edu.mit.findstruct#findstructapi;0.0.1 {default=[default]}
Preparing to download artifact edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar
Downloaded 13 Kbytes in 2326ms:
  [SUCCESSFUL ] edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar (2311ms)
Please specify input directory

looks ok to me.

-- Richard

On 12.12.2013, at 15:54, Tim Miller <ti...@childrens.harvard.edu> wrote:

> I was able to replicate the error after removing the findstruct directories from my .groovy and .m2 repositories.
> 
> On 12/12/2013 12:22 PM, Masanz, James J. wrote:
>> Shouldn't be firewall - other grapes download fine.
>> 
>> I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of
>> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
>> 
>> And I still get
>> 
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> Very odd.
>> 
>> My script is simply:
>> 
>> #!/usr/bin/env groovy
>> @Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1')
>> import java.io.File;
>> 
>> 		if(args.length < 1) {
>> 			System.out.println("Please specify input directory");
>> 			System.exit(1);
>> 		}
>> 		System.out.println("Input parm is: " + args[0]);
>> 		System.exit(0);

Re: cTAKES Groovy...

Posted by Tim Miller <ti...@childrens.harvard.edu>.
I was able to replicate the error after removing the findstruct 
directories from my .groovy and .m2 repositories.

On 12/12/2013 12:22 PM, Masanz, James J. wrote:
> Shouldn't be firewall - other grapes download fine.
>
> I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
>
> And I still get
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>
> Very odd.
>
> My script is simply:
>
> #!/usr/bin/env groovy
> @Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1')
> import java.io.File;
>
> 		if(args.length < 1) {
> 			System.out.println("Please specify input directory");
> 			System.exit(1);
> 		}
> 		System.out.println("Input parm is: " + args[0]);
> 		System.exit(0);
>
>
> -----Original Message-----
> From: dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of William Karl Thompson
> Sent: Thursday, December 12, 2013 11:06 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
>
> Seems unlikely to be the source of your problem, but could it be a firewall issue?
>
> -----Original Message-----
> From: Richard Eckart de Castilho [mailto:rec@apache.org]
> Sent: Thursday, December 12, 2013 11:04 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Might be a temporary network problem. The artifact is on Maven Central:
>
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
>
> -- Richard
>
> On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
>
>> The story continues:
>>
>> The @GrabResolver line from Richard did the trick for jwnl.
>>
>> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
>>
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [download
>> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>>
>> java.lang.RuntimeException: Error grabbing Grapes -- [download failed:
>> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>>
>> FYI. I will take a look but if anyone has any hints, don't be shy
>>
>>
>> -----Original Message-----
>> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org
>> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On
>> Behalf Of Finan, Sean
>> Sent: Friday, December 06, 2013 2:38 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> Good stuff -  Thanks Richard
>>
>> -----Original Message-----
>> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
>> Sent: Friday, December 06, 2013 3:30 PM
>> To: 'dev@ctakes.apache.org'
>> Subject: RE: cTAKES Groovy...
>>
>> Thanks Richard! That did the trick
>>
>> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
>>
>> Trunk of cTAKES still uses 1.5.2-incubating
>>
>> -----Original Message-----
>> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org
>> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On
>> Behalf Of Richard Eckart de Castilho
>> Sent: Friday, December 06, 2013 2:12 PM
>> To: dev@ctakes.apache.org
>> Subject: Re: cTAKES Groovy...
>>
>> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
>>
>>> I have not solved my issues on my ubuntu server yet where "Error
>>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
>> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
>>
>> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
>>
>> @GrabResolver(name='opennlp.sf.net',
>>       root='http://opennlp.sourceforge.net/maven2')
>>
>> -- Richard
>>


Re: cTAKES Groovy...

Posted by Pei Chen <ch...@apache.org>.
I wonder if it was just a temp network issue/isolated mirror issue-
Have you forced tried another repo/mirror such as http://uk.maven.org/maven2?
 Just to reduce the possible causes...
--Pei


On Thu, Dec 12, 2013 at 12:47 PM, Masanz, James J. <Ma...@mayo.edu>wrote:

> Thanks Richard for the pointer to that page.  I'm sure I will use it in
> future.
>
> I flushed cache - did not help. I finally just copied over
> .groovy/grapes/edu.mit.findstruct from another system and I am up and
> running.
> Will try again in a  few days or weeks when I try another clean install
> test.
>
> -----Original Message-----
> From: dev-return-2307-Masanz.James=mayo.edu@ctakes.apache.org [mailto:
> dev-return-2307-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of
> Richard Eckart de Castilho
> Sent: Thursday, December 12, 2013 11:27 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> I believe that Grape (like Maven) caches failures. It might be necessary to
> delete any cached info on that artifact from your local grape repository
> before you try again. Btw. there you might (or might not) be able to find
> additional information on why the download failed.
>
> Check out the trouble-shooting section in the DKPro Core Groovy recipe
> page:
>
>
> http://code.google.com/p/dkpro-core-asl/wiki/DKProGroovyCookbook#Trouble_shooting
>
> on cache flushing and on enabling verbose information on Grape downloads.
>
> -- Richard
>
> On 12.12.2013, at 15:22, "Masanz, James J." <Ma...@mayo.edu> wrote:
>
> > Shouldn't be firewall - other grapes download fine.
> >
> > I created a short groovy script to just grab findstructapi - I
> copy/pasted the @grab line from from the Groovy Grape section of
> >
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> >
> > And I still get
> >
> > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> > General error during conversion: Error grabbing Grapes -- [download
> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> >
> > java.lang.RuntimeException: Error grabbing Grapes -- [download failed:
> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> >
> > Very odd.
> >
> > My script is simply:
> >
> > #!/usr/bin/env groovy
> > @Grab(group='edu.mit.findstruct', module='findstructapi',
> version='0.0.1')
> > import java.io.File;
> >
> >               if(args.length < 1) {
> >                       System.out.println("Please specify input
> directory");
> >                       System.exit(1);
> >               }
> >               System.out.println("Input parm is: " + args[0]);
> >               System.exit(0);
> >
> >
> > -----Original Message-----
> > From: dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org [mailto:
> dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of
> William Karl Thompson
> > Sent: Thursday, December 12, 2013 11:06 AM
> > To: dev@ctakes.apache.org
> > Subject: RE: cTAKES Groovy...
> >
> > Seems unlikely to be the source of your problem, but could it be a
> firewall issue?
> >
> > -----Original Message-----
> > From: Richard Eckart de Castilho [mailto:rec@apache.org]
> > Sent: Thursday, December 12, 2013 11:04 AM
> > To: dev@ctakes.apache.org
> > Subject: Re: cTAKES Groovy...
> >
> > Might be a temporary network problem. The artifact is on Maven Central:
> >
> >
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> >
> > -- Richard
> >
> > On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu>
> wrote:
> >
> >> The story continues:
> >>
> >> The @GrabResolver line from Richard did the trick for jwnl.
> >>
> >> But I cleared my .groovy/grapes and  .m2/repository and tried running
> parser.groovy and get the following:
> >>
> >> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> >> General error during conversion: Error grabbing Grapes -- [download
> >> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> >>
> >> java.lang.RuntimeException: Error grabbing Grapes -- [download failed:
> >> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> >>
> >> FYI. I will take a look but if anyone has any hints, don't be shy
> >>
> >>
> >> -----Original Message-----
> >> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org
> >> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On
> >> Behalf Of Finan, Sean
> >> Sent: Friday, December 06, 2013 2:38 PM
> >> To: dev@ctakes.apache.org
> >> Subject: RE: cTAKES Groovy...
> >>
> >> Good stuff -  Thanks Richard
> >>
> >> -----Original Message-----
> >> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> >> Sent: Friday, December 06, 2013 3:30 PM
> >> To: 'dev@ctakes.apache.org'
> >> Subject: RE: cTAKES Groovy...
> >>
> >> Thanks Richard! That did the trick
> >>
> >> I'll create a JIRA and update the script including adding a comment
> that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be
> removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update
> Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
> >>
> >> Trunk of cTAKES still uses 1.5.2-incubating
> >>
> >> -----Original Message-----
> >> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org
> >> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On
> >> Behalf Of Richard Eckart de Castilho
> >> Sent: Friday, December 06, 2013 2:12 PM
> >> To: dev@ctakes.apache.org
> >> Subject: Re: cTAKES Groovy...
> >>
> >> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu>
> wrote:
> >>
> >>> I have not solved my issues on my ubuntu server yet where "Error
> >>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
> >>
> >> This has also already been fixed in OpenNLP 1.5.3, so there must be
> some dependency on OpenNLP 1.5.(1|2)-incubating.
> >>
> >> Anyway, you should be able to fix it by adding this to the beginning of
> your Groovy script, in front of the Grapes:
> >>
> >> @GrabResolver(name='opennlp.sf.net',
> >>     root='http://opennlp.sourceforge.net/maven2')
> >>
> >> -- Richard
>
>

RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Thanks Richard for the pointer to that page.  I'm sure I will use it in future.

I flushed cache - did not help. I finally just copied over .groovy/grapes/edu.mit.findstruct from another system and I am up and running.
Will try again in a  few days or weeks when I try another clean install test.

-----Original Message-----
From: dev-return-2307-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2307-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
Sent: Thursday, December 12, 2013 11:27 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

I believe that Grape (like Maven) caches failures. It might be necessary to
delete any cached info on that artifact from your local grape repository 
before you try again. Btw. there you might (or might not) be able to find
additional information on why the download failed.

Check out the trouble-shooting section in the DKPro Core Groovy recipe page:

http://code.google.com/p/dkpro-core-asl/wiki/DKProGroovyCookbook#Trouble_shooting

on cache flushing and on enabling verbose information on Grape downloads.

-- Richard

On 12.12.2013, at 15:22, "Masanz, James J." <Ma...@mayo.edu> wrote:

> Shouldn't be firewall - other grapes download fine.
> 
> I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of 
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> 
> And I still get
> 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> Very odd.
> 
> My script is simply:
> 
> #!/usr/bin/env groovy
> @Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1') 
> import java.io.File;
> 
> 		if(args.length < 1) {
> 			System.out.println("Please specify input directory");
> 			System.exit(1);
> 		}
> 		System.out.println("Input parm is: " + args[0]);
> 		System.exit(0);
> 
> 
> -----Original Message-----
> From: dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of William Karl Thompson
> Sent: Thursday, December 12, 2013 11:06 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Seems unlikely to be the source of your problem, but could it be a firewall issue?
> 
> -----Original Message-----
> From: Richard Eckart de Castilho [mailto:rec@apache.org] 
> Sent: Thursday, December 12, 2013 11:04 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> Might be a temporary network problem. The artifact is on Maven Central:
> 
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> 
> -- Richard
> 
> On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
>> The story continues:
>> 
>> The @GrabResolver line from Richard did the trick for jwnl.
>> 
>> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
>> 
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [download 
>> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: 
>> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> FYI. I will take a look but if anyone has any hints, don't be shy
>> 
>> 
>> -----Original Message-----
>> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Finan, Sean
>> Sent: Friday, December 06, 2013 2:38 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>> 
>> Good stuff -  Thanks Richard
>> 
>> -----Original Message-----
>> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
>> Sent: Friday, December 06, 2013 3:30 PM
>> To: 'dev@ctakes.apache.org'
>> Subject: RE: cTAKES Groovy...
>> 
>> Thanks Richard! That did the trick
>> 
>> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
>> 
>> Trunk of cTAKES still uses 1.5.2-incubating
>> 
>> -----Original Message-----
>> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Richard Eckart de Castilho
>> Sent: Friday, December 06, 2013 2:12 PM
>> To: dev@ctakes.apache.org
>> Subject: Re: cTAKES Groovy...
>> 
>> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
>> 
>>> I have not solved my issues on my ubuntu server yet where "Error 
>>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
>> 
>> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
>> 
>> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
>> 
>> @GrabResolver(name='opennlp.sf.net', 
>>     root='http://opennlp.sourceforge.net/maven2')
>> 
>> -- Richard


Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
I believe that Grape (like Maven) caches failures. It might be necessary to
delete any cached info on that artifact from your local grape repository 
before you try again. Btw. there you might (or might not) be able to find
additional information on why the download failed.

Check out the trouble-shooting section in the DKPro Core Groovy recipe page:

http://code.google.com/p/dkpro-core-asl/wiki/DKProGroovyCookbook#Trouble_shooting

on cache flushing and on enabling verbose information on Grape downloads.

-- Richard

On 12.12.2013, at 15:22, "Masanz, James J." <Ma...@mayo.edu> wrote:

> Shouldn't be firewall - other grapes download fine.
> 
> I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of 
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> 
> And I still get
> 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> Very odd.
> 
> My script is simply:
> 
> #!/usr/bin/env groovy
> @Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1') 
> import java.io.File;
> 
> 		if(args.length < 1) {
> 			System.out.println("Please specify input directory");
> 			System.exit(1);
> 		}
> 		System.out.println("Input parm is: " + args[0]);
> 		System.exit(0);
> 
> 
> -----Original Message-----
> From: dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of William Karl Thompson
> Sent: Thursday, December 12, 2013 11:06 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Seems unlikely to be the source of your problem, but could it be a firewall issue?
> 
> -----Original Message-----
> From: Richard Eckart de Castilho [mailto:rec@apache.org] 
> Sent: Thursday, December 12, 2013 11:04 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> Might be a temporary network problem. The artifact is on Maven Central:
> 
> http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar
> 
> -- Richard
> 
> On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
>> The story continues:
>> 
>> The @GrabResolver line from Richard did the trick for jwnl.
>> 
>> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
>> 
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [download 
>> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: 
>> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
>> 
>> FYI. I will take a look but if anyone has any hints, don't be shy
>> 
>> 
>> -----Original Message-----
>> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Finan, Sean
>> Sent: Friday, December 06, 2013 2:38 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>> 
>> Good stuff -  Thanks Richard
>> 
>> -----Original Message-----
>> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
>> Sent: Friday, December 06, 2013 3:30 PM
>> To: 'dev@ctakes.apache.org'
>> Subject: RE: cTAKES Groovy...
>> 
>> Thanks Richard! That did the trick
>> 
>> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
>> 
>> Trunk of cTAKES still uses 1.5.2-incubating
>> 
>> -----Original Message-----
>> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Richard Eckart de Castilho
>> Sent: Friday, December 06, 2013 2:12 PM
>> To: dev@ctakes.apache.org
>> Subject: Re: cTAKES Groovy...
>> 
>> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
>> 
>>> I have not solved my issues on my ubuntu server yet where "Error 
>>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
>> 
>> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
>> 
>> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
>> 
>> @GrabResolver(name='opennlp.sf.net', 
>>     root='http://opennlp.sourceforge.net/maven2')
>> 
>> -- Richard


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Shouldn't be firewall - other grapes download fine.

I created a short groovy script to just grab findstructapi - I copy/pasted the @grab line from from the Groovy Grape section of 
http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar

And I still get

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]

java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]

Very odd.

My script is simply:

#!/usr/bin/env groovy
@Grab(group='edu.mit.findstruct', module='findstructapi', version='0.0.1') 
import java.io.File;

		if(args.length < 1) {
			System.out.println("Please specify input directory");
			System.exit(1);
		}
		System.out.println("Input parm is: " + args[0]);
		System.exit(0);


-----Original Message-----
From: dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2305-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of William Karl Thompson
Sent: Thursday, December 12, 2013 11:06 AM
To: dev@ctakes.apache.org
Subject: RE: cTAKES Groovy...

Seems unlikely to be the source of your problem, but could it be a firewall issue?

-----Original Message-----
From: Richard Eckart de Castilho [mailto:rec@apache.org] 
Sent: Thursday, December 12, 2013 11:04 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Might be a temporary network problem. The artifact is on Maven Central:

http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar

-- Richard

On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> The story continues:
> 
> The @GrabResolver line from Richard did the trick for jwnl.
> 
> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
> 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download 
> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: 
> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> FYI. I will take a look but if anyone has any hints, don't be shy
> 
> 
> -----Original Message-----
> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 2:38 PM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Good stuff -  Thanks Richard
> 
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> Sent: Friday, December 06, 2013 3:30 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
> 
> Thanks Richard! That did the trick
> 
> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
> 
> Trunk of cTAKES still uses 1.5.2-incubating
> 
> -----Original Message-----
> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Richard Eckart de Castilho
> Sent: Friday, December 06, 2013 2:12 PM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
>> I have not solved my issues on my ubuntu server yet where "Error 
>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
> 
> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
> 
> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
> 
> @GrabResolver(name='opennlp.sf.net', 
>      root='http://opennlp.sourceforge.net/maven2')
> 
> -- Richard
> 


RE: cTAKES Groovy...

Posted by William Karl Thompson <wk...@northwestern.edu>.
Seems unlikely to be the source of your problem, but could it be a firewall issue?

-----Original Message-----
From: Richard Eckart de Castilho [mailto:rec@apache.org] 
Sent: Thursday, December 12, 2013 11:04 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Might be a temporary network problem. The artifact is on Maven Central:

http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar

-- Richard

On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> The story continues:
> 
> The @GrabResolver line from Richard did the trick for jwnl.
> 
> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
> 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download 
> failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: 
> edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> FYI. I will take a look but if anyone has any hints, don't be shy
> 
> 
> -----Original Message-----
> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 2:38 PM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Good stuff -  Thanks Richard
> 
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> Sent: Friday, December 06, 2013 3:30 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
> 
> Thanks Richard! That did the trick
> 
> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
> 
> Trunk of cTAKES still uses 1.5.2-incubating
> 
> -----Original Message-----
> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Richard Eckart de Castilho
> Sent: Friday, December 06, 2013 2:12 PM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
>> I have not solved my issues on my ubuntu server yet where "Error 
>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
> 
> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
> 
> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
> 
> @GrabResolver(name='opennlp.sf.net', 
>      root='http://opennlp.sourceforge.net/maven2')
> 
> -- Richard
> 


Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
Might be a temporary network problem. The artifact is on Maven Central:

http://search.maven.org/#artifactdetails%7Cedu.mit.findstruct%7Cfindstructapi%7C0.0.1%7Cjar

-- Richard

On 12.12.2013, at 15:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> The story continues:
> 
> The @GrabResolver line from Richard did the trick for jwnl.
> 
> But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:
> 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]
> 
> FYI. I will take a look but if anyone has any hints, don't be shy
> 
> 
> -----Original Message-----
> From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 2:38 PM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Good stuff -  Thanks Richard
> 
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
> Sent: Friday, December 06, 2013 3:30 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
> 
> Thanks Richard! That did the trick
> 
> I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.
> 
> Trunk of cTAKES still uses 1.5.2-incubating
> 
> -----Original Message-----
> From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
> Sent: Friday, December 06, 2013 2:12 PM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
>> I have not solved my issues on my ubuntu server yet where "Error 
>> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
> 
> This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.
> 
> Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:
> 
> @GrabResolver(name='opennlp.sf.net', 
>      root='http://opennlp.sourceforge.net/maven2')
> 
> -- Richard
> 


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
The story continues:

The @GrabResolver line from Richard did the trick for jwnl.

But I cleared my .groovy/grapes and  .m2/repository and tried running parser.groovy and get the following:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]

java.lang.RuntimeException: Error grabbing Grapes -- [download failed: edu.mit.findstruct#findstructapi;0.0.1!findstructapi.jar]

FYI. I will take a look but if anyone has any hints, don't be shy


-----Original Message-----
From: dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2299-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
Sent: Friday, December 06, 2013 2:38 PM
To: dev@ctakes.apache.org
Subject: RE: cTAKES Groovy...

Good stuff -  Thanks Richard

-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Friday, December 06, 2013 3:30 PM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

Thanks Richard! That did the trick

I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.

Trunk of cTAKES still uses 1.5.2-incubating

-----Original Message-----
From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
Sent: Friday, December 06, 2013 2:12 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> I have not solved my issues on my ubuntu server yet where "Error 
> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"

This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.

Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:

@GrabResolver(name='opennlp.sf.net', 
      root='http://opennlp.sourceforge.net/maven2')

-- Richard


RE: cTAKES Groovy...

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
Good stuff -  Thanks Richard

-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Friday, December 06, 2013 3:30 PM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

Thanks Richard! That did the trick

I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.

Trunk of cTAKES still uses 1.5.2-incubating

-----Original Message-----
From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
Sent: Friday, December 06, 2013 2:12 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> I have not solved my issues on my ubuntu server yet where "Error 
> grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"

This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.

Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:

@GrabResolver(name='opennlp.sf.net', 
      root='http://opennlp.sourceforge.net/maven2')

-- Richard


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Thanks Richard! That did the trick

I'll create a JIRA and update the script including adding a comment that that @GrabResolver  is only needed for pre-OpenNLP 1.5.3 and should be removed when we upgrade to 1.5.3+. and I'll update CTAKES-191 "Update Apache OpenNLP dependency to 1.5.3" with a  reminder to update the script.

Trunk of cTAKES still uses 1.5.2-incubating

-----Original Message-----
From: dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2297-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Richard Eckart de Castilho
Sent: Friday, December 06, 2013 2:12 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> I have not solved my issues on my ubuntu server yet where 
> "Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"

This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.

Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:

@GrabResolver(name='opennlp.sf.net', 
      root='http://opennlp.sourceforge.net/maven2')

-- Richard


Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 06.12.2013, at 18:01, "Masanz, James J." <Ma...@mayo.edu> wrote:

> I have not solved my issues on my ubuntu server yet where 
> "Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"

This has also already been fixed in OpenNLP 1.5.3, so there must be some dependency on OpenNLP 1.5.(1|2)-incubating.

Anyway, you should be able to fix it by adding this to the beginning of your Groovy script, in front of the Grapes:

@GrabResolver(name='opennlp.sf.net', 
      root='http://opennlp.sourceforge.net/maven2')

-- Richard


Re: cTAKES Groovy...

Posted by "Chen, Pei" <Pe...@childrens.harvard.edu>.
+1 for that. We should also address the TODO comment in there before release...


> On Dec 6, 2013, at 3:01 PM, "Masanz, James J." <Ma...@mayo.edu> wrote:
> 
> 
> Sounds like before publicizing  any groovy scripts we need to have some testing on clean Win and clean *nix systems.
> 
> FYI, after I fixed the typo I had in the script on my Windows 7 machine where I do cTAKES development (and hence has jwnl under my .m2) and set JAVA_OPTS to have enough heap space, I  have the groovy script running fine there.
> 
> I have not solved my issues on my ubuntu server yet where 
> "Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"
> 
> I'll try to get back to that another day.
> 
> Thanks all for the help.
> 
> -----Original Message-----
> From: dev-return-2295-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2295-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 1:46 PM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
> 
> Hi James,
> As Tim states
>> I have it in my .m2 directory
> 
> And I think that is why it is working for Tim.  You may -not- have the same version (if any) in your .m2 directory.  I have had problems maintaining multiple dev versions of cTakes on a single machine because of maven's utilization of the .m2 cache directory.  It is possible, but a pain.  That was an aside ...
> 
> If you do end up having a library in your .m2, then it is possible that grape is not using it by default on your machine (though I don't know why).   You can try the following from http://groovy.codehaus.org/Grape :
> 
> If you find yourself wanting to reuse artifacts that you already have locally in your Maven2 repository, then you can add this line to your ~/.groovy/grapeConfig.xml:
> 
> <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
> 
> 
> 
> 
> 
> Anyway, it sounds like the script is not quite as standalone as it could be.  
> 
> -----Original Message-----
> From: Tim Miller [mailto:timothy.miller@childrens.harvard.edu] 
> Sent: Friday, December 06, 2013 2:19 PM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
> 
> I have it in my .m2 directory timestamped October 2012. I believe the most recent versions of grape will look in m2 and grab from there if it exists.
> Tim
> 
>> On 12/06/2013 02:14 PM, Masanz, James J. wrote:
>> Thanks Sean.
>> 
>> Something doesn't seem to be working for me related to getting dependencies.
>> 
>> I did a wget of the parser.groovy that Tim just checked in today.
>> 
>> Then trying to run that groovy script I get this error:
>> 
>> $  groovy parser.groovy  test-data-for-groovy/
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
>> General error during conversion: Error grabbing Grapes -- [unresolved 
>> dependency: jwnl#jwnl;1.3.3: not found]
>> java.lang.RuntimeException: Error grabbing Grapes -- [unresolved 
>> dependency: jwnl#jwnl;1.3.3: not found]
>> 
>> So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
>> $ grape -V resolve   jwnl  jwnl 1.3.3
>> 
>> I see the following issue was created by opennlp that looks related
>> https://issues.apache.org/jira/browse/OPENNLP-510
>> saying that jwnl:jwnl 1.3.3 is no longer available (!)
>> 
>> What I don't get is why no one else is seeing this error.
>> Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.
>> 
>> Fyi:
>> 
>> $groovy --version
>> Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: 
>> Linux
>> 
>> 
>> -----Original Message-----
>> From: dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Finan, Sean
>> Sent: Friday, December 06, 2013 11:19 AM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>> 
>> Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:
>> 
>> http://blog.retep.org/category/development/java/groovy/
>> 
>> He defines what he calls shift operators for the file operations.
>> 
>> For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.
>> 
>> -----Original Message-----
>> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
>> Sent: Friday, December 06, 2013 12:13 PM
>> To: 'dev@ctakes.apache.org'
>> Subject: RE: cTAKES Groovy...
>> 
>> FYI, the groovy error I was getting was a typo on my part
>> 
>> I had this:
>> out >> new URL(url).openStream()
>> instead of
>> out << new URL(url).openStream()
>> 
>> so it was trying to do a shift operation of some sort
>> 
>> -----Original Message-----
>> From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
>> Sent: Friday, December 06, 2013 11:03 AM
>> To: 'dev@ctakes.apache.org'
>> Subject: RE: cTAKES Groovy...
>> 
>> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>> 
>> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>> 
>> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
>> Reading from directory: test-data-for-groovy
>> Downloading: 
>> http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/
>> resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
>> Caught: groovy.lang.MissingMethodException: No signature of method: 
>> java.io.BufferedOutputStream.rightShift() is applicable for argument 
>> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
>> values: 
>> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
>> Possible solutions: leftShift(java.lang.Object), 
>> leftShift(java.io.InputStream), leftShift([B)
>> groovy.lang.MissingMethodException: No signature of method: 
>> java.io.BufferedOutputStream.rightShift() is applicable for argument 
>> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
>> values: 
>> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
>> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>>         at parser.downloadFile(parser.groovy:99)
>>         at parser.run(parser.groovy:64)
>> 
>> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>> 
>> -- James
>> 
>> 
>> -----Original Message-----
>> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org 
>> [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On 
>> Behalf Of Tim Miller
>> Sent: Wednesday, December 04, 2013 9:09 AM
>> To: dev@ctakes.apache.org
>> Subject: Re: cTAKES Groovy...
>> 
>> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>> 
>> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>> 
>> Tim
>> 
>> 
>>> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>>> The sample constituency parser printer should be working now...
>>> Just copy and paste the text to parser.groovy and make it executable.
>>> All you should need is groovy installed on your machine.
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>> $ parser.groovy input
>>> Reading from directory: input
>>>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) 
>>> (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) 
>>> (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>>> 
>>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>> 
>>> --Pei
>>>> -----Original Message-----
>>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: RE: cTAKES Groovy...
>>>> 
>>>> That is very cool!
>>>> 
>>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>>>> fantastic build/deployment/dependency management tool that is in 
>>>> many ways much nicer to work with than Maven, though it plays nicely 
>>>> with Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>>> it's the build tool for the Android operating system.
>>>> ________________________________________
>>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: cTAKES Groovy...
>>>> 
>>>> Tim had a good end user use case:
>>>> I just want to use the ctakes constituency parser and output the 
>>>> tree text to console.
>>>> So I was inspired by Richard example of groovy...
>>>> Check out:
>>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>> 
>>>> The groovy script will "Automagically" download the required 
>>>> classes,jars,resources and automatically runs.
>>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>>> Sample:
>>>> $ parser.groovy input
>>>> Reading from directory: input
>>>> patient took 50mg of aspirin for pain in knee.
>>>> begin:0 end:48
>>>> 
>>>> Pretty cool, 'eh...
>>>> --Pei
> 

RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Sounds like before publicizing  any groovy scripts we need to have some testing on clean Win and clean *nix systems.

FYI, after I fixed the typo I had in the script on my Windows 7 machine where I do cTAKES development (and hence has jwnl under my .m2) and set JAVA_OPTS to have enough heap space, I  have the groovy script running fine there.

I have not solved my issues on my ubuntu server yet where 
"Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]"

I'll try to get back to that another day.

Thanks all for the help.

-----Original Message-----
From: dev-return-2295-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2295-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
Sent: Friday, December 06, 2013 1:46 PM
To: dev@ctakes.apache.org
Subject: RE: cTAKES Groovy...

Hi James,
As Tim states
> I have it in my .m2 directory

And I think that is why it is working for Tim.  You may -not- have the same version (if any) in your .m2 directory.  I have had problems maintaining multiple dev versions of cTakes on a single machine because of maven's utilization of the .m2 cache directory.  It is possible, but a pain.  That was an aside ...

If you do end up having a library in your .m2, then it is possible that grape is not using it by default on your machine (though I don't know why).   You can try the following from http://groovy.codehaus.org/Grape :

If you find yourself wanting to reuse artifacts that you already have locally in your Maven2 repository, then you can add this line to your ~/.groovy/grapeConfig.xml:

<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>





Anyway, it sounds like the script is not quite as standalone as it could be.  

-----Original Message-----
From: Tim Miller [mailto:timothy.miller@childrens.harvard.edu] 
Sent: Friday, December 06, 2013 2:19 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

I have it in my .m2 directory timestamped October 2012. I believe the most recent versions of grape will look in m2 and grab from there if it exists.
Tim

On 12/06/2013 02:14 PM, Masanz, James J. wrote:
> Thanks Sean.
>
> Something doesn't seem to be working for me related to getting dependencies.
>
> I did a wget of the parser.groovy that Tim just checked in today.
>
> Then trying to run that groovy script I get this error:
>
> $  groovy parser.groovy  test-data-for-groovy/
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [unresolved 
> dependency: jwnl#jwnl;1.3.3: not found]
> java.lang.RuntimeException: Error grabbing Grapes -- [unresolved 
> dependency: jwnl#jwnl;1.3.3: not found]
>
> So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
> $ grape -V resolve   jwnl  jwnl 1.3.3
>
> I see the following issue was created by opennlp that looks related
> https://issues.apache.org/jira/browse/OPENNLP-510
> saying that jwnl:jwnl 1.3.3 is no longer available (!)
>
> What I don't get is why no one else is seeing this error.
> Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.
>
> Fyi:
>
> $groovy --version
> Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: 
> Linux
>
>
> -----Original Message-----
> From: dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 11:19 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
>
> Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:
>
> http://blog.retep.org/category/development/java/groovy/
>
> He defines what he calls shift operators for the file operations.
>
> For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.
>
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> Sent: Friday, December 06, 2013 12:13 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> FYI, the groovy error I was getting was a typo on my part
>
> I had this:
> out >> new URL(url).openStream()
> instead of
> out << new URL(url).openStream()
>
> so it was trying to do a shift operation of some sort
>
> -----Original Message-----
> From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
> Sent: Friday, December 06, 2013 11:03 AM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: 
> http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/
> resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: 
> java.io.BufferedOutputStream.rightShift() is applicable for argument 
> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
> values: 
> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), 
> leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: 
> java.io.BufferedOutputStream.rightShift() is applicable for argument 
> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
> values: 
> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>          at parser.downloadFile(parser.groovy:99)
>          at parser.run(parser.groovy:64)
>
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>
> -- James
>
>
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>
> Tim
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>    (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) 
>> (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) 
>> (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>>> fantastic build/deployment/dependency management tool that is in 
>>> many ways much nicer to work with than Maven, though it plays nicely 
>>> with Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the 
>>> tree text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required 
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei


RE: cTAKES Groovy...

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
Hi James,
As Tim states
> I have it in my .m2 directory

And I think that is why it is working for Tim.  You may -not- have the same version (if any) in your .m2 directory.  I have had problems maintaining multiple dev versions of cTakes on a single machine because of maven's utilization of the .m2 cache directory.  It is possible, but a pain.  That was an aside ...

If you do end up having a library in your .m2, then it is possible that grape is not using it by default on your machine (though I don't know why).   You can try the following from http://groovy.codehaus.org/Grape :

If you find yourself wanting to reuse artifacts that you already have locally in your Maven2 repository, then you can add this line to your ~/.groovy/grapeConfig.xml:

<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>





Anyway, it sounds like the script is not quite as standalone as it could be.  

-----Original Message-----
From: Tim Miller [mailto:timothy.miller@childrens.harvard.edu] 
Sent: Friday, December 06, 2013 2:19 PM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

I have it in my .m2 directory timestamped October 2012. I believe the most recent versions of grape will look in m2 and grab from there if it exists.
Tim

On 12/06/2013 02:14 PM, Masanz, James J. wrote:
> Thanks Sean.
>
> Something doesn't seem to be working for me related to getting dependencies.
>
> I did a wget of the parser.groovy that Tim just checked in today.
>
> Then trying to run that groovy script I get this error:
>
> $  groovy parser.groovy  test-data-for-groovy/
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [unresolved 
> dependency: jwnl#jwnl;1.3.3: not found]
> java.lang.RuntimeException: Error grabbing Grapes -- [unresolved 
> dependency: jwnl#jwnl;1.3.3: not found]
>
> So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
> $ grape -V resolve   jwnl  jwnl 1.3.3
>
> I see the following issue was created by opennlp that looks related
> https://issues.apache.org/jira/browse/OPENNLP-510
> saying that jwnl:jwnl 1.3.3 is no longer available (!)
>
> What I don't get is why no one else is seeing this error.
> Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.
>
> Fyi:
>
> $groovy --version
> Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: 
> Linux
>
>
> -----Original Message-----
> From: dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 11:19 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
>
> Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:
>
> http://blog.retep.org/category/development/java/groovy/
>
> He defines what he calls shift operators for the file operations.
>
> For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.
>
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> Sent: Friday, December 06, 2013 12:13 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> FYI, the groovy error I was getting was a typo on my part
>
> I had this:
> out >> new URL(url).openStream()
> instead of
> out << new URL(url).openStream()
>
> so it was trying to do a shift operation of some sort
>
> -----Original Message-----
> From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
> Sent: Friday, December 06, 2013 11:03 AM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: 
> http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/
> resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: 
> java.io.BufferedOutputStream.rightShift() is applicable for argument 
> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
> values: 
> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), 
> leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: 
> java.io.BufferedOutputStream.rightShift() is applicable for argument 
> types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) 
> values: 
> [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>          at parser.downloadFile(parser.groovy:99)
>          at parser.run(parser.groovy:64)
>
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>
> -- James
>
>
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org 
> [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On 
> Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>
> Tim
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>    (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) 
>> (PP (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) 
>> (PP-LOC (IN in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>>> fantastic build/deployment/dependency management tool that is in 
>>> many ways much nicer to work with than Maven, though it plays nicely 
>>> with Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the 
>>> tree text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required 
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei


Re: cTAKES Groovy...

Posted by Tim Miller <ti...@childrens.harvard.edu>.
I have it in my .m2 directory timestamped October 2012. I believe the 
most recent versions of grape will look in m2 and grab from there if it 
exists.
Tim

On 12/06/2013 02:14 PM, Masanz, James J. wrote:
> Thanks Sean.
>
> Something doesn't seem to be working for me related to getting dependencies.
>
> I did a wget of the parser.groovy that Tim just checked in today.
>
> Then trying to run that groovy script I get this error:
>
> $  groovy parser.groovy  test-data-for-groovy/
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]
> java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]
>
> So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
> $ grape -V resolve   jwnl  jwnl 1.3.3
>
> I see the following issue was created by opennlp that looks related
> https://issues.apache.org/jira/browse/OPENNLP-510
> saying that jwnl:jwnl 1.3.3 is no longer available (!)
>
> What I don't get is why no one else is seeing this error.
> Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.
>
> Fyi:
>
> $groovy --version
> Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: Linux
>
>
> -----Original Message-----
> From: dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
> Sent: Friday, December 06, 2013 11:19 AM
> To: dev@ctakes.apache.org
> Subject: RE: cTAKES Groovy...
>
> Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:
>
> http://blog.retep.org/category/development/java/groovy/
>
> He defines what he calls shift operators for the file operations.
>
> For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.
>
> -----Original Message-----
> From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
> Sent: Friday, December 06, 2013 12:13 PM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> FYI, the groovy error I was getting was a typo on my part
>
> I had this:
> out >> new URL(url).openStream()
> instead of
> out << new URL(url).openStream()
>
> so it was trying to do a shift operation of some sort
>
> -----Original Message-----
> From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
> Sent: Friday, December 06, 2013 11:03 AM
> To: 'dev@ctakes.apache.org'
> Subject: RE: cTAKES Groovy...
>
> Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily.
>
> I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.
>
> C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
> Reading from directory: test-data-for-groovy
> Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
> Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
> groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
> Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
>          at parser.downloadFile(parser.groovy:99)
>          at parser.run(parser.groovy:64)
>
> Anyone run into such an error from groovy? Anyone else running groovy on Win7?
>
> -- James
>
>
> -----Original Message-----
> From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
> Sent: Wednesday, December 04, 2013 9:09 AM
> To: dev@ctakes.apache.org
> Subject: Re: cTAKES Groovy...
>
> Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?
>
> Tim
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>    (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP
>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC
>> (IN in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>>
>> --Pei
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a
>>> fantastic build/deployment/dependency management tool that is in many
>>> ways much nicer to work with than Maven, though it plays nicely with
>>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree
>>> text to console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei


Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
Anybody who has been using OpenNLP via Maven (not Groovy grapes) should already have that in their local .m2 repos. 

While the library is not on Maven Central, OpenNLP fetches it from some other repository that is declared in the OpenNLP POM. I believe that Grape does not take additional repositories declared in the OpenNLP POM into account when resolving artifacts.

Afaik, the next version of OpenNLP will no longer have that dependency because the coreference module that used it has been moved to the attic.

-- Richard

On 06.12.2013, at 17:14, "Masanz, James J." <Ma...@mayo.edu> wrote:

> Thanks Sean.
> 
> Something doesn't seem to be working for me related to getting dependencies.
> 
> I did a wget of the parser.groovy that Tim just checked in today.
> 
> Then trying to run that groovy script I get this error:
> 
> $  groovy parser.groovy  test-data-for-groovy/
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> General error during conversion: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]
> java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]
> 
> So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
> $ grape -V resolve   jwnl  jwnl 1.3.3
> 
> I see the following issue was created by opennlp that looks related
> https://issues.apache.org/jira/browse/OPENNLP-510
> saying that jwnl:jwnl 1.3.3 is no longer available (!)
> 
> What I don't get is why no one else is seeing this error.
> Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.
> 
> Fyi:
> 
> $groovy --version
> Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: Linux


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Thanks Sean.

Something doesn't seem to be working for me related to getting dependencies.

I did a wget of the parser.groovy that Tim just checked in today.

Then trying to run that groovy script I get this error:

$  groovy parser.groovy  test-data-for-groovy/
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: jwnl#jwnl;1.3.3: not found]

So I tried this (I'm no grape expert but a google search led to this suggestion) but it fails:
$ grape -V resolve   jwnl  jwnl 1.3.3

I see the following issue was created by opennlp that looks related
https://issues.apache.org/jira/browse/OPENNLP-510
saying that jwnl:jwnl 1.3.3 is no longer available (!)

What I don't get is why no one else is seeing this error.
Maybe everyone else already had that in their local maven repos? Hard to believe though given OPENNLP-510 is from May 2012.

Fyi:

$groovy --version
Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: Linux


-----Original Message-----
From: dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2288-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Finan, Sean
Sent: Friday, December 06, 2013 11:19 AM
To: dev@ctakes.apache.org
Subject: RE: cTAKES Groovy...

Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:

http://blog.retep.org/category/development/java/groovy/

He defines what he calls shift operators for the file operations.

For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.

-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Friday, December 06, 2013 12:13 PM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

FYI, the groovy error I was getting was a typo on my part

I had this:
out >> new URL(url).openStream()
instead of
out << new URL(url).openStream()

so it was trying to do a shift operation of some sort

-----Original Message-----
From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
Sent: Friday, December 06, 2013 11:03 AM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily. 

I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.

C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
Reading from directory: test-data-for-groovy
Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
        at parser.downloadFile(parser.groovy:99)
        at parser.run(parser.groovy:64)

Anyone run into such an error from groovy? Anyone else running groovy on Win7?

-- James


-----Original Message-----
From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
Sent: Wednesday, December 04, 2013 9:09 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.

I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?

Tim


On 11/27/2013 12:19 PM, Chen, Pei wrote:
> The sample constituency parser printer should be working now...
> Just copy and paste the text to parser.groovy and make it executable.
> All you should need is groovy installed on your machine.
> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
> $ parser.groovy input
> Reading from directory: input
>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP 
> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC 
> (IN in) (NP (NN knee)))))))))(. .)))
>
> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>
> --Pei
>> -----Original Message-----
>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>> Sent: Tuesday, November 26, 2013 10:46 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> That is very cool!
>>
>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>> fantastic build/deployment/dependency management tool that is in many 
>> ways much nicer to work with than Maven, though it plays nicely with 
>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>> it's the build tool for the Android operating system.
>> ________________________________________
>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>> Sent: Tuesday, November 26, 2013 4:13 PM
>> To: dev@ctakes.apache.org
>> Subject: cTAKES Groovy...
>>
>> Tim had a good end user use case:
>> I just want to use the ctakes constituency parser and output the tree 
>> text to console.
>> So I was inspired by Richard example of groovy...
>> Check out:
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>
>> The groovy script will "Automagically" download the required 
>> classes,jars,resources and automatically runs.
>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>> Sample:
>> $ parser.groovy input
>> Reading from directory: input
>> patient took 50mg of aspirin for pain in knee.
>> begin:0 end:48
>>
>> Pretty cool, 'eh...
>> --Pei


RE: cTAKES Groovy...

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
Aside from a crash course almost 10 years ago, I haven't touched groovy very much.  However, if you are having issues with" shifts" and files, you can look here:

http://blog.retep.org/category/development/java/groovy/

He defines what he calls shift operators for the file operations.

For all I know this is where Pei got his code, but it might be worth checking if anybody runs into errors.

-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Friday, December 06, 2013 12:13 PM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

FYI, the groovy error I was getting was a typo on my part

I had this:
out >> new URL(url).openStream()
instead of
out << new URL(url).openStream()

so it was trying to do a shift operation of some sort

-----Original Message-----
From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
Sent: Friday, December 06, 2013 11:03 AM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily. 

I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.

C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
Reading from directory: test-data-for-groovy
Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
        at parser.downloadFile(parser.groovy:99)
        at parser.run(parser.groovy:64)

Anyone run into such an error from groovy? Anyone else running groovy on Win7?

-- James


-----Original Message-----
From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
Sent: Wednesday, December 04, 2013 9:09 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.

I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?

Tim


On 11/27/2013 12:19 PM, Chen, Pei wrote:
> The sample constituency parser printer should be working now...
> Just copy and paste the text to parser.groovy and make it executable.
> All you should need is groovy installed on your machine.
> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
> $ parser.groovy input
> Reading from directory: input
>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP 
> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC 
> (IN in) (NP (NN knee)))))))))(. .)))
>
> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>
> --Pei
>> -----Original Message-----
>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>> Sent: Tuesday, November 26, 2013 10:46 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> That is very cool!
>>
>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>> fantastic build/deployment/dependency management tool that is in many 
>> ways much nicer to work with than Maven, though it plays nicely with 
>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>> it's the build tool for the Android operating system.
>> ________________________________________
>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>> Sent: Tuesday, November 26, 2013 4:13 PM
>> To: dev@ctakes.apache.org
>> Subject: cTAKES Groovy...
>>
>> Tim had a good end user use case:
>> I just want to use the ctakes constituency parser and output the tree 
>> text to console.
>> So I was inspired by Richard example of groovy...
>> Check out:
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>
>> The groovy script will "Automagically" download the required 
>> classes,jars,resources and automatically runs.
>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>> Sample:
>> $ parser.groovy input
>> Reading from directory: input
>> patient took 50mg of aspirin for pain in knee.
>> begin:0 end:48
>>
>> Pretty cool, 'eh...
>> --Pei


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
FYI, the groovy error I was getting was a typo on my part

I had this:
out >> new URL(url).openStream()
instead of 
out << new URL(url).openStream()

so it was trying to do a shift operation of some sort

-----Original Message-----
From: dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Masanz, James J.
Sent: Friday, December 06, 2013 11:03 AM
To: 'dev@ctakes.apache.org'
Subject: RE: cTAKES Groovy...

Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily. 

I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.

C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
Reading from directory: test-data-for-groovy
Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
        at parser.downloadFile(parser.groovy:99)
        at parser.run(parser.groovy:64)

Anyone run into such an error from groovy? Anyone else running groovy on Win7?

-- James


-----Original Message-----
From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
Sent: Wednesday, December 04, 2013 9:09 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.

I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?

Tim


On 11/27/2013 12:19 PM, Chen, Pei wrote:
> The sample constituency parser printer should be working now...
> Just copy and paste the text to parser.groovy and make it executable.
> All you should need is groovy installed on your machine.
> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
> $ parser.groovy input
> Reading from directory: input
>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP 
> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC 
> (IN in) (NP (NN knee)))))))))(. .)))
>
> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>
> --Pei
>> -----Original Message-----
>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>> Sent: Tuesday, November 26, 2013 10:46 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> That is very cool!
>>
>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>> fantastic build/deployment/dependency management tool that is in many 
>> ways much nicer to work with than Maven, though it plays nicely with 
>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>> it's the build tool for the Android operating system.
>> ________________________________________
>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>> Sent: Tuesday, November 26, 2013 4:13 PM
>> To: dev@ctakes.apache.org
>> Subject: cTAKES Groovy...
>>
>> Tim had a good end user use case:
>> I just want to use the ctakes constituency parser and output the tree 
>> text to console.
>> So I was inspired by Richard example of groovy...
>> Check out:
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>
>> The groovy script will "Automagically" download the required 
>> classes,jars,resources and automatically runs.
>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>> Sample:
>> $ parser.groovy input
>> Reading from directory: input
>> patient took 50mg of aspirin for pain in knee.
>> begin:0 end:48
>>
>> Pretty cool, 'eh...
>> --Pei


RE: cTAKES Groovy...

Posted by "Masanz, James J." <Ma...@mayo.edu>.
Tim, could you check that change in you made to not download the big resources, or post it somewhere temporarily. 

I'm having this issue when trying to run the  groovy script (I'm on Windows 7, if that makes a difference) and having it faster might help debug.

C:\using-groovy> groovy  parser.groovy   test-data-for-groovy
Reading from directory: test-data-for-groovy
Downloading: http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-core-res/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip
Caught: groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
groovy.lang.MissingMethodException: No signature of method: java.io.BufferedOutputStream.rightShift() is applicable for argument types: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream) values: [sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74be95bf]
Possible solutions: leftShift(java.lang.Object), leftShift(java.io.InputStream), leftShift([B)
        at parser.downloadFile(parser.groovy:99)
        at parser.run(parser.groovy:64)

Anyone run into such an error from groovy? Anyone else running groovy on Win7?

-- James


-----Original Message-----
From: dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo.edu@ctakes.apache.org] On Behalf Of Tim Miller
Sent: Wednesday, December 04, 2013 9:09 AM
To: dev@ctakes.apache.org
Subject: Re: cTAKES Groovy...

Very cool. I was noticing that it was downloading the umls resources which the parser itself doesn't need -- so I made a change to not grab clinical-pipeline and grab directly the things it was getting through that reference and now it runs even faster with only a 35M initial download.

I'd like to check in my change -- should we keep working out of sandbox or can we maybe put groovy scripts somewhere alongside the projects they belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl, etc.? Any opinions on this?

Tim


On 11/27/2013 12:19 PM, Chen, Pei wrote:
> The sample constituency parser printer should be working now...
> Just copy and paste the text to parser.groovy and make it executable.
> All you should need is groovy installed on your machine.
> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
> $ parser.groovy input
> Reading from directory: input
>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP 
> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC 
> (IN in) (NP (NN knee)))))))))(. .)))
>
> Maybe we could create one that will output UMLS CUI/Codes... and then others could easily modify to their needs.
>
> --Pei
>> -----Original Message-----
>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>> Sent: Tuesday, November 26, 2013 10:46 PM
>> To: dev@ctakes.apache.org
>> Subject: RE: cTAKES Groovy...
>>
>> That is very cool!
>>
>> Since we're talking Groovy, I'd just like make a plug for Gradle, a 
>> fantastic build/deployment/dependency management tool that is in many 
>> ways much nicer to work with than Maven, though it plays nicely with 
>> Maven (for example, it can use Maven repositories). Gradle is also proven technology:
>> it's the build tool for the Android operating system.
>> ________________________________________
>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>> Sent: Tuesday, November 26, 2013 4:13 PM
>> To: dev@ctakes.apache.org
>> Subject: cTAKES Groovy...
>>
>> Tim had a good end user use case:
>> I just want to use the ctakes constituency parser and output the tree 
>> text to console.
>> So I was inspired by Richard example of groovy...
>> Check out:
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>
>> The groovy script will "Automagically" download the required 
>> classes,jars,resources and automatically runs.
>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>> Sample:
>> $ parser.groovy input
>> Reading from directory: input
>> patient took 50mg of aspirin for pain in knee.
>> begin:0 end:48
>>
>> Pretty cool, 'eh...
>> --Pei


Re: cTAKES Groovy...

Posted by Richard Eckart de Castilho <re...@apache.org>.
I'd go along with Pei's argumentation. If it is supposed to go into the JAR,
it should not be in src/(main|test)/xxx.

For DKPro Core, I just these scripts to our wiki for the time being. The
nice thing is that they are self-contained. So they are actually quite 
independent of the release cycle of DKPro Core - or in your case of cTAKES. 

-- Richard

On 04.12.2013, at 14:51, Pei Chen <ch...@apache.org> wrote:

> If we treat groovy as source code, I think maven has a convention of
> putting them in
> src > main
>> java
>> groovy
>> scala
> 
> src > test
>> java
>> groovy
>> scala
> 
> But since we're treating it as scripts, I would opt for the idea of keeping
> it simple and having it as scripts/groovy/*.groovy
> Would be nice to get some input from the other groovy users though...
> 
> --Pei
> 
> 
> 
> On Wed, Dec 4, 2013 at 10:09 AM, Tim Miller <
> timothy.miller@childrens.harvard.edu> wrote:
> 
>> Very cool. I was noticing that it was downloading the umls resources which
>> the parser itself doesn't need -- so I made a change to not grab
>> clinical-pipeline and grab directly the things it was getting through that
>> reference and now it runs even faster with only a 35M initial download.
>> 
>> I'd like to check in my change -- should we keep working out of sandbox or
>> can we maybe put groovy scripts somewhere alongside the projects they
>> belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl,
>> etc.? Any opinions on this?
>> 
>> Tim
>> 
>> 
>> 
>> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>> 
>>> The sample constituency parser printer should be working now...
>>> Just copy and paste the text to parser.groovy and make it executable.
>>> All you should need is groovy installed on your machine.
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>> $ parser.groovy input
>>> Reading from directory: input
>>>  (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP
>>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC (IN
>>> in) (NP (NN knee)))))))))(. .)))
>>> 
>>> Maybe we could create one that will output UMLS CUI/Codes... and then
>>> others could easily modify to their needs.
>>> 
>>> --Pei
>>> 
>>>> -----Original Message-----
>>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: RE: cTAKES Groovy...
>>>> 
>>>> That is very cool!
>>>> 
>>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a
>>>> fantastic
>>>> build/deployment/dependency management tool that is in many ways much
>>>> nicer to work with than Maven, though it plays nicely with Maven (for
>>>> example, it can use Maven repositories). Gradle is also proven
>>>> technology:
>>>> it's the build tool for the Android operating system.
>>>> ________________________________________
>>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>>> To: dev@ctakes.apache.org
>>>> Subject: cTAKES Groovy...
>>>> 
>>>> Tim had a good end user use case:
>>>> I just want to use the ctakes constituency parser and output the tree
>>>> text to
>>>> console.
>>>> So I was inspired by Richard example of groovy...
>>>> Check out:
>>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>> 
>>>> The groovy script will "Automagically" download the required
>>>> classes,jars,resources and automatically runs.
>>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>>> Sample:
>>>> $ parser.groovy input
>>>> Reading from directory: input
>>>> patient took 50mg of aspirin for pain in knee.
>>>> begin:0 end:48
>>>> 
>>>> Pretty cool, 'eh...
>>>> --Pei

Re: cTAKES Groovy...

Posted by Pei Chen <ch...@apache.org>.
If we treat groovy as source code, I think maven has a convention of
putting them in
src > main
> java
> groovy
> scala

src > test
>java
>groovy
>scala

But since we're treating it as scripts, I would opt for the idea of keeping
it simple and having it as scripts/groovy/*.groovy
Would be nice to get some input from the other groovy users though...

--Pei



On Wed, Dec 4, 2013 at 10:09 AM, Tim Miller <
timothy.miller@childrens.harvard.edu> wrote:

> Very cool. I was noticing that it was downloading the umls resources which
> the parser itself doesn't need -- so I made a change to not grab
> clinical-pipeline and grab directly the things it was getting through that
> reference and now it runs even faster with only a 35M initial download.
>
> I'd like to check in my change -- should we keep working out of sandbox or
> can we maybe put groovy scripts somewhere alongside the projects they
> belong to? Maybe in the scripts/ directory or scripts/groovy, scripts/perl,
> etc.? Any opinions on this?
>
> Tim
>
>
>
> On 11/27/2013 12:19 PM, Chen, Pei wrote:
>
>> The sample constituency parser printer should be working now...
>> Just copy and paste the text to parser.groovy and make it executable.
>> All you should need is groovy installed on your machine.
>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>> $ parser.groovy input
>> Reading from directory: input
>>   (TOP (S (NP-SBJ (NN patient)) (VP (VBD took) (NP (NP (NNS 50mg)) (PP
>> (IN of) (NP (NP (NN aspirin)) (PP (IN for) (NP (NP (NN pain)) (PP-LOC (IN
>> in) (NP (NN knee)))))))))(. .)))
>>
>> Maybe we could create one that will output UMLS CUI/Codes... and then
>> others could easily modify to their needs.
>>
>> --Pei
>>
>>> -----Original Message-----
>>> From: William Karl Thompson [mailto:wkt@northwestern.edu]
>>> Sent: Tuesday, November 26, 2013 10:46 PM
>>> To: dev@ctakes.apache.org
>>> Subject: RE: cTAKES Groovy...
>>>
>>> That is very cool!
>>>
>>> Since we're talking Groovy, I'd just like make a plug for Gradle, a
>>> fantastic
>>> build/deployment/dependency management tool that is in many ways much
>>> nicer to work with than Maven, though it plays nicely with Maven (for
>>> example, it can use Maven repositories). Gradle is also proven
>>> technology:
>>> it's the build tool for the Android operating system.
>>> ________________________________________
>>> From: Chen, Pei [Pei.Chen@childrens.harvard.edu]
>>> Sent: Tuesday, November 26, 2013 4:13 PM
>>> To: dev@ctakes.apache.org
>>> Subject: cTAKES Groovy...
>>>
>>> Tim had a good end user use case:
>>> I just want to use the ctakes constituency parser and output the tree
>>> text to
>>> console.
>>> So I was inspired by Richard example of groovy...
>>> Check out:
>>> http://svn.apache.org/repos/asf/ctakes/sandbox/groovy/parser.groovy
>>>
>>> The groovy script will "Automagically" download the required
>>> classes,jars,resources and automatically runs.
>>> No longer requires the user to have any knowledge of UIMA, cTAKES, etc.
>>> Sample:
>>> $ parser.groovy input
>>> Reading from directory: input
>>> patient took 50mg of aspirin for pain in knee.
>>> begin:0 end:48
>>>
>>> Pretty cool, 'eh...
>>> --Pei
>>>
>>
>