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 8b11038  WIP.
8b11038 is described below

commit 8b11038b9de24052b3dbd6621540d88f92b08c09
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Mon Apr 19 11:05:23 2021 +0300

    WIP.
---
 _data/idl-fns.yml    | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++
 intent-matching.html |  12 ++---
 2 files changed, 137 insertions(+), 6 deletions(-)

diff --git a/_data/idl-fns.yml b/_data/idl-fns.yml
index 7f0a156..4cbe263 100644
--- a/_data/idl-fns.yml
+++ b/_data/idl-fns.yml
@@ -380,6 +380,137 @@ fn-token:
 
 
 fn-datetime:
+  - name: year
+    sig: |
+      <b>year</b>() ⇒ Int
+    synopsis: Returns current year
+    desc: |
+      Returns current year.
+    usage: |
+      // Result: 2021
+      year()
+
+  - name: month
+    sig: |
+      <b>month</b>() ⇒ Int
+    synopsis: |
+      Returns current month: 1 ... 12
+    desc: |
+      Returns current month: 1 ... 12.
+    usage: |
+      // Result: 5
+      month()
+
+  - name: day_of_month
+    sig: |
+      <b>day_of_month</b>() ⇒ Int
+    synopsis: |
+      Returns current day of the month: 1 ... 31
+    desc: |
+      Returns current day of the month: 1 ... 31.
+    usage: |
+      // Result: 5
+      day_of_month()
+
+  - name: day_of_week
+    sig: |
+      <b>day_of_week</b>() ⇒ Int
+    synopsis: |
+      Returns current day of the week: 1 ... 7
+    desc: |
+      Returns current day of the week: 1 ... 7.
+    usage: |
+      // Result: 5
+      day_of_week()
+
+  - name: day_of_year
+    sig: |
+      <b>day_of_year</b>() ⇒ Int
+    synopsis: |
+      Returns current day of the year: 1 ... 365
+    desc: |
+      Returns current day of the year: 1 ... 365.
+    usage: |
+      // Result: 51
+      day_of_year()
+
+  - name: hour
+    sig: |
+      <b>hour</b>() ⇒ Int
+    synopsis: |
+      Returns current hour: 0 ... 23
+    desc: |
+      Returns current hour: 0 ... 23.
+    usage: |
+      // Result: 11
+      hour()
+
+  - name: minute
+    sig: |
+      <b>minute</b>() ⇒ Int
+    synopsis: |
+      Returns current minute: 0 ... 59
+    desc: |
+      Returns current minute: 0 ... 59.
+    usage: |
+      // Result: 11
+      minute()
+
+  - name: second
+    sig: |
+      <b>second</b>() ⇒ Int
+    synopsis: |
+      Returns current second: 0 ... 59
+    desc: |
+      Returns current second: 0 ... 59.
+    usage: |
+      // Result: 11
+      second()
+
+  - name: week_of_month
+    sig: |
+      <b>week_of_month</b>() ⇒ Int
+    synopsis: |
+      Returns current week of the month: 1 ... 4
+    desc: |
+      Returns current week of the month: 1 ... 4.
+    usage: |
+      // Result: 2
+      week_of_month()
+
+  - name: week_of_year
+    sig: |
+      <b>week_of_year</b>() ⇒ Int
+    synopsis: |
+      Returns current week of the year: 1 ... 56
+    desc: |
+      Returns current week of the year: 1 ... 56.
+    usage: |
+      // Result: 21
+      week_of_year()
+
+  - name: quarter
+    sig: |
+      <b>quarter</b>() ⇒ Int
+    synopsis: |
+      Returns current quarter: 1 ...4
+    desc: |
+      Returns current quarter: 1 ... 4.
+    usage: |
+      // Result: 2
+      quarter()
+
+  - name: now
+    sig: |
+      <b>now</b>() ⇒ Int
+    synopsis: |
+      Returns current time in milliseconds
+    desc: |
+      Returns current time in milliseconds.
+    usage: |
+      // Result: 122312341212
+      now()
+
 fn-req:
   - name: req_id
     sig: |
diff --git a/intent-matching.html b/intent-matching.html
index e99c7c9..51b290e 100644
--- a/intent-matching.html
+++ b/intent-matching.html
@@ -167,7 +167,7 @@ id: intent_matching
                 </p>
                 <pre class="brush: idl">
                     intent=xa
-                        flow="^(?:xx)(^:zz)*$"
+                        flow="^(?:login)(^:logout)*$"
                         meta={'enabled': true}
                         term(a)={month() >= 6 && !(tok_id()) != "z" && 
meta_intent('enabled') == true}[1,3]
                         term(b)~{
@@ -204,7 +204,7 @@ id: intent_matching
                         and mostly unsuitable for the natural language 
processing.
                     </dd>
                     <dt>
-                        <code>flow="^(?:xx)(^:zz)*$"</code> <sup><small>line 
2</small></sup><br/>
+                        <code>flow="^(?:login)(^:logout)*$"</code> 
<sup><small>line 2</small></sup><br/>
                         <code>flow=/#flowModelMethod/</code> <sup><small>line 
13</small></sup>
                     </dt>
                     <dd>
@@ -224,10 +224,10 @@ id: intent_matching
                                     will be matched against that string 
representing intent IDs.
                                 </p>
                                 <p>
-                                    In the line 2, the 
<code>^(?:xx)(^:zz)*$</code> dialog flow regular expression defines that intent
-                                    should only match when the immediate 
previous intent was <code>xx</code> and no <code>zz</code> intents
-                                    are in the history. If the history is 
<code>"xx yy yy"</code> - this intent will match. However, for
-                                    <code>"xx zz"</code> or <code>"yy 
xx"</code> history this dialog flow will not match.
+                                    In the line 2, the 
<code>^(?:login)(^:logout)*$</code> dialog flow regular expression defines that 
intent
+                                    should only match when the immediate 
previous intent was <code>login</code> and no <code>logout</code> intents
+                                    are in the history. If the history is 
<code>"login order order"</code> - this intent will match. However, for
+                                    <code>"login logout"</code> or 
<code>"order login"</code> history this dialog flow will not match.
                                 </p>
                             </li>
                             <li>

Reply via email to