简体   繁体   English

如何让 Watson Assistant 读取每个数字而不是整数

[英]How to get Watson Assistant to read numbers per digit instead of as a whole number

As the title suggests, I need Watson Assistant with phone integration to read back a number digit by digit instead of as a whole integer.正如标题所示,我需要具有电话集成功能的 Watson Assistant 来逐位读回一个数字,而不是整个 integer。

In this current setup, we are collecting an account ID and zip code from the user.在此当前设置中,我们从用户那里收集帐户 ID 和 zip 代码。 We have a dialog node that confirms "is this the correct account id and zip?"我们有一个对话节点来确认“这是正确的帐户 ID 和 zip 吗?” But when reading back something like 12345 as the zip, instead of "your zip code is 1,2,3,4,5."但是,当将 12345 之类的内容读回 zip 时,而不是“您的 zip 代码是 1,2,3,4,5”。 It reads back "your zip code is twelve thousand three hundred and forty-five."它读回“您的 zip 密码是一万二千三百四十五”。

Is there a way to change how this number is read back to the user?有没有办法更改将此号码读回给用户的方式?

当前插槽设置

Not having implemented it, but you could没有实施它,但你可以

  • turn the integer into a string,把 integer 变成一个字符串,
  • use Array.split to break up the string based on each digit,使用Array.split根据每个数字拆分字符串,
  • then join it back into a string using spaces to make it separate numbers to be read.然后使用空格将其连接回一个字符串,使其成为要读取的单独数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM