1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c > link > Damerau–Levenshtein distance > 4つの操作にcostの緩急をつける (sWap, Substitution, insertion, Deletion)

Last updated at Posted at 2016-10-21

関連 http://qiita.com/mpyw/items/a4495d476ea9ffe54e16
関連 http://qiita.com/7of9/items/ca66015e2933202decc9

CでのDamerau–Levenshtein distanceの実装。

sWap, Substitution, insertion, Deletionの4種類の操作に対してcostの緩急をつける実装例を見つけた。

ただし、特定の文字('c'だけとか'r'だけとか)にコストの緩急を付ける実装ではない。

上記のコードをベースとして特定文字へ緩急をつける実装に変えるのが近道だろうか。

しかしながら、よく見ると、#include "cache.h"など使っていて、単体で実行するのは面倒そうだ。

1
1
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?