简体   繁体   中英

UIMA RUTA - Annotation

I need to declare several annotation types. To do this I've added dictionaries to "resources" folder. Each dictionary contains a list of utterances and meanings, ex. (Actions.csv):

  1. cancel;CANCEL;
  2. cancellation;CANCEL;
  3. canceled;CANCEL;
  4. delete;CANCEL;
  5. stop;CANCEL;
  6. close;CANCEL;
  7. terminate;CANCEL;
  8. termination;CANCEL;

When I run my code - nothing happens, neither annotation types declared, nor results in.xmi file. Can you please help me, and explain where is my problem? Thank you in advance

Here is my code:

PACKAGE com.omilia.entertask;

DECLARE WORD;
W{->MARK(WORD)};

DECLARE CARD;
W{REGEXP("card")->MARK(CARD)};

INT count_words;
Document {TOTALCOUNT (WORD,1,10,count_words)};

// Dictionaries

WORDTABLE Actions ='Actions.csv';
DECLARE Annotation Action (STRING meaning);
Document {-> MARKTABLE (Action, 1, Actions, "meaning" = 2)};

在此处输入图像描述

I tried your Ruta script in the Eclipse workbench. I simple create a new Ruta project and put the files on the correct location (example.ruta, Action.csv and input.txt). I didn't create or modify any other files. After that I select the example.ruta file and choose "Run as -> UIMA Ruta". The input.txt.xmi file is correctly generated and marked the correct annotations.

So you script seems to be ok. Are all the files on the correct location? Don't you see any errors/exceptions?

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM