TextClassification-Keras
Text classification models implemented in Keras, including: FastText, TextCNN, TextRNN, TextBiRNN, TextAttBiRNN, HAN, RCNN, RCNNVariant, etc.
ShawnyXiao/TextClassification-Keras is ranked 13,566 with 812 stars.
ShawnyXiao/TextClassification-Keras is ranked 13,566 among these 8 peers; PracticalDL/Practical-Deep-Learning-Book is ranked 13,564.
| Name | Rank | Metrics |
|---|---|---|
| UMich-CURLY-teaching/UMich-ROB-530-public | 13,538 |
|
| altdeep/causalAI | 13,539 |
|
| awslabs/amazon-bedrock-agent-samples | 13,554 |
|
| PracticalDL/Practical-Deep-Learning-Book | 13,564 |
|
| GoogleCloudPlatform/keras-idiomatic-programmer | 13,578 |
|
| cyrusbehr/tensorrt-cpp-api | 13,581 |
|
| erikaduan/r_tips | 13,589 |
|
| unpingco/Python-for-Probability-Statistics-and-Machine-Learning | 13,604 |
|
| Parameter | Value |
|---|---|
| Language | Python |
| Category | Tutorials |
| Subcategory | ML/AI fundamentals |
| Stars | 812 |
| Forks | 185 |
| Contributors | 2 |
| Created date | 2019-01-03 |
| Updated date | 2026-08-21 |
| Stars in 1 day | 0 |
| Stars in 7 days | 0 |
| Rank | 13,566 |
| Previous rank | 13,457 |
| Rank change | -109 |
| 7-day stars rank | 14,003 |
| Previous 7-day stars rank | 14,022 |
| 7-day stars rank change | 19 |
| Total stars rank | 13,178 |
| Previous total stars rank | 13,158 |
| Total stars rank change | -20 |
| Country | China |
TextClassification-Keras This code repository implements a variety of **deep learning models** for **text classification** using the **Keras** framework, which includes: **FastText**, **TextCNN**, **TextRNN**, **TextBiRNN**, **TextAttBiRNN**, **HAN**, **RCNN**, **RCNNVariant**, etc. In addition to the model implementation, a simplified application is included. 1 Usage All codes are located in the directory , and each kind of model has a corresponding directory in which the model and application are placed. For example, the model and application of FastText are located under , the model
part is , and the application part is . Model 1 FastText FastText was proposed in the paper Bag of Tricks for Efficient Text Classification. Using a look-up table, **bags of ngram** covert to **word representations**. Word representations are **averaged** into a text representation, which is a hidden variable. Text representation is in turn fed to a **linear classifier**. Use the **softmax** function to compute the probability distribution over the predefined classes. 2 Implementation Here Network structure of FastText: 2 TextCNN
TextCNN was proposed in the paper Convolutional Neural Networks for Sentence Classification. Represent sentence with **static and non-static channels**. **Convolve** with multiple filter widths and feature maps. Use **fully connected layer** with **dropout** and **softmax** ouput. 2 Implementation Here Network structure of TextCNN: 3 TextRNN TextRNN has been mentioned in the paper Recurrent Neural Network for Text Classification with Multi-Task Learning. 2 Implementation Here Network structure of TextRNN: 4 TextBiRNN TextBiRNN is an improved model based on TextRNN
. It improves the RNN layer in the network structure into a bidirectional RNN layer. It is hoped that not only the forward encoding information but also the reverse encoding information can be considered. Network structure of TextBiRNN: 5 TextAttBiRNN TextAttBiRNN is an improved model which introduces attention mechanism based on TextBiRNN. For the representation vectors obtained by bidirectional RNN encoder, the model can focus on the information most relevant to decision making through the attention mechanism. The attention mechanism was
first proposed in the paper Neural Machine Translation by Jointly Learning to Align and Translate, and the implementation of the attention mechanism here is referred to this paper Feed-Forward Networks with Attention Can Solve Some Long-Term Memory Problems. 1 Description in Paper In the paper Feed-Forward Networks with Attention Can Solve Some Long-Term Memory Problems, the **feed forward attention** is simplified as follows, Function , a learnable function, is recognized as a **feed forward network**. In this
formulation, attention can be seen as producing a fixed-length embedding of the input sequence by computing an **adaptive weighted average** of the state sequence . 2 Implementation Here The implementation of attention is not described here, please refer to the source code directly. Network structure of TextAttBiRNN: 6 HAN HAN was proposed in the paper Hierarchical Attention Networks for Document Classification. Encoding by **bidirectional GRU**, an annotation for a given word is obtained by concatenating the forward hidden state and
backward hidden state, which summarizes the information of the whole sentence centered around word in current time step. By a
How many stars and forks are recorded?
ShawnyXiao/TextClassification-Keras has 812 stars and 185 forks.
What is the repository rank?
ShawnyXiao/TextClassification-Keras is ranked 13,566.
What language and category are recorded?
ShawnyXiao/TextClassification-Keras has 812 stars, uses Python and belongs to Tutorials.
Which repository is closest in rank?
ShawnyXiao/TextClassification-Keras is compared with PracticalDL/Practical-Deep-Learning-Book, ranked 13,564 with 812 stars.