This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft-website.git
The following commit(s) were added to refs/heads/master by this push:
new 1616a8f Update intent-matching.html
1616a8f is described below
commit 1616a8f330f8d5682fcfb133cac8e43be91f3b36
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Tue Apr 13 20:56:46 2021 -0700
Update intent-matching.html
---
intent-matching.html | 45 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/intent-matching.html b/intent-matching.html
index d7543ca..8252b67 100644
--- a/intent-matching.html
+++ b/intent-matching.html
@@ -954,12 +954,53 @@ id: intent_matching
<td>
<pre class="brush:idl">
// Result:
- // - 'list(1, 2, 3)' if 1st parameter is
evaluated to 'true'.
- // - 'null' if 1st parameter is evaluated to
'false'.
+ // - 'list(1, 2, 3)' if 1st parameter is
'true'.
+ // - 'null' if 1st parameter is 'false'.
if(meta_model('my_prop') == true, list(1, 2,
3), null)
</pre>
</td>
</tr>
+ <tr>
+ <td>
+ <p>
+ <code class="fn"><b>json</b>(p: String) ⇒
Map</code>
+ </p>
+ <!--<editor-fold desc="b">-->
+ <p class="fn-desc">
+ <em>Description:</em><br>
+ Converts JSON in <code><b>p</b></code>
parameter to a map. Use single quoted
+ string to avoid escaping double quotes in
JSON.
+ </p>
+ <!--</editor-fold>-->
+ </td>
+ <td>
+ <pre class="brush:idl">
+ // Result: Map.
+ json('{"a": 2, "b": [1, 2, 3]}')
+ </pre>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <code class="fn"><b>to_string</b>(p: Any)
⇒ {String|List}</code>
+ </p>
+ <p class="fn-desc">
+ <em>Description:</em><br>
+ Converts <code><b>p</b></code> parameter
to a string. In case of a list
+ this function will convert individual list
elements to string and return the
+ list of strings.
+ </p>
+ </td>
+ <td>
+ <pre class="brush:idl">
+ // Result: "1.25"
+ to_string(1.25)
+ // Result: list("1", "2", "3")
+ to_string(list(1, 2, 3))
+ </pre>
+ </td>
+ </tr>
</tbody>
</table>
</div>