# shibing624/similarity

similarity: Text similarity calculation Toolkit for Java. 文本相似度计算工具包，java编写，可用于文本相似度计算、情感分析等任务，开箱即用。

Repository: https://github.com/shibing624/similarity
Canonical: https://ross.abutalabs.com/products/similarity
Homepage: https://shibing624.github.io/similarity/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: nlp, similarity, sentiment, semantic, java, sim-scores
Last push: 2026-07-16T12:10:21+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 8, longevity 100
- inputs: {"age_days": 3585, "days_push": 48, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1584, forks 343 (observed 2026-08-28T04:05:07.429757+00:00)

## What it is
A Java toolkit for computing text similarity at word, phrase, sentence, and paragraph levels, offering algorithms like Cilin-based similarity, edit distance, cosine similarity, Jaccard, SimHash, and more. It also includes Chinese sentiment analysis, lexicon-based word tendency scoring, and word2vec-based near-word lookup.

## Use cases
- compute similarity between two Chinese words or sentences in Java
- find duplicate or near-duplicate paragraphs with SimHash or cosine similarity
- score the sentiment polarity of Chinese words
- compare strings with edit distance or Jaro-Winkler in a JVM app
- find semantically similar words using a Chinese thesaurus
- build a deduplication or matching feature for Chinese text

## When to choose
- you need text similarity computation in a Java/JVM project
- you work with Chinese text and want thesaurus- or Hownet-based semantic similarity
- you want multiple similarity algorithms behind one simple API
- you need lightweight, dictionary-based sentiment tendency scoring

## When to avoid
- you need neural embedding-based similarity (e.g., BERT/sentence transformers) rather than lexical/semantic-dictionary methods
- your primary language is not Chinese and you need multilingual semantic similarity
- you work in Python or another non-JVM stack

## Facets
- artifact type: library
- maturity: active
- function: nlp, machine-learning
- domain: -
- platform: jvm
- tags: text-similarity, sentiment-analysis, word2vec, edit-distance, cosine-similarity, chinese-nlp, natural-language-processing, text-processing

## Member repositories
- shibing624/similarity (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.429757+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:55:58.934142+00:00, confidence not recorded.
  - readme: https://github.com/shibing624/similarity (fetched 2026-08-28T04:05:07.429757+00:00, sha 734a3b9960bf)
  - homepage: https://shibing624.github.io/similarity/ (fetched 2026-08-29T11:26:23.852401+00:00, sha 32bb9f774aa2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
