IBM Watson-系统编号不为0 [英] IBM Watson - Sys-number does not get 0

查看:87
本文介绍了IBM Watson-系统编号不为0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,我想使用sys-number来获取数字序列,并且该数字可以以0开头.但是,如果用户键入034234342342,则sys-number不能识别0 34234342342.

in this case, I want to use sys-number to get numbers sequence, and this number can start with 0. But, if the user types 034234342342, the sys-number does not recognize the 0, just 34234342342.

对此有任何可行的解决方案吗?在这种情况下,要获取所有号码?

Have any Contorn Solution for this? In this case, to get all number?

这是会话流中的一个Regex条件,如果用户键入我的协议编号为034234342342",我想使用sys-number获取ALL编号. 而sys-number将成为新条件并获得完整编号.

This is one Regex condition inside Conversation flow and I want to use sys-number to get the ALL number if the user types "My protocol number is 034234342342". And sys-number will be the new condition and get the complete number.

如果没有使用sys-number的方法.请尝试在这种情况下回答我.

If not have how to do it with sys-number. Please, try answer to me how to do that in this user case.

检查我的示例:

我尝试一下:

推荐答案

您应该可以使用@ sys-number来检测该数字.未能做到这一点:

You should be able to use @sys-number to detect that number. Failing that you could do:

input.text.find('\d{11}')

find()允许查找任何出现的内容,而matches()是全行匹配项.

find() allows to find any occurrence, while matches() is a full line match.

捕获您可以使用:

<? input.text.extract('\d{11}',0) ?> 

这也允许组捕获.

否则,您将无法使用@sys-number捕获前面的零.

Other then this you won't be able to capture preceding zeros with @sys-number.

此外,如果您将支票直接放入JSON,则需要使用\\转义\.

Also if you put the checks directly into the JSON, then you need to escape out the \ with \\.

这篇关于IBM Watson-系统编号不为0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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