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

Running the first example we get a different score #36

Closed
benhealthee opened this issue Mar 16, 2023 · 2 comments
Closed

Running the first example we get a different score #36

benhealthee opened this issue Mar 16, 2023 · 2 comments

Comments

@benhealthee
Copy link

{'furniture': 0.5352066861088035, 'kitchen': 0.4647933138911965}

@benhealthee
Copy link
Author

benhealthee commented Mar 16, 2023

Here is the code:
import spacy
import classy_classification

or import standalon

#from classy_classification import ClassyClassifier
import en_core_web_trf

data = {
"furniture": ["This text is about chairs.",
"Couches, benches and televisions.",
"I really need to get a new sofa."],
"kitchen": ["There also exist things like fridges.",
"I hope to be getting a new stove today.",
"Do you also have some ovens."]
}
nlp = en_core_web_trf.load()

nlp.add_pipe(
"text_categorizer",
config={
"data": data,
"model": "spacy"
}
)

print(nlp("I am looking for kitchen appliances.")._.cats)

@davidberenstein1957
Copy link
Owner

This was fixed in release 0.6.3 @benhealthee . Thanks for bringing the issue up.

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

No branches or pull requests

2 participants