Skip to content
Discussion options

You must be logged in to vote

Hi! The TextCatBow architecture extracts n-grams from the text. If n is 3, it'll fetch combinations of 3 consecutive tokens. A true "bag of words" model is obtained when you set n to 1, then it'll extract each word separately. There's a linear layer following those n-grams. The final output layer depends on whether or not the classes of your textcat are exclusive: if they are, the output layer is a softmax activation, otherwise it's a sigmoid activation layer (also called Logistic in some of our code). You can find the code implementation here: https://github.com/explosion/spaCy/blob/master/spacy/ml/models/textcat.py

And if you run init config, you can see some default values for this imp…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Joshmantova
Comment options

@polm
Comment options

@Joshmantova
Comment options

@polm
Comment options

Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / textcat Feature: Text Classifier
4 participants