The sequence similarity formula was created to meet the subsequent criteria:
- A true reflection of lexical similarity – chain with small differences must certanly be recognized as getting close. Particularly, a significant sub-string convergence should suggest increased standard of similarity involving the chain.
- A robustness to changes of phrase purchase- two chain which contain similar keywords, in another type of purchase, must be recognized as are close. Having said that, if a person sequence is simply a random anagram of the characters within the various other, it should (usually) feel thought to be dissimilar.
- Words flexibility – the formula should function not only in English, additionally in many different languages.
Solution
The similarity is actually calculated in three strategies:
- Partition each sequence into a list of tokens.
- Processing the similarity between tokens by using a sequence edit-distance formula (extension ability: semantic similarity dimension utilising the WordNet collection).
- Computing the similarity between two token databases.
There is certainly another debate to suit your resource.
An improved similarity position formula for variable length chain
Many thanks all to suit your help and guidelines.
Martin Xie [MSFT] MSDN society Support | comments to all of us bring or demand rule trial from Microsoft Please be sure you mark the responds as solutions should they help and unmark them should they incorporate no assist.
- Marked as address by Martin_Xie Monday, Sep 26, 2011 8:48 are
All responses
What is the question,explain it much more particular,i have confused with this
As an example «a_logfile.txt» and «logfile_a.txt» must be very similiar and aswell «loga_file.txt» and «logfile.text» not «myText.txt» and «logfile.txt»
In the event it solved your problem,Please simply click «level while Solution» on that post and «level as Helpful». Pleased Programming!
Alright I try it once more 🙂
Better I wish to evaluate filenames and that I need to get a portion wide variety in just how similiar they’ve been. I dont determine if that is feasible whatsoever.
Including a filename «a_filename.txt» and «filename_a.txt» is extremely similiar for us but how may I obtain the exact same consequences programmatically.
Another example filename «file_abc_.txt» and fil_abc_e.txt» is also similiar but yet again how to obtain the lead programmaticaly
That is perhaps more challenging than it appears at first glance.
Check out http://en.wikipedia.org/wiki/String_metrics and follow many backlinks.
Regards David R Every plan sooner becomes rococo, following rubble. – Alan Perlis the only real appropriate measurement of signal high quality: WTFs/minute.
Thanks for visiting MSDN Message Board.
This post shows the answer about: How to calculate the similarity between two words/strings. The algorithm was developed in C# and you may install the trial inside.
The string similarity algorithm was created in order to meet these requirement:
- A real reflection of lexical similarity – chain with lightweight differences should always be seen as are comparable. In particular, a substantial sub-string overlap should point out a higher degree of similarity amongst the strings.
- A robustness to improvement of phrase purchase- two strings that incorporate the exact same phrase, but in a unique purchase, must be thought to be being similar. Alternatively, if one string simply a random anagram of the figures included in the different, then it should (usually) feel recognized as dissimilar.
- Vocabulary independency – the algorithm should work not just in English, but additionally in several dialects.
Option
The similarity try determined in three methods:
- Partition each sequence into a summary of tokens.
- Processing the similarity between tokens by making use of a sequence edit-distance algorithm (extension element: semantic similarity dimension by using the WordNet library).
- Computing the similarity between two token lists.
There is certainly another debate for the research.
A much better similarity standing algorithm for adjustable length chain
Thank you all for your services and guide.
Martin Xie [MSFT] MSDN people service | Feedback to us Have or Request rule test from Microsoft Please be sure you draw the replies as answers as long as they help and unmark all of them as long as they supply no services.
- Marked as answer by Martin_Xie Monday, Sep 26, 2011 8:48 have always been
You will find authored a rule for my project to recognize close names around from databases.
initially we used the DIFFERENCE(string1, string2)>=4 purpose of SQL host however it did not assist me because as an example whenever first farmers only reviews name ended up being «21» and next term is «21 leap road» the end result included two names whereas clearly they don’t also comparable. so the result group of these a query included over 700 principles which was very poor in this situation.
however discover an identical IMPROVEMENT purpose for c# that was almost exactly like SQL type of that work. like it paired the similarity of «asdcdfsdfgdsgdg» and «asdewwetqwetrwe» as Perfect which clearly false.
I quickly produced a category for this concern to get more effective similarity between chain.
title of the lessons is StringCompare and is an introduction to this lessons:
WHAT IS STRING EVALUATE?
StringCompare is a contrasting software for chain. Not an ordinal comparison, but a relative review that identifies how much two strings are comparable or how much not close.
By place the good tradeoff prices you could get good comparison for strings.
THE WAY YOU USE:
1st you ought to setup a case of StringCompare with tradeoff principles or standard tradeoff standards.
Discover 4 prices that can be arranged:
1. MinSimilarityLong:
This is actually the lowest acceptable percentage of similarity between two strings that evaluating with StringCompare. This advantages can be used for chain together with the amount of at least 8.
2. MinSimilarityShort:
This is basically the minimum appropriate portion of similarity between two strings that evaluating with StringCompare. This advantages is employed for chain with the length below 8.
3. MaxToleranceLong:
This is actually the maximum acceptable portion of tolerance between two strings that comparing with StringCompare. This appreciate can be used for strings making use of duration of at the very least 8.
4. MaxToleranceShort:
This is the max acceptable amount of endurance between two strings that researching with StringCompare. This benefits can be used for chain making use of the duration below 8.
* Once you have created a case you are able to call InstanceName.IsEqual (string1, string2) to ascertain the equivalence of two chain.
* Consider your equality was relative to the minSimilarty and maxTolerance you ready prior to.
* start thinking about that greater minSimilarity standards will result in a lot more constrained outcome and vice versa.
* start thinking about that lower maxTolerance prices will result in much more limited effects and vice versa.
Including:
