+ Reply to Thread
Results 1 to 2 of 2

Similarity according to Levenshtein code- how to ignore deletions/insertions?

  1. #1
    Registered User
    Join Date
    11-08-2016
    Location
    Munich, Germany
    MS-Off Ver
    2010
    Posts
    28

    Similarity according to Levenshtein code- how to ignore deletions/insertions?

    Dear all,

    according to Wikipedia, "the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other."

    I have found a code that returns the similarity of two strings according to the Levenshtein Distance. I would like to change the code in such a way that it ignores deletions/insertions, so, for example, the comparison of "apple tree" and "apple trees" returns a similarity value of 100%, whereas "big apple tree" and "big pear tree" returns (14-4)/14=10/14
    I cant really figure out where in this code deletions and insertions are counted, maybe somebody sees it?

    Thank you for your help!


    Please Login or Register  to view this content.
    Source:
    http://www.vbforums.com/showthread.p...wo-words-in-VB
    Last edited by simz92; 01-09-2017 at 09:15 PM. Reason: change of title and code

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Similarity according to Levenshtein- change algorithm so it ignores deletions/addition

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    ** That "code " you posted will not compile nor run as posted. **
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cascade additions or deletions of names through spreadsheets (Tabs)
    By kencoburn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2017, 01:42 PM
  2. Replies: 1
    Last Post: 05-12-2014, 04:25 PM
  3. Quick way to change track changes view options (for deletions)
    By paulkaye in forum Word Formatting & General
    Replies: 4
    Last Post: 02-18-2014, 09:08 AM
  4. Replies: 2
    Last Post: 07-11-2012, 08:58 AM
  5. [SOLVED] Levenshtein Match for Words
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-12-2012, 05:41 PM
  6. Algorithm to change format of specific cells
    By Dave32 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2008, 07:36 PM
  7. [SOLVED] links to workbooks not adjusting for row deletions or additions
    By the1girlgearhead in forum Excel General
    Replies: 1
    Last Post: 07-28-2005, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1