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....@ctakes.apache.org [mailto:dev-return-2288-Masanz.James=mayo....@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.ja...@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....@ctakes.apache.org [mailto:dev-return-2286-Masanz.James=mayo....@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....@ctakes.apache.org [mailto:dev-return-2270-Masanz.James=mayo....@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:w...@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.c...@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