如何找到阿拉伯语和波斯语中的mist漏? [英] How to find mistyping in Arabic and Persian language?

查看:181
本文介绍了如何找到阿拉伯语和波斯语中的mist漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在波斯和阿拉伯字母中,有些字母的形状不同,但是它们的声音非常接近.

In Persian and Arabic alphabet we have some letters that has different shape but their sounds are so close together.

这些是这些字母的列表:

These are list of those letters:

S =س,ص,ث

S= س, ص, ث

Gh =‰,ق

T =ت,ط

Z =ز,ض,ظ,ذ

Z= ز , ض, ظ, ذ

H =ح,å

许多人不知道如何写单词或忘记拼写和错误地写单词.

Many people don't know how to write words or forget the spelling and write the words wrong.

例如对于دغدغه一词,它可以用8种方式写成:

For example for the word دغدغه it can be write in 8 ways:

1:  دقدغه
2:  دقدغح
3:  دقدقه
4:  دقدقح
5:  دغدغه
6:  دغدغح
7:  دغدقه
8:  دغدقح

我该如何计算用户可以用多少种方式输入错误的单词?

How can I count how many ways a user can type a word wrong?

在PHP中有执行此操作的功能吗?

Is there any function for doing this in PHP?

推荐答案

您可以通过

You can do this by Combination (mathematic) that is a way of selecting items from a collection, such that (unlike permutations) the order of selection does not matter.

了解详情

如何计算组合数量?

从图像中可以看到,您知道每个字母的不同类型的数目,只是单词中已建立字母的数目乘以该字母的不同类型的数目. 您所说的话,我们有8个结果.

As you see in image, you know the number of each letters different types, just multiple the number of founded letters in word by the number of different types of that letter. Here for the word what you said we have 8 results.

第二个问题:

And for the second question: Yes, there is a function for this on GitHub and see the demo of that repository, and you can test your words there.

这篇关于如何找到阿拉伯语和波斯语中的mist漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