rfc:mb_levenshtein

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:mb_levenshtein [2024/09/25 06:17] – Move to Introduction youkidearitairfc:mb_levenshtein [2025/03/08 02:23] (current) – This RFC was declined youkidearitai
Line 3: Line 3:
   * Date: 2024-09-25   * Date: 2024-09-25
   * Author: Yuya Hamada, youkidearitai@gmail.com   * Author: Yuya Hamada, youkidearitai@gmail.com
-  * Status: Draft+  * Status: Declined
   * First Published at: http://wiki.php.net/rfc/mb_levenshtein   * First Published at: http://wiki.php.net/rfc/mb_levenshtein
  
 ===== Introduction ===== ===== Introduction =====
-Multibyte levenshtein distances have required Fearue requests in the past. Therefore, we would like to create the mb_levenshtein function to implement this.+Multibyte levenshtein distances have feature requests in the past. Therefore, we would like to create the mb_levenshtein function to implement this.
  
 ref: [[https://github.com/php/php-src/issues/10180]] ref: [[https://github.com/php/php-src/issues/10180]]
  
-There is a levenshtein function, but it does not support multibyteThereforea multibyte-aware version of the mb_levenshtein function is implemented.+====== Levenshtein distance difference mb_levenshtein vs grapheme_levenshtein ===== 
 +The mb_levenshtein function is the Levenshtein distance in code points. 
 +This is useful for comparing Unicode code points. For examplethis can be used to compare concatenated characters.   
 + 
 +<code> 
 +var_dump(mb_levenshtein("\u{0065}\u{0301}", "\u{00e9}")); // "é" result is 1. 
 +</code> 
 + 
 +Surely, There are times when I want to consider this to be the same. In that case, I will propose grapheme_levenshtein separately.
  
 ===== Proposal ===== ===== Proposal =====
Line 56: Line 64:
  
 ===== Voting ===== ===== Voting =====
-TBD.+<doodle title="Add mb_levenshtein function" auth="Yuya Hamada" voteType="single" closed="true" closeon="2025-03-08T00:00:00Z"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
 ===== Implementation ===== ===== Implementation =====
-TBD.+https://github.com/php/php-src/pull/16043
  
 ===== References ===== ===== References =====
 Userland implementation is here: Userland implementation is here:
   * https://github.com/KEINOS/mb_levenshtein   * https://github.com/KEINOS/mb_levenshtein
-  * https://qiita.com/mpyw/items/2b636827730e06c71e3d#%E5%AE%9F%E8%A3%85 (Japanese page)+
  
  
 ===== Rejected Features ===== ===== Rejected Features =====
 Keep this updated with features that were discussed on the mail lists. Keep this updated with features that were discussed on the mail lists.
rfc/mb_levenshtein.1727245063.txt.gz · Last modified: 2024/09/25 06:17 by youkidearitai