如何计算单词的准确度?

时间:2021-02-15 09:04:31

标签: python python-3.x machine-learning nlp textblob

我正在使用 textbob 来计算单词的准确性。

text = 'thank you calling on product support talking to caafic k y please helping with your a digit employ number   ing'
orig_words = text.split()
fixed_words = TextBlob(text).correct().split()
words=(len([(x,y) for x,y in zip(orig_words, fixed_words) if x != y])) # => 3
total_word_len=len(orig_words)
correct_words=total_word_len-words
accuraccy=correct_words/total_word_len

但问题是它正在考虑 'caafic' ,'k', 'y' ,'ing' 作为正确的词。理想情况下,这些不应被视为正确的词。

0 个答案:

没有答案