I have created a Decision Data rule for entity extraction. I am performing NLP using RUTA script in pega. My requirement is to extract policy number from an email.
S- Represents Alphanumeric A- Represents Numeric
Policy Number has format: 1)With Hyphen SS-SSSSSSS-AAA 2)Without Hyphen SS SSSSSSS AAA 3)Without Spaces SSSSSSSSSAAA 4)Optionally This policy number can be prefixed with 1 also.So 1SS-SSSSSSS-AAA, 1SS SSSSSSS AAA and 1SSSSSSSSSAAA are also valid combination.
So policy number has 3 parts; 1st part is of length 2(SS), 2nd part is of length 7(SSSSSSS) and third part is of length 3(AAA). And optionally "1" is fourth part which would be prefixed to policy number.
I have written a script for this but its not working for combination in which policy number is prefixed with 1.