如何使用 Javascript 自动完成阿拉伯语?

发布于 2024-10-19 21:27:11 字数 144 浏览 2 评论 0原文

我的页面上有一个文本框,具有自动完成/建议功能。问题是它是阿拉伯语的,一旦单词的格式发生变化,它就不会建议正确的匹配短语。例如,如果我在文本框中输入“ä”,它会建议所有带有“ä”的单一形式单词,但不会建议其中一种连接形式中存在“ä”的单词/短语(例如它不会建议“???”)。

I have a text box on a page with auto complete/suggest functionality. The problem is that it is on Arabic and once the format of the word changes, it does not suggest correct matching phrases. For example if I type "ل" in the text box, it will suggest all the words with "ل" in its single form but it will not suggest words/phrases where "ل" is present in one of the joining forms (for example it will not suggest "لاهور").

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

追我者格杀勿论 2024-10-26 21:27:11

标准自动完成使用子字符串,这对于在某些上下文中使用时字符可能会发生变化的语言(例如阿拉伯语)没有用。

我不知道有哪个网络框架可以处理这种情况。

您将需要编写自己的自动完成代码。

The standard autocomplete uses substring which isn't useful for languages where a character can change when used in some context (like in Arabic).

I'm not aware of a web framework that handles this case.

You will need to write your own autocomplete code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文