Skip to content

Conversation

@vhenzl
Copy link
Contributor

@vhenzl vhenzl commented Feb 19, 2022

Aligns Utils::suggestionList() with the current version of suggestionList() from the reference implementation.

Adds the LexicalDistance class to calculate the distance between strings. The built-in levenshtein function can't be used as it doesn't support transpositions.

Options with the same length are ordered lexicographically.

See #999 (comment) for context.

@vhenzl vhenzl force-pushed the align-suggestion-list branch from d68c87b to 3202bc4 Compare February 19, 2022 01:05
Copy link
Collaborator

@spawnia spawnia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. Thanks for working with me to adapt this code to idiomatic PHP.

@spawnia spawnia merged commit b6ac0ff into webonyx:master Mar 14, 2022
@vhenzl vhenzl deleted the align-suggestion-list branch March 15, 2022 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants