Catalog/text-sorensen-dice

Text

Sørensen-Dice coefficient API

Computes the Sørensen-Dice coefficient over character bigrams, a robust similarity measure for short strings that ignores word order. Answers 'how similar are these strings by shared bigrams?', 'are they near-duplicates?'.

Price$0.02per request
MethodPOST
Route/v1/text/sorensen-dice
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textsorensendicebigramsimilarityfuzzystring-distancematching
API URLhttps://x402.hexl.dev/v1/text/sorensen-dice
Integration docs
Example request
{
  "a": "night",
  "b": "nacht"
}
Example response
{
  "coefficient": 0.25,
  "aBigrams": 4,
  "bBigrams": 4,
  "intersection": 1,
  "interpretation": "different"
}
Input schema
{
  "type": "object",
  "required": [
    "a",
    "b"
  ],
  "properties": {
    "a": {
      "type": "string",
      "examples": [
        "night"
      ]
    },
    "b": {
      "type": "string",
      "examples": [
        "nacht"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}