Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can I compare two text to approximate match in TCL scripting language?

set text1 "compare text1 " set text2 "compare text2" Then text1 have one difference with text2 so the match is99% Is there anyway in tcl to do that

user-image
Question ajoutée par Khadijah Shtayat , Technical Lead , Opensooq
Date de publication: 2013/09/18
Abdelmonem Ahmed
par Abdelmonem Ahmed

:) http://rosettacode.org/wiki/Levenshtein_distance#Tcl

Utilisateur supprimé
par Utilisateur supprimé

better to use

using array to get the value and calculate a string length..\ use the string length in for loop and compare the asic value of the characters

 

krishna majhi
par krishna majhi , Oracle Consultant / Developer , schlumberger (Contract by MPH/GNRS)

find the minimum length string. Let it be text1 and length in N

now for C=N to1 find the sub string from both strings  starting with position1 to C

When the string matches calculate the % by calculating (C/N)*100.

The answer is generic hope you can find TCL code for it.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?