uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Terweh <d.ter...@drooms.com>
Subject Re: How to count the number of a special word in a document?
Date Thu, 29 Aug 2019 07:33:39 GMT
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.apache.org/d/ruta-current/tools.ruta.book.html#ugr.tools.ruta.language.conditions.count


Dominik Terweh


Drooms GmbH
Eschersheimer Landstra├če 6
60322 Frankfurt, Germany

Mail: d.terweh@drooms.com

Subscribe to the Drooms newsletter
>>> https://drooms.com/en/newsletter?utm_source=newslettersignup&utm_medium=emailsignature

Drooms GmbH; Sitz der Gesellschaft / Registered Office: Eschersheimer Landstr. 6, D-60322
Frankfurt am Main; Geschaeftsfuehrung / Management Board: Alexandre Grellier;
Registergericht / Court of Registration: Amtsgericht Frankfurt am Main, HRB 76454; Finanzamt
/ Tax Office: Finanzamt Frankfurt am Main, USt-IdNr.: DE 224007190

´╗┐On 29.08.19, 09:14, "B. Li" <csblli@126.com> wrote:

    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,


View raw message