我正在使用 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' 作为正确的词。理想情况下,这些不应被视为正确的词。