Re: [rules-users] To accumulate or not to accumulate

2011-08-22 Thread Bruno Freudensprung
Hi Wolfgang, I finally decided to test different implementations: * first based on an accumulation function * second (your suggestion) relying on drools to 1) build all SentenceWindows then to 2) locate ManualAnnotations inside those Windows * third (your suggestion as well)

Re: [rules-users] To accumulate or not to accumulate

2011-08-19 Thread Wolfgang Laun
There are some details that one should consider before deciding on a particular implementation technique. - Are all Sentences contiguous, i.e., s1.end = pred( s2.start ) - Can a ManualAnnotation start on one Sentence and end in the next or any further successor? As in all problems where

Re: [rules-users] To accumulate or not to accumulate

2011-08-19 Thread Bruno Freudensprung
Hi Wolfgang, Thanks for your answer. Sentences are not contiguous (might be some space characters in between) but manual annotations cannot overlap sentences (interpret overlap in terms of Drools Fusion terminology). If I had an inside operator, do you think the following accumulate option

Re: [rules-users] To accumulate or not to accumulate

2011-08-19 Thread Wolfgang Laun
How would you write buildwindows, given that its action method would be called once for each Sentence, in random order? It's very simple to write a very small set of rules to construct all SentenceWindow facts of size 1 and then to extend them to any desired size, depending on some parameter. 1.

Re: [rules-users] To accumulate or not to accumulate

2011-08-19 Thread Bruno Freudensprung
I am not sure I understand what you mean by random order but I guess it has to do with my ArrayList result type. What I had in mind is to put all sentences in a TreeSet during the action method, and finally issue an ArrayList result object by iterating over the TreeSet and grouping sentences.

Re: [rules-users] To accumulate or not to accumulate

2011-08-19 Thread Wolfgang Laun
2011/8/19 Bruno Freudensprung bruno.freudenspr...@temis.com ** I am not sure I understand what you mean by random order but I guess it has to do with my ArrayList result type. What I had in mind is to put all sentences in a TreeSet during the action method, and finally issue an ArrayList