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

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


The following commit(s) were added to refs/heads/NLPCRAFT-91-FIX by this push:
     new 3f15499  WIP.
3f15499 is described below

commit 3f1549969bcb9142d75916f68dcace7e92d1c945
Author: Sergey Kamov <[email protected]>
AuthorDate: Sun Apr 18 11:54:48 2021 +0300

    WIP.
---
 .../org/apache/nlpcraft/example/MinecraftModel.kt  |  4 ---
 .../src/main/resources/minecraft.yaml              | 32 +++++++++++++++-------
 2 files changed, 22 insertions(+), 14 deletions(-)

diff --git 
a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
 
b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index 8e460e4..1eab556 100644
--- 
a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
+++ 
b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
@@ -108,8 +108,4 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") 
{
     ): NCResult {
         return FIllMatchProcessor.process(ctx, shape, block, length, position)
     }
-
-    override fun getAbstractTokens(): MutableSet<String> {
-        return mutableSetOf("mc:player")
-    }
 }
diff --git 
a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml 
b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 1b6042b..2a40dcf 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -27,7 +27,6 @@ macros:
   - name: "<PLAYER_NICKNAME>"
     macro: "{//[a-zA-Z0-9]+//}"
 
-
 elements:
   # General synonyms
   - id: mc:player
@@ -137,14 +136,27 @@ elements:
     synonyms:
       - "{{^^[distance]{tok_id() == 'nlpcraft:num'}^^|_} {in|_} front {of|_} 
^^[player]{tok_id() == 'mc:player'}^^}"
 
+abstractTokens:
+   - mc:player
+
+permutateSynonyms: true
+sparse: true
+
 # List of model intents.
 intents:
-  - intent=weatherIntent term={tok_id() == 'weather:action'}? 
term(arg)={has(tok_groups(), 'weather')}
-  - intent=timeIntent term(arg)={has(tok_groups(), 'time')}
-  - "intent=giveIntent term(action)={tok_id() == 'give:action'} 
term(quantity)={tok_id() == 'nlpcraft:num'}?
-  term(item)={tok_id() == 'mc:item'} term={tok_id() == 'give:block-word'}?"
-  - "intent=fillIntent term={tok_id() == 'fill:action'} 
term(shape)={has(tok_groups(), 'fill:shape')} term(block)={tok_id() == 
'mc:block'}
-  term(len)={tok_id() == 'fill:length'}? term(position)={has(tok_groups(), 
'fill:position')}"
-
-# give me sand
-swearWordsAllowed: true
+  - "intent=weatherIntent
+        term={tok_id() == 'weather:action'}?
+        term(arg)={has(tok_groups(), 'weather')}"
+  - "intent=timeIntent
+        term(arg)={has(tok_groups(), 'time')}"
+  - "intent=giveIntent
+        term(action)={tok_id() == 'give:action'}
+        term(quantity)={tok_id() == 'nlpcraft:num'}?
+        term(item)={tok_id() == 'mc:item'}
+        term={tok_id() == 'give:block-word'}?"
+  - "intent=fillIntent
+        term={tok_id() == 'fill:action'}
+        term(shape)={has(tok_groups(), 'fill:shape')}
+        term(block)={tok_id() == 'mc:block'}
+        term(len)={tok_id() == 'fill:length'}?
+        term(position)={has(tok_groups(), 'fill:position')}"
\ No newline at end of file

Reply via email to