Assigning penalty in FlexiLayoutstudio depending on the distance to the next word

  • 31 Views
  • Last Post 13 hours ago
Reinhard posted this 3 weeks ago

Hello,

in the advanced post-search relations of the fields in the SearchElement tree I can assign a penalty depending on the value of X via the function FuzzyQuality: X, {F1,F2,F3,F4}. For instance I can assign a penalty of a fifty-thousandth for each dot distance from the left side of the actual field to the right side of another field via the code:

if not kwShipToParty.IsNull then
{
   FuzzyQuality: Rect.Right - kwShipToParty.Rect.Left, {-10000, 0, 0, 50000}*dt;
}

Is there a possibility to use the FuzzyQuality function in order to penalize words that are surrounded immediately by characters? For instance this would help to find a zip code of 5 digits without finding the 5 digits in the IBAN or in a telephone number. Can someone help me with this question?

PS: The activation of "WholeWordMode: true;" doesn't help since I search the zip code with a regular expression that allows for country code before the 5 digits (for instance "SK-"[0-9]{5}|...) and with the activation of "WholeWordMode: true;" the regular expression doesn't work anymore.

Attached Files

Order By: Standard | Newest | Votes
Ekaterina posted this 1 weeks ago

Hello,

To find ZiP code we recommend to find all long digital strings in the searching area and exclude them from capturing

Reinhard posted this 6 days ago

Hello Ekaterina,

thank you for your reply. My problem is more general. I want to make sure that a word is found "alone" and not inside of another word. The ZIP code was just an example. I had several situations, where some special text/characters was found inside other text/characters. And as descriped in my question above, there are a lot of situations, where the activation of "WholeWordMode: true;" doesn't help. I was wondering if it would be possible to work with White Gaps on such a small space. But I thought that the best solution would be to penalize the word if it was found inside another word. I just have no idea how to do it. :-)

Kind regards

Reinhard

Ekaterina posted this 13 hours ago

Hello,

Could you please send us your samples images and FLS project?

Close