A pretrained Korean-specific BERT model developed by Computational Linguistics Lab at Seoul National University.
It is based on our character-level KR-BERT model which utilize WordPiece tokenizer.
The four classes of intensity values include: None (no intensity value), High, Medium and Low. These values show how strong the sentiment is in the token.
The training data for this model is expanded from those of KR-BERT, texts from Korean Wikipedia, and news articles, by addition of legal texts crawled from the National Law Information Center and Korean Comments dataset. This data expansion is to collect texts from more various domains than those of KR-BERT. The total data size is about 12.37GB, consisting of 91M and 1.17B words.
The user-generated comment dataset is expected to have similar stylistic properties to the task datasets of NSMC and HSD. Such text includes abbreviations, coinages, emoticons, spacing errors, and typos. Therefore, we added the dataset containing such on-line properties to our existing formal data such as news articles and Wikipedia texts to compose the training data for KR-Medium. Accordingly, KR-Medium reported better results in sentiment analysis than other models, and the performances improved with the model of the more massive, more various training data.
This model’s vocabulary size is 20,000, whose tokens are trained based on the expanded training data using the WordPiece tokenizer.
KR-Medium is trained for 2M steps with the maxlen of 128, training batch size of 64, and learning rate of 1e-4, taking 22 hours to train the model using a Google Cloud TPU v3-8.
TensorFlow
BERT tokenizer, character-based model (download)
PyTorch
You can import it from Transformers!
transformers == 4.0.0
tensorflow < 2.0
Movie Review Classification on Naver Sentiment Movie Corpus (NSMC)
Hate Speech Detection (Moon et al., 2020)
tensorflow
After downloading our pre-trained models, put them in a models directory.
Set the output directory (for fine-tuning)
Select task name: NSMC for Movie Review Classification, and HATE for Hate Speech Detection