Levenshtein Distance

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

http://en.wikipedia.org/wiki/Levenshtein_Distance

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

0123456789abcdefghijklmnopqrstuvwxyz
0123456789abcdefghijklmnopqrstuvwxyz

Sample output:

0

Sample input:_

kitten
sitting

Sample output:

3

Sample input:_

In approximate string matching, the objective is to find matches for short strings, for instance, strings from a dictionary, in many longer texts, in situations where a small number of differences is to be expected. Here, one of the strings is typically short, while the other is arbitrarily long. This has a wide range of applications, for instance, spell checkers, correction systems for optical character recognition, and software to assist natural language translation based on translation memory.The Levenshtein distance can also be computed between two longer strings, but the cost to compute it, which is roughly proportional to the product of the two string lengths, makes this impractical.
In:papproximate:pstring:pmatching,:pthe:pobjective:pis:pto:pfind:pmatches:pfor:pshort:pstrings,:pfor:pinstance,:pstrings:pfrom:pa:pdictionary,:pin:pmany:plonger:ptexts,:pin:psituations:pwhere:pa:psmall:pnumber:pof:pdifferences:pis:pto:pbe:pexpected.:pHere,:pone:pof:pthe:pstrings:pis:ptypically:pshort,:pwhile:pthe:pother:pis:parbitrarily:plong.:pThis:phas:pa:pwide:prange:pof:papplications,:pfor:pinstance,:pspell:pcheckers,:pcorrection:psystems:pfor:poptical:pcharacter:precognition,:pand:psoftware:pto:passist:pnatural:planguage:ptranslation:pbased:pon:ptranslation:pmemory.The:pLevenshtein:pdistance:pcan:palso:pbe:pcomputed:pbetween:ptwo:plonger:pstrings,:pbut:pthe:pcost:pto:pcompute:pit,:pwhich:pis:proughly:pproportional:pto:pthe:pproduct:pof:pthe:ptwo:pstring:plengths,:pmakes:pthis:pimpractical.

Sample output:

214

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1kaki(embed)120.01582010/03/26 11:20:013B / 2B / 7B
2gnibbler120.04492010/03/26 11:57:273B / 2B / 7B

Perl _

RankUserSizeTimeDateStatistics
1gnibbler180.02242010/03/26 11:44:490B / 12B / 5B
2dcutter260.02622010/03/29 20:34:100B / 12B / 14B
3TAKO/j0nKI330.00032010/03/25 03:32:570B / 22B / 10B

Python _

RankUserSizeTimeDateStatistics
1gnibbler210.05572010/03/26 13:16:050B / ?B / ?B
2hallvabo210.05582010/04/01 00:00:570B / 15B / 5B
3recursive220.05892010/03/26 00:31:440B / 15B / 6B
4tobiesque230.04602010/03/25 09:27:410B / 14B / 9B
5JJeep390.05622010/03/26 12:01:410B / 24B / 14B
6showyou420.06062010/03/28 02:10:302B / ?B / ?B

PHP _

RankUserSizeTimeDateStatistics
1gnibbler200.06992010/03/26 13:52:020B / ?B / ?B
2o-cn210.04842010/03/29 10:11:370B / 13B / 8B
3TAKO/j0nKI290.05072010/03/25 03:10:290B / 15B / 14B

Scheme _

RankUserSizeTimeDateStatistics
1kaki(embed)430.04542010/03/26 11:13:240B / 29B / 12B
2kaki(embed)370.22462011/03/28 21:37:150B / 22B / 13B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima(embed)420.89462010/03/26 08:49:580B / 27B / 12B
2youz420.55112010/03/26 23:46:010B / 27B / 12B

Arc _

RankUserSizeTimeDateStatistics
1pooq223.38532010/03/27 05:21:440B / 12B / 8B
2murky-satyr233.37112010/03/27 05:35:454B / 10B / 8B
3youz333.92032010/03/26 23:46:200B / 18B / 13B
4gnibbler343.39622010/03/26 14:07:040B / ?B / ?B

Clojure _

RankUserSizeTimeDateStatistics
1pooq272.94202010/03/27 05:33:250B / 15B / 9B
2murky-satyr272.95762010/03/27 05:45:580B / 15B / 9B
3gnibbler312.93102010/03/26 14:26:370B / ?B / ?B

LilyPond _

RankUserSizeTimeDateStatistics
1KirarinSnow(embed)432.32252010/03/28 09:31:570B / 21B / 21B
2KirarinSnow622.31952010/03/28 09:15:430B / 38B / 23B

Io _

