This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-384
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-384 by this push:
     new 9001a54  WIP.
9001a54 is described below

commit 9001a54188108c1caa3c61f14f8ed5d9b23455ec
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Aug 24 14:04:35 2021 -0700

    WIP.
---
 nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml    | 9 +++++++--
 .../src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml 
b/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
index 8f8bde7..57f156d 100644
--- a/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
+++ b/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
@@ -50,7 +50,12 @@ elements:
 
   - id: "x:addr:num"
     synonyms:
-      - "^^{tok_id() == 'nlpcraft:num' && meta_tok('nlpcraft:num:unit') == 
null && meta_tok('nlpcraft:num:isequalcondition')}^^"
+      - "^^{# == 'nlpcraft:num' && meta_tok('nlpcraft:num:unit') == null && 
meta_tok('nlpcraft:num:isequalcondition')}^^"
+
+
+  - id: addr
+    synonyms:
+      - "^^{# == 'addr:num'}^^ {^^{is_alphanum(tok_txt))}^^}[1,3] ^^{# == 
'addr:kind'}^^"
 
   - id: "x:addr:st"
     synonyms:
@@ -58,7 +63,7 @@ elements:
 
   - id: "x:addr"
     synonyms:
-      - "^^[num]{tok_id() == 'x:addr:num'}^^ ^^[name]{tok_id() == 
'x:addr:st'}^^ ^^[kind]{tok_id() == 'x:addr:kind'}^^"
+      - "^^[num]{# == 'x:addr:num'}^^ ^^[name]{# == 'x:addr:st'}^^ ^^[kind]{# 
== 'x:addr:kind'}^^"
 
   - id: "x:hey"
     description: "NLI prompt"
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
index 28d0aec..91a3db3 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
@@ -37,7 +37,7 @@ public interface NCCustomParser extends NCLifecycle {
      * Analyses user input provided as a list of {@link NCCustomWord} objects 
and returns a list
      * of {@link NCCustomElement} objects. Note that model elements returned 
from this method must
      * be defined in the model, i.e. this method only provides an additional 
logic of detecting these
-     * elements but they still need to be defined normally in the model.
+     * elements, but they still need to be defined normally in the model.
      *
      * @param req User request descriptor.
      * @param mdl Instance of data model this parser belongs to.

Reply via email to