All Projects → cdj0311 → Keras_bert_classification

cdj0311 / Keras_bert_classification

Bert-classification and bert-dssm implementation with keras.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Keras bert classification

Lstm Cnn classification
Stars: ✭ 64 (-4.48%)
Mutual labels:  lstm, text-classification
automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-35.82%)
Mutual labels:  text-classification, lstm
Icdar 2019 Sroie
ICDAR 2019 Robust Reading Challenge on Scanned Receipts OCR and Information Extraction
Stars: ✭ 202 (+201.49%)
Mutual labels:  lstm, text-classification
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (+70.15%)
Mutual labels:  lstm, text-classification
Multi Class Text Classification Cnn Rnn
Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow.
Stars: ✭ 570 (+750.75%)
Mutual labels:  lstm, text-classification
Document Classifier Lstm
A bidirectional LSTM with attention for multiclass/multilabel text classification.
Stars: ✭ 136 (+102.99%)
Mutual labels:  lstm, text-classification
Reuters-21578-Classification
Text classification with Reuters-21578 datasets using Gensim Word2Vec and Keras LSTM
Stars: ✭ 44 (-34.33%)
Mutual labels:  text-classification, lstm
Context
ConText v4: Neural networks for text categorization
Stars: ✭ 120 (+79.1%)
Mutual labels:  lstm, text-classification
Textclassificationbenchmark
A Benchmark of Text Classification in PyTorch
Stars: ✭ 534 (+697.01%)
Mutual labels:  lstm, text-classification
Zhihu Text Classification
[2017知乎看山杯 多标签 文本分类] ye组(第六名) 解题方案
Stars: ✭ 392 (+485.07%)
Mutual labels:  lstm, text-classification
Pytorch Rnn Text Classification
Word Embedding + LSTM + FC
Stars: ✭ 112 (+67.16%)
Mutual labels:  lstm, text-classification
Tensorflow Sentiment Analysis On Amazon Reviews Data
Implementing different RNN models (LSTM,GRU) & Convolution models (Conv1D, Conv2D) on a subset of Amazon Reviews data with TensorFlow on Python 3. A sentiment analysis project.
Stars: ✭ 34 (-49.25%)
Mutual labels:  lstm, text-classification
sarcasm-detection-for-sentiment-analysis
Sarcasm Detection for Sentiment Analysis
Stars: ✭ 21 (-68.66%)
Mutual labels:  text-classification, lstm
medical-diagnosis-cnn-rnn-rcnn
分别使用rnn/cnn/rcnn来实现根据患者描述,进行疾病诊断
Stars: ✭ 39 (-41.79%)
Mutual labels:  text-classification, lstm
Text Classification
Implementation of papers for text classification task on DBpedia
Stars: ✭ 682 (+917.91%)
Mutual labels:  lstm, text-classification
Text Classification Keras
📚 Text classification library with Keras
Stars: ✭ 53 (-20.9%)
Mutual labels:  lstm, text-classification
Chinese semantic role labeling
基于 Bi-LSTM 和 CRF 的中文语义角色标注
Stars: ✭ 60 (-10.45%)
Mutual labels:  lstm
Nlp News Classification
Train and deploy a News Classifier using language model (ULMFit) - Serverless container
Stars: ✭ 63 (-5.97%)
Mutual labels:  text-classification
Freediscovery
Web Service for E-Discovery Analytics
Stars: ✭ 59 (-11.94%)
Mutual labels:  text-classification
Tf Lstm Crf Batch
Tensorflow-LSTM-CRF tool for Named Entity Recognizer
Stars: ✭ 59 (-11.94%)
Mutual labels:  lstm

基于bert特征的文本分类与dssm语义表示

#0. ready

将bert预训练模型(chinese_L-12_H-768_A-12)放到当前目录下,下载地址:https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip

#1. bert_fc.py

抽取bert句向量特征,接全连接层。 训练命令:python bert_fc.py

#2. bert_lstm.py

抽取bert字向量特征,后面接LSTM/GRU和全连接层。 训练命令:python bert_lstm.py

#3. bert_dssm.py

先将文本转换为bert句向量存在tfrecord中,这一步自行处理即可, 然后从tfrecord中读取数据,数据格式为feed_dict = {"query":[[1,2,3], [4,6,7]], "doc": [[1,2,3], [4,6,7]]}

#4. 基于bert微调DSSM向量

新增bert_dssm_finetune,基于bert微调的DSSM向量,使用https://github.com/CyberZHG/keras-bert 获取CLS向量然后接一层全连接。 data目录下有1000条样本数据,格式为:标题\t内容

Reference

https://github.com/google-research/bert

https://github.com/CyberZHG/keras-bert

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].