Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alignment and fix a bug #9

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

kuangkzh
Copy link

  1. Fix bug: The previous levenshtein_distance return 0 when either input is "". Like levenshtein_distance("aaa", "")=0 which should be 3 instead.

  2. Add function:

  • lcs_sequence_idx

  • lcs_string_idx

  • levenshtein_distance_idx

  • edit_distance_idx
    mapping indices from str1 to reference

  • levenshtein_distance(str1, str2, weight) for weighted edit distance.
    All functions are updated with README and unittests.

  1. Format code and doc:
  • Longest common subsequence as lcs_sequence_xxx
  • Longest common substring as lcs_string_xxx
    _xxx including _length, _idx, _of_list.
    For compatibility, all previous function names are all preserved.

kuangkzh and others added 7 commits October 29, 2021 09:42
…_string_xx()。同时保留原有的lcs和lcs2的接口。

2.加入函数lcs_sequence_idx(),lcs_string_idx()返回子串或子序列的下标,反映两段文本的对齐关系。
…-fix-windows-10-install-issues

Import Algorithm - Fixes Windows 10 Install Errors
@kuangkzh kuangkzh force-pushed the master branch 2 times, most recently from e8bceb7 to d9dbf07 Compare February 11, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants