News for hackers. Stuff that matters.
Re:FastText is the best text classification library for a qu... by dang on Tuesday June 22, 2021 @03:22PM (#27595965)
Past related threads:

Using aligned word vectors for instant translations with Python and Rust - https://news.ycombinator.com/item?id=27465287 - June 2021 (35 comments)

FastText embeddings of field headers to improve NLP - https://news.ycombinator.com/item?id=23405965 - June 2020 (1 comment)

Fast and accurate language identification using fastText - https://news.ycombinator.com/item?id=15393518 - Oct 2017 (12 comments)

Multilingual word vectors in 78 languages - https://news.ycombinator.com/item?id=14167539 - April 2017 (23 comments)

Facebook releases 300-dimensional pretrained Fasttext vectors for 90 languages - https://news.ycombinator.com/item?id=13771292 - March 2017 (70 comments)

Fasttext and Torch: A fasttext implementation based on Torch - https://news.ycombinator.com/item?id=12862541 - Nov 2016 (1 comment)

Facebook AI Research Open Sources fastText - https://news.ycombinator.com/item?id=12329094 - Aug 2016 (5 comments)

FastText – Library for fast text representation and classification - https://news.ycombinator.com/item?id=12226988 - Aug 2016 (52 comments)

Re:FastText is the best text classification library for a qu... by anothernewdude on Wednesday June 23, 2021 @07:42PM (#27612033)
The built-in classifier to fasttext is abysmal. Putting a default XGB on the embeddings is just as easy, and once you're just using fasttext for embeddings, using a better embedding makes more sense.
Re:FastText is the best text classification library for a qu... by febed on Thursday June 24, 2021 @12:12AM (#27613902)
Do you have an example of this?
Re:FastText is the best text classification library for a qu... by Der_Einzige on Wednesday June 23, 2021 @09:11PM (#27612699)
Correct. This has been my experience as well.
Re:FastText is the best text classification library for a qu... by abhgh on Thursday June 24, 2021 @12:35AM (#27614029)
I agree, and not just for text classification. Its a good baseline for anything that looks like text (if you train a model from scratch), e.g., URLs with some basic preprocessing. This is because FastText uses character n-grams; the consequence of this is substring similarities are exploited.

Some things to note: (1) FastText comes with a classifier but I have often seen good results with using a difference classifier like LightGBM or a SVM. (2) If you want other word embeddings to compare with as well, magnitude [1] is an easy to use library. (3) FastText now supports multiple languages [2].

[1] https://github.com/plasticityai/magnitude#pre-converted-magn... [2] https://fasttext.cc/docs/en/crawl-vectors.html#models

Re:FastText is the best text classification library for a qu... by innerlee on Wednesday June 23, 2021 @08:02PM (#27612188)
For more text classification baselines (CRNN, NRTR, RubustScanner, SAR, SegOCR), checkout https://github.com/open-mmlab/mmocr They are reproducible, customizable.
Re:FastText is the best text classification library for a qu... by frakkingcylons on Wednesday June 23, 2021 @11:47PM (#27613756)
Did you mean to link to something else? Those all seem geared for OCR tasks as opposed to text classification (which is what the article is talking about).
Re:FastText is the best text classification library for a qu... by banjtheman on Wednesday June 23, 2021 @11:38PM (#27613688)
I created a python module leveraging fasttext to train text classifiers with just a labeled dataset

https://github.com/banjtheman/instatext

Re:FastText is the best text classification library for a qu... by polyrand on Thursday June 24, 2021 @05:26AM (#27615474)
Not only for classification, fastText is really good (and fast) at language identification[0]

To use fastText in Python in a scikit-learn style (also inside sklearn pipelines), I’d recommend trying skift[1]

[0] https://ricardoanderegg.com/posts/python-fast-language-ident... [1] https://github.com/shaypal5/skift

Re:FastText is the best text classification library for a qu... by knuthsat on Thursday June 24, 2021 @04:21AM (#27615131)
How does it compare to vowpal wabbit today?
Re:FastText is the best text classification library for a qu... by empiko on Thursday June 24, 2021 @06:19AM (#27615764)
I feel like using HuggingFace Transformers is just as easy right now and it will probably have better performance. Of course, GPU machine is needed for training.