본문 바로가기
Computer/NLP

Bert Examples

by hexists 2021. 4. 30.

1) huggingface bert를 많이 사용

huggingface.co/transformers/notebooks.html

 

🤗 Transformers Notebooks

You can find here a list of the official notebooks provided by Hugging Face. Also, we would like to list here interesting content created by the community. I...

huggingface.co

2) best practice: bert를 classification에 사용

colab.research.google.com/github/huggingface/notebooks/blob/master/examples/text_classification.ipynb

 

Text classification on GLUE

Run, share, and edit Python notebooks

colab.research.google.com

- 여러 class로 분류
- 일정량의 학습 데이터가 있으면
- 미리 학습된 bert model에 해당 분류기를 학습시켜서 사용

 

3) bert + kmeans

- 입력을 bert로 embedding 해서 사용

- 두가지 예 모두 Sentence-BERT 사용

 

영어 예

theaidigest.in/how-to-cluster-text-documents-using-bert/

 

How to cluster text documents using BERT - theaidigest.in

Cluster text documents using BERT embeddings and Kmeans. See how you can apply the K-means algorithm on the embedding to cluster documents.

theaidigest.in

한국어 예

github.com/BM-K/KoSentenceBERT#clustering