#216 · Primary category: NLP Tools & Text Processing

BertSimilarity

bert nlp python semantic similarity tensorflow

Computing similarity of two sentences with google's BERT algorithm。利用Bert计算句子相似度。语义相似度计算。文本相似度计算。

Project last updated:03/24/23

GitHub Stars

510

Forks

67

Contributors

1

License

Other

Why we included this project

For anyone curious about how a BERT similarity model actually works internally, this repo is refreshingly concrete. The author walks you through the whole pipeline: both sentences get tokenized, joined with [CLS] and [SEP] markers, run through Google's pretrained Chinese BERT checkpoint, then capped with a dropout layer and a softmax head that outputs similarity and dissimilarity probabilities. The README documents each stage, and the bundled shell scripts handle train, eval, and infer, with a pretrained parameter file included so you can skip training and go straight to inference. The catch is the stack: TensorFlow 1 and the 2018 Chinese BERT model, so treat it as an educational reference or a base to adapt, not something production-ready. If your work involves Chinese pair-matching problems like duplicate-question detection or semantic search, this gives you a solid, readable starting point.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category