{"uid":"cap_mrALkAvXbuq8p0kV0GQxA","slug":"s-rensen-dice-bigram-similarity-c3f909f6","name":"Sørensen-Dice Bigram Similarity","description":"Sørensen-Dice similarity coefficient in [0,1] over character bigrams — robust to word order and minor edits.","url":"https://similarity.openverbs.com/v1/dice","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","maxLength":20000,"description":"First string."},"b":{"type":"string","maxLength":20000,"description":"Second string."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cgnM51cgm0B6lNWwJQgVx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Sørensen-Dice similarity coefficient (0–1) between two strings using character bigrams, robust to word-order variation and minor edits.","exampleAgentPrompt":"What's the Dice bigram similarity score between 'Barack Obama' and 'Obama Barack' — I want a number from 0 to 1 that handles the word-order flip gracefully.","exampleUseCases":[{"title":"Deduplication of product catalog entries","prompt":"I have two product names — 'Samsung Galaxy S23 Ultra 256GB' and 'Galaxy S23 Ultra Samsung 256GB' — can you give me their Dice similarity score so I can decide whether to merge them in my catalog?"},{"title":"Plagiarism screening for submitted essays","prompt":"Score the Dice bigram similarity between these two essay paragraphs for me: 'The quick brown fox jumps over the lazy dog' and 'The lazy dog was jumped over by a quick brown fox' — I need a 0-to-1 number."},{"title":"Fuzzy address matching for record linkage","prompt":"How similar are '123 Main Street Apt 4B' and '123 Main St, #4B' using Dice bigram similarity? I'm trying to link records across two databases."}],"resultDescription":"A floating-point Dice coefficient in the range [0, 1], where 0 means no shared bigrams and 1 means the two strings are identical in bigram composition. The score is symmetric and tolerant of word-order differences.","failureModes":["Missing required fields 'a' or 'b' returns a validation error","Strings exceeding 20,000 characters are rejected","Empty string inputs may produce a score of 0 or cause an error","Network/payment failure if x402 payment is not properly handled"],"whenToPreferThis":"Choose this endpoint when you need a similarity score that is robust to word-order permutations and minor character-level edits, and when an intuitive 0–1 score (rather than a raw edit distance) is required. Prefer it over Levenshtein when word order may vary (e.g. name fields), and over Jaccard when you want bigram-level granularity rather than token-level. Use Jaro-Winkler instead if prefix matching matters most (e.g. autocomplete).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:14.327Z","isFirstParty":false}