ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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
تم إضافة السؤال من قبل Khadijah Shtayat , Technical Lead , Opensooq
تاريخ النشر: 2013/09/18
Abdelmonem Ahmed
من قبل Abdelmonem Ahmed

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

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
من قبل 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.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