RankUserSizeTimeDateStatistics
1pooq380.17082012/11/13 18:59:310B / 29B / 8B

JavaScript _

RankUserSizeTimeDateStatistics
1ktt240.00042010/03/25 10:34:160B / 17B / 6B
2murky-satyr240.03752010/03/31 01:20:060B / 17B / 6B
3gnibbler250.01562010/03/26 14:55:460B / ?B / ?B
4TAKO/j0nKI280.00032010/03/25 03:15:470B / 18B / 9B

Lua _

RankUserSizeTimeDateStatistics
1pooq420.00222010/08/15 17:22:410B / 20B / 22B

Xtal _

RankUserSizeTimeDateStatistics
1pooq410.06142010/03/27 17:30:560B / 21B / 20B

Icon _

RankUserSizeTimeDateStatistics
1pooq550.05082012/04/05 06:51:090B / 36B / 16B

REXX _

RankUserSizeTimeDateStatistics
1pooq380.04522012/04/12 19:30:410B / 23B / 12B

Cyan _

RankUserSizeTimeDateStatistics
1pooq502.96952010/08/23 18:50:040B / 26B / 24B

Prolog _

RankUserSizeTimeDateStatistics
1pooq470.09952010/03/27 05:56:280B / 28B / 17B
2j2e2xae420.06042025/01/31 18:36:370B / 22B / 17B

Forth _

RankUserSizeTimeDateStatistics
1j2e2xae240.07022025/02/01 08:26:490B / 16B / 1B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*301.81542010/03/26 19:48:262B / 15B / 13B
2gnibbler322.11812010/03/26 14:53:010B / ?B / ?B

Perl6 _

RankUserSizeTimeDateStatistics
1dcutter652.37252010/03/29 20:46:540B / 38B / 21B
2pooq186.53002010/08/10 13:22:270B / 12B / 4B

Erlang _

RankUserSizeTimeDateStatistics
151b(embed)760.38102010/03/28 16:45:480B / 42B / 27B
2gnibbler770.37712010/03/26 14:35:200B / ?B / ?B

J _

RankUserSizeTimeDateStatistics
1pooq250.08652010/03/26 23:41:480B / 14B / 7B

K _

RankUserSizeTimeDateStatistics
1pooq130.06812012/03/19 20:09:490B / 7B / 4B

C _

RankUserSizeTimeDateStatistics
1inaniwa(embed)310.00032010/03/25 13:04:462B / 16B / 13B
2not310.01482010/03/25 20:00:532B / 16B / 13B
3nai(embed)310.00042010/03/25 22:20:322B / 16B / 13B
4msk(rand)370.00032010/03/25 06:46:380B / 20B / 17B

Go _

RankUserSizeTimeDateStatistics
1gnibbler620.02202010/03/26 15:31:240B / ?B / ?B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai (embed)410.13252010/09/20 15:52:450B / 25B / 15B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa(embed)460.00162010/03/25 20:51:310B / 27B / 13B
2rst76(embed)460.03752010/03/28 00:18:120B / 27B / 13B
3Lost_dog(embed)460.02752010/03/28 14:31:540B / 28B / 12B
4TAKO/j0nKI500.00162010/03/25 04:03:240B / 28B / 16B

Java _

RankUserSizeTimeDateStatistics
1gnibbler660.28022010/03/26 13:42:210B / ?B / ?B
2hallvabo660.28892010/04/01 00:06:040B / 46B / 19B
3nattow730.28392010/03/31 13:40:400B / 47B / 25B
4mulder_fbi780.27842010/03/25 06:13:080B / 50B / 27B
5TAKO/j0nKI790.28212010/03/25 04:00:580B / 55B / 23B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*360.04812010/03/30 20:44:190B / 27B / 8B
2gnibbler370.04672010/03/30 16:33:400B / ?B / ?B
3uru480.07052010/03/29 22:34:280B / 32B / 13B

Fortran _

RankUserSizeTimeDateStatistics
1gnibbler440.00032010/03/26 13:27:480B / ?B / ?B

C# _

RankUserSizeTimeDateStatistics
1TAKO/j0nKI1110.16142010/03/26 20:02:110B / 78B / 27B
2Hex1300.19112010/03/26 09:05:310B / ?B / ?B

LMNtal _

RankUserSizeTimeDateStatistics
1pooq591.37692011/03/28 21:08:430B / 37B / 22B

Maxima _

RankUserSizeTimeDateStatistics
1pooq360.22802010/03/27 10:16:340B / 21B / 15B

AWK _

RankUserSizeTimeDateStatistics
1nn210.02032010/03/26 16:19:230B / 8B / 13B

