Similarity texts

How to compare texts, sort by similarity or greatest commonality?

What you want is called the Levenshtein distance between words.

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

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)
Capture Designer 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 ...