IDEAScript to include @Functions

6 posts / 0 new
Last post
idea_new_user
Offline
Joined: 08/31/2017 - 05:23
IDEAScript to include @Functions

Hello,
Is it possible to include @Functions e.g. @SimiliarPhrase() into IDEAScript?
Thanks and Regards!

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi idea_new_user and welcome to the site.

It is possible to use @Functions in your IDEAScript but unfortunately not all of them.  You can use the @Functions by replacing the @ with an i, so @Left() becomes iLeft().  The problem is IDEA stopped adding this feature for new functions after V8.  So any functions added in V9 or V10 don't have this feature.  In your case the @SimiliarPhrase() I think was added in V10 so it can't be used in IDEAScript.

Brian

idea_new_user
Offline
Joined: 08/31/2017 - 05:23

Hello Brian,
Thanks for your clear explanation. Do you happen to know the alogorithm behind @SimilarPhrase() function?
Thanks and Regards!

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

I am not 100% sure but it is probably the Levenshtein Distance alogorithm.  I have attached a custom function to redo the levenshtein distance for you.  I think the documentation is incorrect as the closer the item is to 0 the more exact it is and a 0 means it is an exact match.

Brian

Eleazar
Offline
Joined: 02/05/2016 - 17:57

I want to use your levenshtein algorithm to compare 2 databases ,names ,each name from a principal DB agains each name of a secondary data base.
there are not common fields on each DB Just the names
regards

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hello Eleazar, which version of IDEA do you have?  I think with 10.1 fuzzy matching has been included in the core functions of IDEA.  So if you have 10.1 or above I can show you how you can do the match.

Brian