Product Design, Manufacturing & Innovation Resources
家 » オンラインツール » 文字列比較アルゴリズム(または文字列類似性)

文字列比較アルゴリズム(または文字列類似性)

コーディングでは、2 つの文字列が完全に等しいかどうかを比較するよりも賢い方法 (「abc」==「abd」?) が必要な場合、例えば最初の文字列が 2 番目の文字列とどれだけ異なるか (ユーザーがタイプミスのあるものを入力した場合など) を知りたい場合、それぞれに長所と短所があったり、特殊なケース向けに作られたりしている、いくつかのアルゴリズムから選択できます。

このサイトはまさにそのためにあります。2つのサンプル文字列を入力すると、複数のアルゴリズムを適用して違いを教えてくれます。識別したい文字列に応じて、数回のテストで、適用すべき最適なアルゴリズムと閾値がわかります。このサイトはこれらすべてを一度にテストし、文字列の類似度をパーセンテージで返します。

  • レーベンシュタイン
  • ニードルマンランチ
  • スミス・ウォーターマン
  • スミス・ウォーターマン・ゴトー
  • スミス・ウォーターマン・ゴトーウィンドウド・アフィン
  • ヤロ
  • ヤロ・ウィンクラー
  • Qグラムの距離
  • ブロック距離
  • コサイン類似度
  • ユークリッド距離
  • チャップマン長偏差
  • 重なり係数

(一部はあなたの好きなプログラミング言語に直接統合できますが、一部は外部ライブラリが必要であったり、自分でコーディングする必要があるものもあります。)

注:このサイトはCloudflareのようなボットブロックの壁の背後にあり、煩わしいですが、特に目立った点はありません(私たちにとっては見苦しいスクリーンショットを除けば)。

分野: コンピュータサイエンス、データサイエンス、バイオインフォマティクス、言語学、ソフトウェアエンジニアリング。
Free alternative to Diffchecker, Beyond Compare, Python difflib.
Strings Comparison Algorithms compared with Diffchecker, Beyond Compare and Python difflib
Strings Comparison AlgorithmsDiffcheckerBeyond ComparePython difflib
What it measures: The page takes two sample strings and runs 13 algorithms at once, returning a similarity percentage for each. You can then pick the algorithm and the threshold that fit your data.What it measures: The vendor describes core side-by-side comparison of two texts or files, plus Redline and folder or batch comparison on paid plans. The pricing page does not mention selectable similarity metrics.What it measures: The vendor describes comparison of folders, text files, images and tables, with syntax highlighting and comparison rules for documents and source code.What it measures: SequenceMatcher.ratio() returns a float between 0 and 1 computed as 2.0*M/T, where M is the number of matches and T the total number of elements in both sequences.
Algorithm basis: The list includes Levenshtein, Needleman-Wunsch, Smith-Waterman (with Gotoh variants), Jaro, Jaro-Winkler, q-grams, block distance, cosine similarity, Euclidean distance, Chapman length deviation and overlap coefficient. Edit-distance and alignment methods sit side by side.Algorithm basis: The matching method is described as a little fancier than the Ratcliff-Obershelp gestalt algorithm. The documentation does not mention Levenshtein distance.
Use in code: Some of the listed algorithms ship with common languages, while others need external libraries or your own implementation.Use in code: Separate API plans allow the comparison engine to be embedded in other applications.Use in code: A scripting language is offered to automate syncs.Use in code: It belongs to the Python standard library. get_close_matches(word, possibilities, n=3, cutoff=0.6) returns the best candidates. Worst-case time is quadratic, and strings of 200 or more items trigger an automatic junk heuristic that can be disabled with autojunk=False.
Licence, cost and platform: The page runs in the browser and sits behind a bot-blocking wall. A price or licence is not stated in the material available.Licence, cost and platform: The Basic plan is free with no file size limit, but many Pro features are capped at about 5 to 10 uses monthly. Pro with desktop app is a paid per-seat plan, and the desktop app runs on Windows, Mac and Linux.Licence, cost and platform: A per-user licence in Standard and Pro editions is a one-time purchase with no annual renewal fees. It runs on Windows, macOS and Linux and can be evaluated for free.Licence, cost and platform: No separate cost, since it ships with Python. The documentation is under the Python Software Foundation License Version 2.

取り上げるトピック: 文字列比較、文字列類似度、レーベンシュタイン距離、ニードルマン・ウンシュ距離、スミス・ウォーターマン距離、ジャロ距離、ジャロ・ウィンクラー距離、Qグラム距離、ブロック距離、コサイン類似度、ユークリッド距離、チャップマン長偏差、重複係数、アルゴリズム、閾値、類似度パーセンテージ、タイプミス検出 ISO/IEC 30170、ISO/IEC 24765、ISO/IEC 25010、ISO/IEC 25012、および ISO/IEC 25051。

もっと コーディング, テキスト関連 tools

おすすめのオンラインツールを教えてください。

上記のウェブサイトよりも優れた、補完的な、あるいは代替となるウェブサイトをご存知ですか?

> こちらから提案してください <

10年目 周年

フルサイズの画像とダウンロードは、登録会員のみが100%無料で利用できます。