{
    "content": [
        {
            "type": "text",
            "text": "# String::Similarity (perldoc)\n\n## NAME\n\nString::Similarity - calculate the similarity of two strings\n\n## SYNOPSIS\n\nuse String::Similarity;\n$similarity = similarity $string1, $string2;\n$similarity = similarity $string1, $string2, $limit;\n\n## DESCRIPTION\n\n$factor = similarity $string1, $string2, [$limit]\nThe \"similarity\"-function calculates the similarity index of its two arguments. A value of 0\nmeans that the strings are entirely different. A value of 1 means that the strings are\nidentical. Everything else lies between 0 and 1 and describes the amount of similarity\nbetween the strings.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "String::Similarity",
        "section": "",
        "mode": "perldoc",
        "summary": "String::Similarity - calculate the similarity of two strings",
        "synopsis": "use String::Similarity;\n$similarity = similarity $string1, $string2;\n$similarity = similarity $string1, $string2, $limit;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "O",
                "section": "ND",
                "url": "https://www.chedong.com/phpMan.php/man/O/ND/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "String::Similarity - calculate the similarity of two strings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use String::Similarity;\n\n$similarity = similarity $string1, $string2;\n$similarity = similarity $string1, $string2, $limit;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "$factor = similarity $string1, $string2, [$limit]\nThe \"similarity\"-function calculates the similarity index of its two arguments. A value of 0\nmeans that the strings are entirely different. A value of 1 means that the strings are\nidentical. Everything else lies between 0 and 1 and describes the amount of similarity\nbetween the strings.\n\nIt roughly works by looking at the smallest number of edits to change one string into the\nother.\n\nYou can add an optional argument $limit (default 0) that gives the minimum similarity the\ntwo strings must satisfy. \"similarity\" stops analyzing the string as soon as the result\ndrops below the given limit, in which case the result will be invalid but lower than the\ngiven $limit. You can use this to speed up the common case of searching for the most similar\nstring from a set by specifying the maximum similarity found so far.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The basic algorithm is described in:\n\"An O(ND) Difference Algorithm and its Variations\", Eugene Myers,\nAlgorithmica Vol. 1 No. 2, 1986, pp. 251-266;\nsee especially section 4.2, which describes the variation used below.\n\nThe basic algorithm was independently discovered as described in:\n\"Algorithms for Approximate String Matching\", E. Ukkonen,\nInformation and Control Vol. 64, 1985, pp. 100-118.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Marc Lehmann <schmorp@schmorp.de>\nhttp://home.schmorp.de/\n\n(the underlying fstrcmp function was taken from gnu diffutils and\nmodified by Peter Miller <pmiller@agso.gov.au> and Marc Lehmann\n<schmorp@schmorp.de>).\n",
                "subsections": []
            }
        }
    }
}