top of page
- API -

similarity = reaper.AZ_CalcStringPartialSimilarity(targetText, sourceText)

- API Detail-

▼Input values

  • targetText(string): target string

  • sourceText(string): string to compare against

▼Output values

  • similarity(number): similarity


the similarity is higher when the target string is contained within the comparison string

- SCRIPT -

dofile(reaper.AZ_GetLuaInitPath())

require("reaper_AZSTOKE_SILVER")


text1 = "株式会社エーゼットストーク"


textList = {

    "AZSTOKE",

    "えーぜっとすとーく",

    "オーソット",

    "エーゼット",

    "エーットストー",

    "株式会社エーゼットストーク",

}


for i, text2 in pairs(textList) do

    similarity = reaper.AZ_CalcStringPartialSimilarity(text1, text2)

    Msg(text1 .. " VS " .. text2 .. " : " .. similarity)


end


STRING

AZ_CalcStringPartialSimilarity

Supported versions:

1.4.0

onwards

Calculate partial string similarity

bottom of page