Re: Extract text from line below/above annotated keyword using RUTA

2019-11-06 Thread Peter Klügl
> CW{REGEXP("\\bUnderwriter") -> UnderWriterKeyword}; > CW{REGEXP("Name")->NameKeyword}; > (UnderWriterKeyword SW NameKeyword){->UnderWriterNameKeyword}; > Line{CONTAINS(UnderWriterNameKeyword)} Line -> { >n:CW[1,3]{-> CREATE(UnderWriterName, "

Extract text from line below/above annotated keyword using RUTA

2019-11-06 Thread Shashank Pathak
ame", "value"=n.ct)}; }; Please tell me whether it is possible to achieve this using RUTA or not. Also share steps to get Underwriter's Name, Appraiser's Name/License and Appraisal Comapny Name. I have already posted question similar to this on stackoverflow https://stackoverflow.com/q

Re: Using RUTA

2017-03-31 Thread José Vicente Moyano Murillo
Hi, Thanks Peter for your hard work. Right now we are using BLOCKs and boolean variables to acomplish our objective. And we can say that all works great. Regarding the labels and what can be done; we agree that it is difficult to make a decision. Once again many thanks. 2017-03-22 17:34

Re: Using RUTA

2017-03-22 Thread Peter Klügl
Hi, Am 15.03.2017 um 10:24 schrieb José Vicente Moyano Murillo: > Great explanation Peter, we see all your comments. > Maybe we are doing something wrong to accomplish our pourpouse. > > But regarding labels. Can we discuss this example? > > Document{ -> ADD(list, w1), ADD(list, w2), ADD(list,

Re: Using RUTA

2017-03-16 Thread Peter Klügl
Hi, sorry, I am quite busy these days. Could be that it will take some more days until I can reply to your mail. Best, Peter Am 15.03.2017 um 10:24 schrieb José Vicente Moyano Murillo: > Great explanation Peter, we see all your comments. > Maybe we are doing something wrong to accomplish

Re: Using RUTA

2017-03-15 Thread José Vicente Moyano Murillo
Great explanation Peter, we see all your comments. Maybe we are doing something wrong to accomplish our pourpouse. But regarding labels. Can we discuss this example? Document{ -> ADD(list, w1), ADD(list, w2), ADD(list, w3), ADD(list, w4), CREATE(Detection, "anchors" = list)} <- {

Re: Using RUTA

2017-03-13 Thread Peter Klügl
Hi, Am 13.03.2017 um 17:41 schrieb José Vicente Moyano Murillo: > From our point of view we would expect the same result using # or % Yes, I thought the same, but after investigating the problem I changed my mind a bit. Even if we ignore the label expression overriding the values with 'X's,

Re: Using RUTA

2017-03-13 Thread José Vicente Moyano Murillo
>From our point of view we would expect the same result using # or % In any case it is our idea and the truth is that we do not know how to predict the impact. regards 2017-03-13 10:56 GMT+01:00 Peter Klügl : > Hi, > > > there is a conceptual problem when using label

Re: Using RUTA

2017-03-13 Thread Peter Klügl
Hi, there is a conceptual problem when using label expressions in those conjunct rules. The label expression stores the value of the matched annotations even if the rule element does not match. It has to since the matched annotation may be used to validate the conditions as you do. Maybe the

Re: Using RUTA

2017-02-28 Thread Peter Klügl
hmmm ok, maybe my example for testing the rule was too simple. I will create a more complex example and check the results Peter Am 28.02.2017 um 15:38 schrieb José Vicente Moyano Murillo: > Hi Peter, > > I'm sorry but this example does not work properly. It seems that it is a > problem

Re: Using RUTA

2017-02-28 Thread Peter Kluegl
hmmm ok, maybe my example for testing the rule was too simple. I will create a more complex example and check the results Peter Am 28.02.2017 um 15:38 schrieb José Vicente Moyano Murillo: > Hi Peter, > > I'm sorry but this example does not work properly. It seems that it is a > problem

Re: Using RUTA

2017-02-28 Thread José Vicente Moyano Murillo
Hi Peter, I'm sorry but this example does not work properly. It seems that it is a problem regarding conjunction rules (%) This is our test case and result. We have a book with 5 attributes - name - author - pages - ISBN - Category The rule is validatin name and author. RUTA creates the

Re: Using RUTA

2017-02-28 Thread Peter Kluegl
Hi, operations directly on lists and arrays are on my todo list but not yet implemented. Right now, there are still some options like a variable or restricted assignments. Here's an example with an ANNOTATIONLIST variable: ANNOTATIONLIST list; Book{-> CREATE(NeilsBook, "attributes" =

Re: Using RUTA

2017-02-24 Thread José Vicente Moyano Murillo
Many thanks Peter ¡¡¡ 2017-02-24 9:46 GMT+01:00 Peter Klügl : > Hi, > > > the repo: > > > apache.snapshots > Apache Snapshot Repository > http://repository.apache.org/snapshots > > false > > > > > the folder: > >

Re: Using RUTA

2017-02-24 Thread Peter Klügl
Hi, the repo: apache.snapshots Apache Snapshot Repository http://repository.apache.org/snapshots false the folder: https://repository.apache.org/content/groups/snapshots/org/apache/uima/ruta-core/2.5.1-SNAPSHOT/ Best, Peter Am 23.02.2017 um

Re: Using RUTA

2017-02-23 Thread José Vicente Moyano Murillo
Hi, ruta-core.jar it's enough. It will be fantastic if i could access the snapshot repository. 2017-02-23 13:03 GMT+01:00 Peter Klügl : > Hi, > > > what do you need? Only ruta-core.jar or also the Eclipse plugins/update > site? > > I will prepare a new RC for the next

Re: Using RUTA

2017-02-23 Thread Peter Klügl
Hi, what do you need? Only ruta-core.jar or also the Eclipse plugins/update site? I will prepare a new RC for the next release soon. There should be snapshot artifacts built by jenkins in the snapshot repository. I am out-of-office today so do not have the link right now. (If you want to

Re: Using RUTA

2017-02-22 Thread José Vicente Moyano Murillo
Hi Peter, good morning. Have we any opportunity to get a fixed version? I mean a snapshot or an access to the repo. Regards 2017-02-22 10:38 GMT+01:00 José Vicente Moyano Murillo : > you're right > > % is performing some kind of "or". > > So we will wait for the new release. >

Re: Using RUTA

2017-02-22 Thread José Vicente Moyano Murillo
you're right % is performing some kind of "or". So we will wait for the new release. Many thanks 2017-02-22 9:54 GMT+01:00 Peter Klügl : > I actually wonder why your rules work. I am quite sure that they match > too often, i. e. they match also if only one of the

Re: Using RUTA

2017-02-22 Thread Peter Klügl
I actually wonder why your rules work. I am quite sure that they match too often, i. e. they match also if only one of the conjunct rule elements match. You can simply try that by using a wrong string in the check like "NG" instead of "Neil Gaiman" Anyways, the problem will be fixed in a few

Re: Using RUTA

2017-02-22 Thread Peter Klügl
Thanks. Maybe its just a bug in 2.5.0 I already fixed. I'll investigate it. Am 22.02.2017 um 09:24 schrieb José Vicente Moyano Murillo: > Thank you very much Peter. Your advice was amazing. > > We tried the first option using Conjunct rules and as you said it does not > work with version 2.5.0.

Re: Using RUTA

2017-02-22 Thread José Vicente Moyano Murillo
Thank you very much Peter. Your advice was amazing. We tried the first option using Conjunct rules and as you said it does not work with version 2.5.0. But we change a little your example and it works perfectly witn 2.4.0 and 2.5.0 We use theses examples with success: DECLARE Annotation

Re: Using RUTA

2017-02-21 Thread Peter Klügl
Hi, I'd normally say that you need the conjunt rules construct to specify an AND between two rule element independent of the position: Book{-> NeilsBook}<-{ a1:Attribute{a1.name=="title", a1.ct=="Norse Mythology"} % a2:Attribute{a2.name=="author", a2.ct=="Neil Gaiman"}; };

Using RUTA

2017-02-21 Thread José Vicente Moyano Murillo
Hello everyone I'm planning to use RUTA to create some annotations. But i'm not able to accomplish my objective. This is my case right now: I have a text annotated with some annotations "*Book*". Under "*Book*" annotation i have a few annotations "*Attribute*" that stores some information

Re: Problem matching adjacent annotations using Ruta

2016-03-14 Thread Mario Juric
Hi Peter, Seems we uncovered the problem. It is not directly related to Ruta. We construct our view by mapping content from another view and for the affected documents we insert some text in the same process. We messed up in the mapping process and accidentally mapped some ruta basic

Re: Problem matching adjacent annotations using Ruta

2016-03-14 Thread Peter Klügl
hmm, sounds like a bug. Can you add SPACE to the retained types: RETAINTYPE(WS, SPACE, BREAK); This should not change anything, but... Why did A PERIOD SPACE not match? Do have a have a reproducible example? I promise that I will do something about the visiblity in the next releses. Best,

Problem matching adjacent annotations using Ruta

2016-03-14 Thread Mario Juric
Hi, We try to do a simple match on two adjacent annotations but for some reason it dosen’t always work. The rule looks like this: A B { -> CREATE(C, 2, "prop"="val")}; This work for many documents but not for all. Looking at a failed example document we can see that B starts exactly where A

Re: Error using RUTA from Java

2015-05-21 Thread Peter Klügl
Hi, I must admit that I do not know the source of the problem yet. Either RutaParser.file_input() (or RutaEngine.loadScript/IS()) returns null, but this should cause some other exceptions. Or the linking of mentioned/imported script names in the ruta file does not match the names in the

Re: Error using RUTA from Java

2015-05-21 Thread William Colen
Thank you, Peter. Maybe that is the case. I am not setting any parameter, as follows: TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription(MainTypeSystem); URL url = Resources.getResource(Main.ruta); String scriptText = Resources.toString(url, Charsets.UTF_8);

Re: Error using RUTA from Java

2015-05-21 Thread Peter Klügl
Hi, unfortunately, Ruta.createAnalysisEngineDescription() does not provide the functionality to create a valid descriptor for a multi-script analysis engine. That should be changed and/or the documentation should be extended/updated. Here are some option right now (not tested yet, but I will

Re: Error using RUTA from Java

2015-05-20 Thread Peter Klügl
Hi, I assume that you use UIMA Ruta 2.2.1? Are there any prior exception? I had a similar problem, which should be fixed now. Could be related to the bugs reported in UIMA-4045 or UIMA-4046. Normally, I would assume that there is a syntax error in the additional script causing the module to

Error using RUTA from Java

2015-05-20 Thread William Colen
Hello, We have a Main RUTA script that imports a few children scripts, as follows: PACKAGE cogroo.ruta; TYPESYSTEM BaseTypeSystem; IMPORT opennlp.uima.Token FROM TypeSystem AS cgToken; IMPORT opennlp.uima.Sentence FROM TypeSystem AS cgSentence; SCRIPT Crase; SCRIPT Base; Document{-

Re: Error using RUTA from Java

2015-05-20 Thread William Colen
Thank you, Peter. I was using 2.2.1 and upgraded to 2.3.0 RC2 as you advised, but the error persists. Now I will post the complete stacktrace: Mai 20, 2015 6:56:23 PM org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl callAnalysisComponentProcess(417) GRAVE: Exception occurred