如何使用 CLIPS 中的读取规范区分大小写的输入?

发布于 2025-01-16 13:15:25 字数 180 浏览 4 评论 0原文

我是 CLIPS 的初学者。我需要使用 read 函数与用户交互。我的问题是,如果用户说“是”与“是”和“是”不同。 我在文档中查找了很长时间,但找不到任何可以标准化我的输入的内容。我尝试使用 uppernormalize 之类的东西,但 CLIPS 中不存在。

I am a beginner in CLIPS. I need to interact with the user using read function. My problem is if the user says Yes is different to YES and to yes.
I was looking a long time in the documentation but I couldn't find any to normalize my input. I try with things like upper or normalize but don't exist in CLIPS.

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

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

发布评论

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

评论(1

能怎样 2025-01-23 13:15:25

Look in the CLIPS 6.4 Basic Programming Guide (http://www.clipsrules.net/Documentation.html) under section 12.3, String Functions. Section 12.3.7, Converting a String to Uppercase, describes the upcase function, and section 12.3.8, Converting a String to Lowercase, describes the lowcase function.

         CLIPS (6.4 2/9/21)
CLIPS> (lowcase (read))
Yes
yes
CLIPS> (upcase (read))
no
NO
CLIPS> 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文