Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text classification template with scikit-learn #14

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

themrcesi
Copy link

@themrcesi themrcesi commented Jan 29, 2021

Summary

This PR consists of a text classification template using scikit-learn as stated in #4.

Details

  • Scikit-learn
  • NLTK for stemming and lemmatization
  • Example text files provided in the data/ folder (in spanish)
  • test.py file added in order to check the functionality of the template code itself (needs to be removed before merging)

Checklist

  • all tests are passing (see README.md on how to run tests)
  • if you created a new template: it contains a file test-inputs.yml, which specifies a few input values to test the code template (the test is then automatically run by pytest)
  • you formatted all code with black
  • you checked all new functionality live, i.e. in the running web app
  • any generated code is formatted nicely, both in .py and in .ipynb ("nicely" = comparable to the existing templates)
  • you added comments in your code that explain what it does
  • the PR explains in detail what's new

@themrcesi
Copy link
Author

I´m having some problems executing the tests.

After installing the needed dependencies (pip install -r requirements-dev.txt), I get a strange error and I´m not able to run the tests.
File "B:\Anaconda3\lib\site-packages\hypothesis\internal\conjecture\shrinker.py", line 1447, in <module> @attr.s(slots=True, eq=False) TypeError: attrs() got an unexpected keyword argument 'eq'

@jrieke could you please run the test files for me? Meanwhile I´ll try to solve my problem.

@jrieke
Copy link
Owner

jrieke commented Feb 3, 2021

Oh sorry @themrcesi, didn't see this comment. That's strange since I don't use hypothesis actually. Just to be clear: Does this error come up when you do pip install -r requirements-dev.txt or when you run the tests? And could you send the complete output/error if there's anything else?

@themrcesi
Copy link
Author

No problem @jrieke 😄

It was after installing the dev requirements, when I tried running the tests. Now this error is solved, it seemed to be something related to some package´s version.
However, I´m not able to run the tests since I obtain an error. This error must be my fault, because I´ve tried running the tests just from the forked version and I also obtain the same errors. The error is about Windows permission to access some files, a bit strange.

Everything is working fine but I´m not able to run the tests (btw they should pass). So I will try to fix that to be able to run the tests. If you have time and you can run the tests for me I´d appreciate it.

Once we can confirm that tests pass, this PR is ready to be merged.

@themrcesi themrcesi marked this pull request as ready for review February 8, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants