Skip to content

mhjabreel/CharCnn_Keras

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Character Level CNNs in Keras

This repository contains Keras implementations for Character-level Convolutional Neural Networks for text classification on AG's News Topic Classification Dataset.

The following models have been implemented:

  1. Xiang Zhang, Junbo Zhao, Yann LeCun. Character-level Convolutional Networks for Text Classification. NIPS 2015
  2. Yoon Kim, Yacine Jernite, David Sontag, Alexander M. Rush. Character-Aware Neural Language Models. AAAI 2016
  3. Shaojie Bai, J. Zico Kolter, Vladlen Koltun. An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. ArXiv preprint (2018)

Kim's CharCNN was originally part of an end-to-end trained pipeline for language modelling, but has been adapted for text classification.

Usage

  1. Install dependencies (Tensorflow 1.3 and Keras 2.1.3):
$ pip install -r requirements.txt
  1. Specify the training and testing data sources and model hyperparameters in the config.json file.

  2. Run the main.py file as below:

$ python main.py --model [model_name]

Replace [model_name] with either zhang or kim to run the desired model.

Results

Coming soon.

About

The implementation of text classification using character level convoultion neural networks using Keras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages