question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add text classification for spaCy

See original GitHub issue

This requires adding a text-classification script here that can be based in the token-classification implementation.

There is useful spaCy documentation in https://spacy.io/api/textcategorizer, but I think this should be straightforward to implement. Here is an example repo to use for testing - https://huggingface.co/edichief/en_textcat_goemotions

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
osansevierocommented, Aug 3, 2021

Hi there!

To clarify, there are two types of tests:

  • The tests that require docker (under tests/test_docker).
  • And the unit tests you’re running. When you run pytest -sv docker_images/spacy/tests/test_api_token_classification.py you’re not using Docker, which makes development much faster.

As for how to debug this issue, I would recommend you to print the error (response.json() for example) and see what error you’re getting. This could go from missing dependencies/imports to you returning incorrect value. Let me know if you have any other questions.

1reaction
devpramodcommented, Aug 4, 2021

Hi! @osanseviero I’ve added the pipeline. Please let me know about any changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextCategorizer · spaCy API Documentation
The text categorizer predicts categories over a whole document. and comes in two flavors: textcat and textcat_multilabel . When you need to predict...
Read more >
How to Train Text Classification Model in spaCy (Solved ...
Text Classification is the process categorizing texts into different groups. SpaCy makes custom text classification structured and convenient ...
Read more >
Building a Text Classifier with Spacy 3.0 | by Phil S. - Medium
Steps to improve the classifier from here: ... 1. Train on more data: We only used 5000 texts, which is only a fifth...
Read more >
Tutorial: Text Classification in Python Using spaCy - Dataquest
Learn text classification using linear regression in Python using the spaCy package in this free machine learning tutorial.
Read more >
Sarcasm Text Classification using spaCy in Python
conf and append the following configurations inside it: It represents the custom pipelines used when training a model in spaCy. It indicates ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found