Re: Usage of anchors

2019-08-29 Thread Nikolai Krot
Hi Peter, Thank you for your answer. Is this the relevant issue: https://issues.apache.org/jira/browse/UIMA-3862 ? Honestly, your answer is a revelation for me :) I originally though that matching on literals should be faster because no extra step of preliminary annotation thereof is required. Ca

Re: Using extensions

2019-08-29 Thread Dominik Terweh
Hey, I tried to understand the rules that you suggested and have a few questions (see below). What we have (successfully) implemented so far is a set of rules that change the value of the stored string, in order to produce some kind of expression that is evaluated subsequently: a) replace numbe

Re: Usage of anchors

2019-08-29 Thread Peter Klügl
Hi, Am 29.08.2019 um 15:21 schrieb Nikolai Krot: > Hi Peter, > > thank you for your answer. Can you confirm my understanding (i have certain > difficulty understanding stacked negations) > > * it may be a problem if a literal string in a rule is also an anchor > (either explicitly set by user or s

Re: Usage of anchors

2019-08-29 Thread Nikolai Krot
Hi Peter, thank you for your answer. Can you confirm my understanding (i have certain difficulty understanding stacked negations) * it may be a problem if a literal string in a rule is also an anchor (either explicitly set by user or selected by rule interpreter) Best regards, Nikolai On Thu, A

Re: Usage of anchors

2019-08-29 Thread Peter Klügl
Hi, the second option should be preferred at least until UIMA-3862 is resolved with some additional indexing. It is of course not so problematic if the literal matching condition is not the starting anchor. However, it is still annoying that the rule lements need to be designed according the dyn

Re: Using extensions

2019-08-29 Thread Peter Klügl
Hi, we are using a separate component for dictionary lookup, which can combine multiple dictionaries and can also assign arbitrary feature values. Most language-dependent information is extracted to language-specific dictionaries and some language independent dictionaries. There is a ticket to co

Re: Usage of anchors

2019-08-29 Thread Nikolai Krot
Hi Peter, I have a question about this comment of yours: < ... but the matching using literal string expression is still really inefficient. What do you mean by "inefficient"? Do you mean it is slow? Say, if I want to use a literal in one hundred rules, what is a better strategy: 1) writing the

Re: Using extensions

2019-08-29 Thread Nikolai Krot
Hi Peter, >From *your* perspective, for this particular task of turning written out numbers to their numerical representation, what would be better to implement it as a language extension (= one additional function) or a set of ruta rules? Against language extension speaks the fact that such conve

Re: How to count the number of a special word in a document?

2019-08-29 Thread Dominik Terweh
Hey Baoli, The easiest way to do this is probably using COUNT. 0. Declare Annotations and variables 1. Wrap the word in an annotation: "people"{-> MyAnnotation}; 2. Count occurences: Document{COUNT(MyAnnotation, myvariable)}; 3. Use the value from the variable however you want --> https://uima

How to count the number of a special word in a document?

2019-08-29 Thread B. Li
Hi All, I would like to count the number of a special word (e.g. people) in a document. How can I get it with RUTA? Thanks in advance! Kind regards, Baoli