Skip to content

# Convolutional Neural Networks for Text Classification

License

Notifications You must be signed in to change notification settings

dmancevo/text_cnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Convolutional Neural Networks for Text Classification

Convolutional Neural Networks for text classification built on top of Gensim's well known word2vec implementation and Keras.

Dependencies:

  • Numpy
  • Gensim
  • Keras
  • H5Py (for saving the model)

Usage:

from text_cnn import Text_CNN

X=['hello world','Μου αρέσουν οι ντολμάδες','الجو دافئ اليوم','池塘水很冷']
y=[0,1,2,3]

cnn = Text_CNN()
cnn.fit(X,y)           # Train the model.

cnn.predict(X)         # Predict most likely class.
cnn.predict_proba(X)   # Per class probabilities.

cnn.save()             # Save the model.
cnn.load()             # Load previously saved model.

Releases

No releases published

Packages

No packages published

Languages