Question

2
Replies
914
Views
SOUJANYA11 Member since 2011 2 posts
Infosys Limited
Posted: 1 year ago
Last activity: 1 year 7 months ago
Closed

Email Channel Interface - ruta scripts written for text extraction are not working

Hi Team,

We are implementing e-mail channel for our POC. We want to run text analyzer on our incoming e-mail to parse the email body. As part of that we are creating Decision Data entities and corresponding Text Files with ruta scripts. The challenge we are facing is that the body has content as below.

Hi Team,

Kindly raise a claim with below details.

Policy Number : XXXXXXX

Was there any fatality : Yes

Was there any witness : No etc..

Thanks & Regards,

ABC

So we want to set WasThereAnyFatality property to hold value "Yes", WasThereAnyWitness property to hold value "No" based on the information from email. We have written ruta script in text file with naming convention as EntityRule.FileName.ruta but the script does not seem to work. Your help will be greatly appreciated.

Was there any fatality script looks like below.

PACKAGE uima.ruta.example;

DECLARE VarA,VarB;

W?{REGEXP("(^Was there any fatality :)")-> MARK(VarA)}
SPACE?
W?{REGEXP("[Yes|No]")->MARKB, MARK(EntityType,1,3), UNMARK(VarA),UNMARK(VarB)};

The above script doesn't throw any error but when we test from Decision Data rule it doesn't extract anything when we provide input as "Was there any fatality : Yes".

Our expectation is the property should hold the entire text and we can use WhatComesAfterFirst(:) function to get the exact value.

Kindly help us resolve the issue of parsing data from email body.

Thanks & Regards,

Soujanya

***Edited by Moderator: Pallavi to update platform capability tags***

Pega Intelligent Virtual Assistant Case Management Decision Management
Moderation Team has archived post
Share this page LinkedIn