如何解决如何计算单词的准确度?
我正在使用 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' 作为正确的词。理想情况下,这些不应被视为正确的词。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。