[
https://issues.apache.org/jira/browse/NLPCRAFT-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17306711#comment-17306711
]
Aaron Radzinski edited comment on NLPCRAFT-281 at 3/23/21, 2:58 AM:
--------------------------------------------------------------------
Term-scoped variables have been added. Here's the snippet of usage:
{code:java}
intent=i2
flow="a[^0-9]b"
meta={'a': 42, 'b': {'Москва': [1, 2, 3]}}
term(t1)={2 == 2 && !(id()) != -25 && meta_model('a') == 42}
term(t2)={
@a = meta_model('a')
@list = list(1, 2, 3, 4)
@a == 42 && has_all(@list, list(3, 2))
}
intent=i3
flow="a[^0-9]b"
term(t1)={
@x = 2
@xx = ((@x * @x) / 2) * 3
@xx == 6 && has(
json(meta_req('user_json_payload')),
list("موسكو\"", 'v1\'v1', "k2", "v2")
)
}
{code}
was (Author: aradzinski):
Term-scoped variables have been added. Here's the snippet of usage:
{{ intent=i2
flow="a[^0-9]b"
meta={'a': 42, 'b': {'Москва': [1, 2, 3]}}
term(t1)={2 == 2 && !(id()) != -25 && meta_model('a') == 42}
term(t2)={
@a = meta_model('a')
@list = list(1, 2, 3, 4)
@a == 42 && has_all(@list, list(3, 2))
}
intent=i3
flow="a[^0-9]b"
term(t1)={
@x = 2
@xx = ((@x * @x) / 2) * 3
@xx == 6 && has(
json(meta_req('user_json_payload')),
list("موسكو\"", 'v1\'v1', "k2", "v2")
)
}}}
> Add term-scoped variables to IDL.
> ---------------------------------
>
> Key: NLPCRAFT-281
> URL: https://issues.apache.org/jira/browse/NLPCRAFT-281
> Project: NLPCraft
> Issue Type: Task
> Components: model
> Reporter: Aaron Radzinski
> Assignee: Aaron Radzinski
> Priority: Major
> Fix For: 0.7.5
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)