[英]Watson conversation: Regexp as entity
At a watson conversation I added a regular expression as entity: 在Watson对话中,我添加了一个正则表达式作为实体:
(eg @LimitLiteral : (?i)(\\d+(\\,|.)\\d*\\s*[^,.;] \\w \\s*[^,.;]limit)|(limit\\s*\\d+(.|,) \\d ). (例如@LimitLiteral:(?i)(\\ d +(\\,|。)\\ d * \\ s * [^ ,.;] \\ w \\ s * [^ ,.;] limit)|(limit \\ s * \\ d +(。|,) \\ d )。
Inside this regexp you can find the constant limit
. 在此正则表达式中,您可以找到常量limit
。 Is it possible to replace this constant limit
with another entity? 是否可以用另一个实体替换此常量limit
?
(eg @limit , Limit, maximum , max, not more ..., less) (例如,@ limit,Limit,maximum,max,不多...,少)
The advantage is that if possible the regexp can be maintained by adding a new value for the entity @Limit
好处是,如果可能,可以通过为实体@Limit
添加新值来维护正则表达式
thx 谢谢
您只可以使用某些条件检查@LimitLiteral
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.