← all repositories

terrifyzhao/bert-utils

A Python utility library wrapping Google BERT for sentence embedding generation, text classification, and similarity computation.

1.7k stars Python Language ModelsML Frameworks
bert-utils
Velocity · 7d
+0.6
★ / day
Trend
steady
star history

This repository simplifies Google BERT for common NLP tasks. It provides a BertVector class that generates sentence embeddings from pretrained Chinese BERT models without fine-tuning, and a BertSim class for fine-tuning-based text classification and similarity tasks. Users load a pretrained Chinese BERT checkpoint and call encode with text lists to obtain embeddings, or train classifiers on their own labeled datasets.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.