brightmart/sentiment_analysis_fine_grain được TopGit xếp vào nhóm dự án mã nguồn mở, với 593 sao trên GitHub, viết chủ yếu bằng Jupyter Notebook. Multi-label Classification with BERT; Fine Grained Sentiment Analysis from AI challenger
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
1.firstly, you need to download pre-trained model from google, and put to a folder(e.g.BERT_BASE_DIR)
chinese_L-12_H-768_A-12 from <a href='https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip'>bert</a>
2.secondly, you need to have training data(e.g. train.tsv) and validation data(e.g. dev.tsv), and put it under a
folder(e.g.TEXT_DIR ). you can also download data from here <a href='https://pan.baidu.com/s/1ZS4dAdOIAe3DaHiwCDrLKw'>data to train bert for AI challenger-Sentiment Analysis</a>.
it contains processed data you can run for both fine-tuning on sentiment analysis and pre-train with Bert.
it is generated by following this notebook step by step:
preprocess_char.ipynb
you can generate data by yourself as long as data format is compatible with
processor SentimentAnalysisFineGrainProcessor(alias as sentiment_analysis);
data format: label1,label2,label3\t here is sentence or sentences\t
it only contains two columns, the first one is target(one or multi-labels), the second one is input strings.
no need to tokenized.
sample:"0_1,1_-2,2_-2,3_-2,4_1,5_-2,6_-2,7_-2,8_1,9_1,10_-2,11_-2,12_-2,13_-2,14_-2,15_1,16_-2,17_-2,18_0,19_-2 浦东五莲路站,老饭店福瑞轩属于上海的本帮菜,交通方便,最近又重新装修,来拨草了,饭店活动满188元送50元钱,环境干净,简单。朋友提前一天来预订包房也没有订到,只有大堂,五点半到店基本上每个台子都客满了,都是附近居民,每道冷菜量都比以前小,味道还可以,热菜烤茄子,炒河虾仁,脆皮鸭,照牌鸡,小牛排,手撕腊味花菜等每道菜都很入味好吃,会员价划算,服务员人手太少,服务态度好,要能团购更好。可以用支付宝方便"
check sample data in ./BERT_BASE_DIR folder
for more detail, check create_model and SentimentAnalysisFineGrainProcessor from run_classifier.py
Pre-train Bert model based on open-souced model, then do classification task
generate raw data: [ADD SOMETHING HERE]
take sure each line is a sentence. between each document there is a blank line.
you can find generated data from zip file.
use write_pre_train_doc() from preprocess_char.ipynb
download cache file of sentiment analysis(tokens are in word level)
train the model:
python train_cnn_fine_grain.py
cache file of TextCNN model was generate by following steps from preprocess_word.ipynb.
it contains everything you need to run TextCNN.
it include: processed train/validation/test set; vocabulary of word; a dict map label to index.
take train_valid_test_vocab_cache.pik and put it under folder of preprocess_word/
raw data are also included in this zip file.
Pre-train TextCNN
pre-train TextCNN with masked language model
python train_cnn_lm.py
fine-tuning for TextCNN
python train_cnn_fine_grain.py
Deploy BERT for online prediction
with session and feed style you can easily deploy BERT.
online prediction with BERT, check more from here
Reference
Bidirectional Encoder Representations from Transformers for Language Understanding
google-research/bert
pengshuang/AI-Comp
AI Challenger 2018
Convolutional Neural Networks for Sentence Classification
brightmart/sentiment_analysis_fine_grain có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho brightmart/sentiment_analysis_fine_grain. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
brightmart/sentiment_analysis_fine_grain có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho brightmart/sentiment_analysis_fine_grain. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
brightmart/sentiment_analysis_fine_grain là gì?
brightmart/sentiment_analysis_fine_grain (brightmart/sentiment_analysis_fine_grain) là dự án Jupyter Notebook trên GitHub. Theo mô tả gốc: Multi-label Classification with BERT; Fine Grained Sentiment Analysis from AI challenger
Đọc thêm về brightmart/sentiment_analysis_fine_grain ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/brightmart/sentiment_analysis_fine_grain là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
sentiment_analysis_fine_grain có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về sentiment_analysis_fine_grain.