Is there any example on how can TensorFlow be used for text classification using neural networks?
Asked
Active
Viewed 1.3k times
8
-
4Sumit asked the question on the Tensorflow github page and was told to come here. https://github.com/tensorflow/tensorflow/issues/215 – Spaceghost Nov 17 '15 at 16:57
-
1I'd like to see an example of this as well. – Blaze Nov 18 '15 at 19:44
2 Answers
4
I've started putting together a set of examples for text classification on DBPedia dataset (predicting class of object from its description) as part of examples for Scikit Flow: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/learn/text_classification.py
Going to expand this example and write a blog post when will have enough different models showcased. Feel free to suggest other datasets and models you would be interested to see.

Alexander Ejbekov
- 5,594
- 1
- 26
- 26

ilblackdragon
- 1,834
- 12
- 12
-
Thanks a lot @ilblackdragon. I am able to make use of your example. It will be great help if you can document the **rnn_model** function. – Sumit Chawla Nov 30 '15 at 20:05
-
1@SumitChawla I've added a bunch of comments in the example: https://github.com/google/skflow/blob/master/examples/text_classification.py and will try to write a blog post in close future about this types of the models. Let me know if you still have questions though. – ilblackdragon Dec 06 '15 at 02:44
-
How can we test the model. There is save and restore file but one sentence at a time. Any tutorial? Please help. – Wazy Apr 18 '16 at 09:16
-
1update to the URL: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/skflow/text_classification.py – lababidi Apr 21 '16 at 20:19
-
1It's here now :- https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/learn/text_classification.py – Shatu Nov 25 '16 at 22:40
3
Denny Britz has some great tutorials for Deep learning on his blog at here
and has an example on github here
Some of his examples don't use tensor flow but the one I linked to github uses CNN for text classification using tensor flow

Camron_Godbout
- 1,583
- 1
- 15
- 22