<commit_before># Short Text Categorization with Word Embeddings

This repository is a collection of algorithms for multi-class classification to short texts using Python. Instead of the bag-of-words representation of texts, word-embedding algorithms with a pre-trained model are used. Currently, Word2Vec is implemented.

So far the following algorithms are implemented:

* SumWord2Vec: each short text is represented by the average of the embedded vectors of all the words.
* Autoencoder: the embedded vectors are passed into an autoencoded representation, where the similarity is calculated by cosine.
* Convolutional Neural Network (CNN): all the words are represented by embedded vectors, which are passed into a convolional neural network.

The Word2Vec model is implemented with [`gensim`](https://radimrehurek.com/gensim/), and CNN with [`keras`](https://keras.io/), with a [`Theano`](http://deeplearning.net/software/theano/) backend.

# Further Reading

* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, "Distributed Representations of Words and Phrases and their Compositionality", *NIPS Proceedings* __26__, 3111-3119 (2013). \[[arXiv](https://arxiv.org/abs/1310.4546)\]
* <NAME>, "Convolutional Neural Networks for Sentence Classification" (2014). \[[arXiv](https://arxiv.org/abs/1408.5882)\]
<commit_msg>added reference<commit_after># Short Text Categorization with Word Embeddings

This repository is a collection of algorithms for multi-class classification to short texts using Python. Instead of the bag-of-words representation of texts, word-embedding algorithms with a pre-trained model are used. Currently, Word2Vec is implemented.

So far the following algorithms are implemented:

* SumWord2Vec: each short text is represented by the average of the embedded vectors of all the words.
* Autoencoder: the embedded vectors are passed into an autoencoded representation, where the similarity is calculated by cosine.
* Convolutional Neural Network (CNN): all the words are represented by embedded vectors, which are passed into a convolional neural network.

The Word2Vec model is implemented with [`gensim`](https://radimrehurek.com/gensim/), and CNN with [`keras`](https://keras.io/), with a [`Theano`](http://deeplearning.net/software/theano/) backend.

# Further Reading

* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, "Distributed Representations of Words and Phrases and their Compositionality", *NIPS Proceedings* __26__, 3111-3119 (2013). \[[arXiv](https://arxiv.org/abs/1310.4546)\]
* <NAME>, "Convolutional Neural Networks for Sentence Classification" (2014). \[[arXiv](https://arxiv.org/abs/1408.5882)\]
* For a theory of word embeddings, see the WordPress blog entry: [Probabilistic Theory of Word Embeddings: GloVe](https://datawarrior.wordpress.com/2016/07/25/probabilistic-theory-of-word-embeddings-glove/).

{'fraction_non_alphanumeric': 0.10254596888260255, 'fraction_numerical': 0.028995756718528994, 'mean_word_length': 5.328859060402684, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154315', 'n_tokens_mistral': 843, 'n_tokens_neox': 746, 'n_words': 314}