最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

nlp - Comparing the similarity of spoken and written form text - Stack Overflow

programmeradmin5浏览0评论

I'm converting spoken form text to its written form. For example, "he owes me two-thousand dollars" should be converted to "he owes me $2,000" . I want an automatic check, to judge if the conversion was right or not. Can i use sentence transformers to compare the embeddings of "two-thousand dollars" to "$2,000" to check if the spoken to written conversion was right? For example, if the cosine similarity of the embeddings is close to 1, that would mean right conversion. Is there any other better way to do this?

I'm converting spoken form text to its written form. For example, "he owes me two-thousand dollars" should be converted to "he owes me $2,000" . I want an automatic check, to judge if the conversion was right or not. Can i use sentence transformers to compare the embeddings of "two-thousand dollars" to "$2,000" to check if the spoken to written conversion was right? For example, if the cosine similarity of the embeddings is close to 1, that would mean right conversion. Is there any other better way to do this?

Share Improve this question asked Mar 10 at 18:55 user3113173user3113173 212 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Cosine similarity has limitations for numerical values—e.g., embeddings for "2000" and "4000" may be too similar to "two thousand." But you can try it as an auxiliary metric.

You can use multiple converters to check consistency and verify by back-transforming digits to words for equivalence with the original text. You can use text2num and num2word packages for that, for instance.

发布评论

评论列表(0)

  1. 暂无评论