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
Best
Dominik
Dominik Terweh
Praktikant
DROOMS
Drooms GmbH
Eschersheimer Landstraße 6
60322 Frankfurt, Germany
www.drooms.com
Phone:
Fax:
Mail: [email protected]
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" <[email protected]> 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,
Baoli