English
Source / code snippets

Unscharfe Stringvergleiche: Levenshtein-distance to charge

 

p.specht

Unscharfe String-compare
=====================
it is not integrally simply, Inputs with Tippfehlern of computer nevertheless award let. The Levenshtein-Algorithmus allows at least, simple Preller or. Auslassungen To discern. something rather is with Databases The SOUNDEX-function, The though mostly for english optimiert is.

the yellow of egg is the Original-Levenshtein anyway not yet. it missing z.B. a Änderung the "Kostenbewertung" (Variable cost&) in dependence of possible Hörfehlern (y,ü,i,j ; sh sch ; t d ; p b; k g; h _ ), and much other More. here first time a Base-Proc to that rumspielen:
'### P. woodpecker  Nov. 2010;  XProfan 11a Interpreter ###
Window Title "Levenshtein-distance (Stringvergleich)"
Cls @rgb(200,200,100)
print " EINGABETEIL SELBST GESTALTEN!"
waitinput
END

proc LD' Compute Levenshtein-Distance

    parameters s$,t$
    s$=lower$(s$):var m&=len(s$)
    t$=lower$(t $):var n&=len(t $)
    declare d&[m&,n&],i&,j&,cost&,mi&,c&
    case m& = 0 : return n&
    case n& = 0 : return m&
    i&=0 : while i&<=m& : d&[i&,0]=i& : inc i& : endwhile
    j&=0 : while j&<=n& : d&[0,j&]=j& : inc j& : endwhile
    i&=1

    WHILE i&<=m&

        j&=1

        While j&<=n&

            cost&=1
            case Mid$(s$,i&,1)=Mid$(t$,j&,1):cost& = 0
            mi&=d&[i&-1,j&]+1
            c&=d&[i&,j&-1]+1
            case c&<mi& : mi&=c&
            c&=d&[i&-1,j&-1]+cost&
            case c&<mi& : mi&=c&
            d&[i&,j&]=mi&
            inc j&

        EndWhile

        inc i&

    ENDWHILE

    return d&[m&,n&]

Endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
04/10/21  
 




RudiB.

Unscharfe String-compare


the hears itself almost as Heisenbergsche Unschärfe-Relation on.
is me To high....sound however very interestingly.
but this is a problem not time Date with its mighty machines so really To 100% umsetzen can. and the are there Yes now really well....
have me already of these trouble rumgeschlagen. there's particularly time, if you a letters To plenty or Zuwenig in the string/word have, then have You really already lost....there goes only approach and probability . is difficult......
 
XProfan X4
Xprofan X4
Rudolf Beske / München

Hardware: NB Intel I9 - 16GByte RAM
04/10/21  
 




p.specht

there could you too Michael Wodrichs Umsetzung the undertow. "KÖLNER PHONETIK" help! board-Suchbegriff: Kölner Phonetik Soundex
greeting

P.s.: Date using whom MCPA-Algorithmus, velvet adaptiven Improvements.
Description (engl.) on the 2021-04-14 yet here:  [...] 
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
04/14/21  
 




Michael
W.
under "Soundexing" and "Phonetik" there with Wikipedia so some above.
 
Alle Sprachen
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
04/22/21  
 




p.specht

too of Michael there were something to Kölner Phonetik:  [...] 
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/08/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.715 Views

Untitledvor 0 min.
Ernst07/21/21
Glubbfan06/19/21
Uwe ''Pascal'' Niemeier06/13/21
R.Schneider05/28/21
More...

Themeninformationen

this Topic has 3 subscriber:

p.specht (3x)
Michael W. (1x)
RudiB. (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie