! different algorithm but here's an attempt ! for sentence similarity (simple item match against each item), nothing for the seq order though which is a shame. USING: kernel math sequences splitting ; : (one-result) ( item seq -- n ) swap [ = ] curry map [ [ ] filter length ] [ length ] bi / ; : sentence-similarity ( sentence sentence -- n ) [ " " split ] bi@ '[ _ (one-result) ] map sum ; ! instead of exact matches, you can change this to use the above algorithm to find partial matches too, and then average later. but this is only on a word-per-word basis and there's nothing to score the order of words.