Webアプリエンジニア養成読本 Advent Calendar 2014 - Qiita ã®24æ¥ç®ã§ãã12/24ã®23:40ã®æç¹ã§æ¸ãå§ãã¦ããã®ã§è¨±ãã¦ãã£ã³
- ä½è : åç°è£ä»,ç³ç°çµ¢ä¸(uzulla),ããããã¾ãã®ã,æè¤ç¥ä¸é
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2014/03/11
- ã¡ãã£ã¢: 大åæ¬
- ãã®ååãå«ãããã° (5件) ãè¦ã
ãã®ã¢ããã³ãã«ã¬ã³ãã¼ã§ Gemライブラリ作ってこ! - すがブロ ã¨ãã話ãæ¸ãã¾ããã ãã®ç¶ãã¨ããããã§ã¯ããã¾ããããå°ãåã«Gemã©ã¤ãã©ãªãä½æããã®ã§ãã®è©±ããããã¨æãã¾ãã
ä½ãä½ã£ãã®ã
レーベンシュタイン距離 - Wikipedia ã¨ããæåå士ã®ç·¨éè·é¢ã調ã¹ãã¢ã«ã´ãªãºã ãå®è£
ããã®ã§ããã
ä¾ãã°ãaaa
㨠aab
ã¯1æåå¤æ´ããã¨åãæååãä½æã§ããã®ã§ãç·¨éè·é¢ã1ã¨ãããã¨ã«ãªãã æ¯è¼çä¼¼ã¦ããæååã§ãã ã¨ããã®ããããã¾ãã
ã¤ãã§ã«ãç·¨éè·é¢ã調ã¹ãã ãã§ã¯ãªãã調ã¹ããåèªã¨ãè¾æ¸ãã¼ã¿ï¼åèªç¾¤ï¼ãå¼æ°ã§æ¸¡ãã¨ãåèªã«æãè¿ãè¾æ¸ãã¼ã¿ã®åèªãæ¢ãã¦ããã¨ãããããããã¦ï¼ãæ©è½ãä½ã£ã¦ã¿ã¾ããã
$ gem i divergence_meter --no-document Fetching: divergence_meter-1.0.1.gem (100%) Successfully installed divergence_meter-1.0.1 1 gem installed $ pry [1] pry(main)> require 'divergence_meter' => true [2] pry(main)> DivergenceMeter.ããããã¦('__sand__', %w(send __send__ hoge)) => "__send__"
å®è£ èªä½ã¯ä¸è¨ã®Wikipediaã«ä¹ã£ã¦ããæ¬ä¼¼ã³ã¼ããRubyã«èªã¿æ¿ããã ããªã®ã§å¤§ãã¦é£ããããã¾ãããããã©ããããå®è£ ããå¾ã§æ°ãã¤ããã®ã§ãã
編集距離が近いメソッドを勝手に呼ぶ - hitode909の日記
ã¨ã
編集距離 (Levenshtein Distance) - naoyaのはてなダイアリー
ã¨ãã§èªããã¦ãã¦ãããä½å¨é ãã®ãã¿ã ã£ããã ãã¨ããæãã§ãããã¹ãã±ã¼ã¹ã®ææã¨ãã¦ããããåèã«ããã¦ããã ãã¾ããã
ããã¡ãªã¿ã«ãã®ã¢ã«ã´ãªãºã ãå®è£ ããç®çã¯ããã®æç« ã®ãããªé·æã®æååãã誤åè±åãè¦ã¤ããããªãããªã¨æã£ã¦ä½ã£ã¦ã¿ãã®ã§ããã
ãã§ã«ãããã®ä½ã£ã¦ã©ãããã®åé¡
èªåã«ã¨ã£ã¦ã¯ããã®ã¢ã«ã´ãªãºã ãå®è£ ããã®ã¯åãã¦ã®çµé¨ã ã£ãã®ã§è¯ãã®ã§ããããããè»è¼ªã®åçºæã£ã¦ã¤ãã§ãããä½ãä¸ã§å¦ã³ããããªãè¯ããããªãããã¨ããæãã§ããããã¨ãå人çãªãã¼ãºã¨ãã¦ãGemã©ã¤ãã©ãªã«ãªã£ã¦ããã¨é½åãè¯ãã£ãã¨ããã®ãããã¾ã*1ã
ãã§ã«ãããã®ãä½ã£ã¦ã©ãããã®ãã¨ããèè¤ãããã«ã¯ããã¾ããããã®åéã§ä¸ææãããããªéå¿ããã人ã¯å¥ã¨ãã¦ãèªåã®çµé¨ã®ããã«ä½ã£ã¦ãè¯ãã¨æãã¾ãã®ã§ã«ã¸ã¥ã¢ã«ã«ä½ã£ã¦ã¿ãã®ãè¯ãã®ããªãã¨æãã¾ãã
ã¡ãªã¿ã«Gemã©ã¤ãã©ãªã®ååã®ç±æ¥ã¯
ç·¨éè·é¢ãä¸çç·å¤åç*2ã¨ç½®ãæãã¦ã¿ããé¢ç½ãããªã¼ã¨ããæã£ã次第ã§ãã
æ¸ããªãã¦ã¯ãªããªã宣ä¼
- ä½è : åç°è£ä»,ç³ç°çµ¢ä¸(uzulla),ããããã¾ãã®ã,æè¤ç¥ä¸é
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2014/03/11
- ã¡ãã£ã¢: 大åæ¬
- ãã®ååãå«ãããã° (5件) ãè¦ã
ãã®æ¬ãèªãã ãã¨ãä½ãã³ã¼ããæ¸ãã¦ã¿ãããã©ã¤ãã¤ãæ¸ããã®ãæãã¤ããªããï¼ãã¨ããæ¹ã¯ãä¸è¨ã®ã¬ã¼ãã³ã·ã¥ã¿ã¤ã³è·é¢ã®ãããªç°¡åãªã¢ã«ã´ãªãºã ãèªåã§Rubyã®ã³ã¼ãã«ç¿»è¨³ãã¦ã¿ããã¨ããã®ããã£ã¦ã¿ãã¨æå¤ã¨é¢ç½ãããããã¾ãããã
enjoy!
*1:å½åGitHubã«ã ãå ¬éãã¦ãã®ã§ãããã¡ãã£ã¨äºæ ããã£ã¦RubyGemsã«ãã¢ãããã¾ãã
*2:ã·ã¥ã¿ã¤ã³ãºã²ã¼ãã§ã°ã°ã£ã¦ã¿ã¦ãã ãã