sed _

RankUserSizeTimeDateStatistics
1:)(cheat)(:220.00122010/03/25 05:39:580B / 12B / 7B
2msk240.02382010/03/29 02:00:100B / 12B / 9B
3KirarinSnow(cheat)260.00122010/03/25 13:11:430B / 15B / 8B

jq _

RankUserSizeTimeDateStatistics
1pooq190.03162019/09/24 15:38:290B / ?B / ?B

wake _

RankUserSizeTimeDateStatistics
1murky-satyr280.02002010/08/05 15:05:040B / 7B / 18B
2pooq290.01162010/07/20 13:07:360B / 8B / 18B

bc _

RankUserSizeTimeDateStatistics
1Carlos Gutierrez490.02652010/03/28 13:36:300B / ?B / ?B
2gnibbler500.00122010/03/26 06:08:390B / 31B / 17B
3teebee430.00222011/07/06 07:27:490B / 29B / 11B

Postscript _

RankUserSizeTimeDateStatistics
151b(bin)(embed)210.26642010/03/28 14:29:257B / 12B / 1B
2yshl(bin)(embed)210.26342010/03/28 21:20:519B / 11B / 1B
3yshl(embed)300.26642010/03/28 15:10:120B / 22B / 1B

R _

RankUserSizeTimeDateStatistics
1pooq250.51352010/03/27 11:10:290B / 16B / 9B

QCL _

RankUserSizeTimeDateStatistics
1pooq1150.03762010/03/27 07:58:530B / 89B / 21B

GolfScript _

RankUserSizeTimeDateStatistics
1gnibbler90.12022010/03/26 00:37:310B / ?B / ?B
2KirarinSnow(cheat,bin)130.11292010/03/25 13:27:080B / 6B / 5B
3KirarinSnow(cheat)130.11342010/03/25 13:27:140B / 6B / 5B

gs2 _

RankUserSizeTimeDateStatistics
1whio60.23312017/04/28 03:10:004B / 1B / 1B

FlogScript _

RankUserSizeTimeDateStatistics
1pooq150.12222010/09/09 21:42:560B / 6B / 7B

z80 _

RankUserSizeTimeDateStatistics
1j2e2xae270.04762025/02/01 07:20:3210B / 9B / 5B

Vim _

RankUserSizeTimeDateStatistics
1pla200.43782010/03/31 02:56:570B / 12B / 5B
2nn210.06532010/03/30 11:23:190B / 12B / 7B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr120.09372010/03/26 14:20:210B / 6B / 5B
2gnibbler130.09302010/03/26 13:19:410B / ?B / ?B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr303.42672010/03/31 01:27:530B / 21B / 7B
2gnibbler313.43352010/03/26 14:23:230B / ?B / ?B

Scala _

RankUserSizeTimeDateStatistics
1pooq319.94822011/02/18 05:10:200B / 22B / 9B

Logo _

RankUserSizeTimeDateStatistics
1pooq272.50982011/03/20 00:58:090B / 20B / 2B

Language Ranking_

RankLangUserSizeScore
1gs2whio610000
2GolfScriptgnibbler96666
3Rubykaki(embed)125000
4gorubymurky-satyr125000
5Kpooq134615
6FlogScriptpooq154000
7Perlgnibbler183333
8Perl6pooq183333
9jqpooq193157
10PHPgnibbler203000
11Vimpla203000
12Pythongnibbler212857
13AWKnn212857
14Postscript51b(bin)(embed)212857
15sed:)(cheat)(:222727
16Arcpooq222727
17JavaScriptktt242500
18Forthj2e2xae242500
19Jpooq252400
20Rpooq252400
21Clojurepooq272222
22Logopooq272222
23z80j2e2xae272222
24wakemurky-satyr282142
25BASIC*yuko*302000
26Groovymurky-satyr302000
27Cinaniwa(embed)311935
28Scalapooq311935
29Maximapooq361666
30Pascal*yuko*361666
31Schemekaki(embed)371621
32REXXpooq381578
33Iopooq381578
34Xtalpooq411463
35OCamlm.ukai (embed)411463
36Common LISPkozima(embed)421428
37Luapooq421428
38Prologj2e2xae421428
39LilyPondKirarinSnow(embed)431395
40bcteebee431395
41Fortrangnibbler441363
42Haskellnotogawa(embed)461304
43Cyanpooq501200
44Iconpooq551090
45LMNtalpooq591016
46Gognibbler62967
47Javagnibbler66909
48Erlang51b(embed)76789
49C#TAKO/j0nKI111540
50QCLpooq115521

return to the top page