Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Incorrect prediction #71

Open
Ngoroth opened this issue Mar 8, 2020 · 2 comments
Open

Incorrect prediction #71

Ngoroth opened this issue Mar 8, 2020 · 2 comments

Comments

@Ngoroth
Copy link

Ngoroth commented Mar 8, 2020

from typing import Dict
from dostoevsky.models import FastTextToxicModel
from dostoevsky.tokenization import RegexTokenizer

tokenizer = RegexTokenizer()
toxic_model = FastTextToxicModel(tokenizer=tokenizer)

messages = [ 'привет', 'я люблю тебя!!', 'малолетние дебилы' ]
results = toxic_model.predict(messages, k=2)
for message, sentiment in zip(messages, results):
print(message, '->', sentiment)

Output:
привет -> {'normal': 0.9972950220108032, 'toxic': 0.0026416745968163013} я люблю тебя!! -> {'toxic': 1.0000100135803223, 'normal': 1.0000003385357559e-05} малолетние дебилы -> {'toxic': 1.0000100135803223, 'normal': 1.0000003385357559e-05}

я люблю тебя!! has same toxic value with малолетние дебилы

@dveselov
Copy link
Member

Hi,
I am aware of this issue. Currently, FastTextToxicModel is not ready to use.

@Ngoroth
Copy link
Author

Ngoroth commented Mar 10, 2020

Thank you for response, i will wait impatiently

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants