I am not able to get the below one working whereas the one below is working just fine. The issue here is that the first dictionary field OrgName is being populated as expected but the second dictionary column Supressedsub is not working. what am I doing incorrectly?
I am completely sure that the pattern is working fine because the unknown tokens(+) are getting extracted perfectly. The issue is with the concatenation of the classifications tokens. whenever, I am trying to concatenate classifications tokens the entire string is getting lost hence its not coming up. this includes orgname variable as well. When I try to populate with a simple copy command the dictionary fields and variables are getting populated but when I am trying to concatenate they are getting truncated to null and hence nothing is coming up. I am yet to investigate the retype at the end of the pattern and see if that is causing this issue. Ill check that tomorrow. However, do you reckon anything else that I could investigate upon?
Can you please post some examples of data and Pattern Action Language you are using? There are so many possibilities that a specific example should help us help you.
Just before pattern matching I am capturing the modified patterns in modpattern. Following modpattern population I am capturing a pattern(my first 2 patterns) to handle strings like the below example. I have verified multisuburb is getting the value Y
INPUT: "ABC ABC WASHINGTON PVT LTD"
OUTPUT Orgname: ABC ABC PVT LTD
Supressedsub: WASHINGTON
INPUT: " ABC ABC NEW YORK PVT LTD"
OUTPUT: Orgname:"ABC ABC PVT LTD"
Supressedsub is not at all getting populated.
Are New and York both classified as B?
Could it be getting caught by another pattern (or default handling)you have that just pushes the + + O O to OrgName?
It's not a 5-minute task, but I once went through AUNAME and AUADDR and put a DBG field in with a corresponding function that appended a code for every pattern that was ever hit on the way through the PAT.
Proved invaluable for times like this when stuff just doesn't make sense. Most times I wasn't hitting the pattern I thought I was.
yes, both New and york are classified as B in previous step and also at the same point where the tokens are classified as B, multisuburb is set to "Y" so that I can identify the retyped tokens and source tokens.
There is no chance of other pattern catching in between because this is happening with the first pattern and same thing is repeating till the last one. By the way what is DBG field?
I added my own field into the DCT file.
Then I wrote a subroutine to append a string to it.
I called that subroutine as the first line of every pattern in the PAT file (unless it called a subroutine, in which case I had to manually append the pattern code).
Can you show us the bit where you re-classified them as B?
Stuart - your question about the retyping solved my problem. I had retyped the operands with empty variable hence it was getting empty values in the field.