Assigning null value using assignment operator is not working. -Uima Ruta

54 Views Asked by At

I tried to Assign a null value for a String using arithmetic operator but It's not working. It's assigning the previous value.

Sample Input:

Hi, How are you?  1
I'm Fine          2

Sample Script:

PACKAGE uima.ruta.example;

DECLARE Page(STRING Id);
DECLARE PageId;
"Hi, How are you\\?  1"->Page;
"I'm Fine          2"->Page;
"1"{->PageId};

    BLOCK(foreach)Page{}
      {                      
        STRING pageid="null";
        PageId{->MATCHEDTEXT(pageid),LOG("PageId"+pageid)};
        Page{->Page.Id=pageid};
      } 

enter image description here

1

There are 1 best solutions below

1
On

It's worked when I used

STRING pageid;

ASSIGN(pageid,"null");

PACKAGE uima.ruta.example;

DECLARE Page(STRING Id);
DECLARE PageId;
"Hi, How are you\\?  1"->Page;
"I'm Fine          2"->Page;
"1"{->PageId};

    BLOCK(foreach)Page{}
      {        

        STRING pageid;
        ASSIGN(pageid,"null");
        PageId{->MATCHEDTEXT(pageid),LOG("PageId"+pageid)};
        Page{->Page.Id=pageid};
      }