How to compare texts, sort by similarity or greatest commonality?
Similarity texts
And how it works in app inventory? Does it compare texts does that?
AI2 does not have a native block for this.
It does, however, have the primitive block you can use if you want to code your own version of this, based on the easy sample programs at https://people.cs.pitt.edu/~kirk/cs1501/Pruhs/Spring2006/assignments/editdistance/Levenshtein%20Distance.htm
While AI2 does not have a matrix a(i,j) primitive data type, you can simulate one using a dictionary with JOIN(i, ',', j) as a key.
Are you up to coding this?
Here's the AI2 blocks implementation of Levenshtein distance.
Thanks for a fun project.
(Corrected version)
Levenshtein_distance.aia (6.0 KB)
(procedure is draggable)
Why do you have such
and i have only such
The blue button on the JOIN block lets you add extra sockets.
Every block with sockets has a right click option to switch between external and internal sockets.
I chose internal sockets to show the structure of my dictionary keys better.
"Inline Inputs"
Thanks, it was so helpful, I've missed it for a long time ...