<p>fastText offers more than topic modelling, it is a tool for generation of word embeddings and text classification using a shallow neural network.
The authors state its performance is comparable with much more complex “deep learning” algorithms, but the training time is significantly lower.</p>

<p><strong>Pros:</strong></p>

<p>=> It is extremely easy to train your own fastText model,</p>

<p><code>$ ./fasttext skipgram -input data.txt -output model</code></p>

<p>Just provide your input and output file, the architecture to be used and that's all, but if you wish to customize your model a bit, fastText provides the option to change the hyper-parameters as well.</p>

<p>=> While generating word vectors, fastText takes into account sub-parts of words called character n-grams so that similar words have similar vectors even if they happen to occur in different contexts. For example, “supervised”, “supervise” and “supervisor” all are assigned similar vectors.</p>

<p>=> A previously trained model can be used to compute word vectors for out-of-vocabulary words. This one is my favorite. Even if the vocabulary of your corpus is finite, you can get a vector for almost any word that exists in the world.</p>

<p>=> fastText also provides the option to generate vectors for paragraphs or sentences. Similar documents can be found by comparing the vectors of documents.</p>

<p>=> The option to predict likely labels for a piece of text has been included too.</p>

<p>=> Pre-trained word vectors for about 90 languages trained on Wikipedia are available in the official repo.</p>

<p><strong>Cons:</strong></p>

<p>=> As fastText is command line based, I struggled while incorporating this into my project, this might not be an issue to others though.</p>

<p>=> No in-built method to find similar words or paragraphs.</p>

<p>For those who wish to read more, here are the links to the official research papers:</p>

<p>1) <a href="https://arxiv.org/pdf/1607.04606.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1607.04606.pdf</a></p>

<p>2) <a href="https://arxiv.org/pdf/1607.01759.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1607.01759.pdf</a></p>

<p>And link to the official repo:</p>

<p><a href="https://github.com/facebookresearch/fastText" rel="nofollow noreferrer">https://github.com/facebookresearch/fastText</a></p>
Comparison between fasttext and LDA
<p>Hi Last week Facebook announced Fasttext which is a way to categorize words into bucket. Latent Dirichlet Allocation is also another way to do topic modeling. My question is did anyone do any comparison regarding pro and con within these 2.</p>

<p>I haven't tried Fasttext but here are few pro and con for LDA based on my experience</p>

<p>Pro</p>

<ol>
<li><p>Iterative model, having support for Apache spark</p></li>
<li><p>Takes in a corpus of document and does topic modeling.</p></li>
<li><p>Not only finds out what the document is talking about but also finds out related documents</p></li>
<li><p>Apache spark community is continuously contributing to this. Earlier they made it work on mllib now on ml libraries</p></li>
</ol>

<p>Con</p>

<ol>
<li><p>Stopwords need to be defined well. They have to be related to the context of the document. For ex: "document" is a word which is having high frequency of appearance and may top the chart of recommended topics but it may or maynot be relevant, so we need to update the stopword for that</p></li>
<li><p>Sometime classification might be irrelevant. In the below example it is hard to infer what this bucket is talking about</p></li>
</ol>

<p>Topic: </p>

<ol>
<li><p>Term:discipline </p></li>
<li><p>Term:disciplines</p></li>
<li><p>Term:notestable </p></li>
<li><p>Term:winning</p></li>
<li><p>Term:pathways </p></li>
<li><p>Term:chapterclosingtable </p></li>
<li><p>Term:metaprograms</p></li>
<li><p>Term:breakthroughs </p></li>
<li><p>Term:distinctions </p></li>
<li><p>Term:rescue</p></li>
</ol>

<p>If anyone has done research in Fasttext can you please update with your learning?</p>