You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by if...@apache.org on 2021/02/05 03:10:37 UTC

[incubator-nlpcraft] branch NLPCRAFT-91 updated (88aa41c -> fbf2b93)

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

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


 discard 88aa41c  NLPCRAFT-91: Add /time command support
 discard a6064a3  NLPCRAFT-91: Settings support for mod and cleanup data files
 discard fbd6f27  NLPCRAFT-91: Improve credentials handling
 discard c99d4f4  NLPCRAFT-91: Add README
 discard 6e09afc  NLPCRAFT-91: Add sign in to mod
 discard 2d6f6a3  NLPCRAFT-91: Fix build after restructure
 discard e7bf8ba  NLPCRAFT-91: Add mod for Minecraft as example
 discard 2b7ac45  NLPCRAFT-91: Fix minecraft model
 discard e8b885d  NLPCRAFT-91: Organize model files
 discard 8005745  NLPCRAFT-91: Initial model for weather command
 discard 468eebe  NLPCRAFT-91: Base stubs for Minecraft example
 discard 832325d  NLPCRAFT-91: Initial files
     add aef336a  Dialog test added.
     add cfe1da1  Merge branch 'master' into NLPCRAFT-178
     add 057a27b  WIP.
     add 9c9950f  SQL example schema builder fix.
     add 5e67367  Merge branch 'master' into NLPCRAFT-178
     add f84f793  WIP on refactoring flow matching imp (compiles BUT does not work yet).
     add 810182b  WIP.
     add 75f2ff6  WIP.
     add 7b27f9c  WIP.
     add f88c5d1  WIP.
     add 7dbe239  WIP.
     add 9da1279  Fix warning message
     add 62836be  Merge branch 'master' into NLPCRAFT-178
     add 85b77c8  WIP.
     add f66504d  DSL predicates priorities test added.
     add 35cc747  WIP.
     add dc2b5ed  Update NCIntentSolverEngine.scala
     add 0464b97  Update NCIntentSolverEngine.scala
     add 4430f7c  Update NCIntentSolverEngine.scala
     add 6c7ebb1  Update NCIntentSolverEngine.scala
     add bba1093  Merge branch 'master' into NLPCRAFT-203
     add 482709a  WIP.
     add 7b7a318  Merge remote-tracking branch 'origin/NLPCRAFT-203' into NLPCRAFT-203
     add 0ff209d  Fix for NLPCRAFT-203.
     add f66c70b  WIP.
     add 257f911  WIP.
     add 7fd4da7  WIP.
     add fd62b66  Update NCIntentSolverEngine.scala
     add 9fa3aa6  WIP.
     add 714e357  WIP.
     add 5c7d10f  Update NCIntentSolver.scala
     add ab87f50  Merge branch 'NLPCRAFT-178' into NLPCRAFT-203
     add 83fa553  Update NCIntentSolver.scala
     add d44d2c6  Merge branch 'master' into NLPCRAFT-203
     add 44f40d6  WIP.
     add 098dd48  Update NCIntentSolverEngine.scala
     add 76fdd63  Test fixes.
     add c6dcf80  Fixing tests.
     add c9f778c  Update NCProbeEnrichmentManager.scala
     add ce42c1a  WIP + NLPCRAFT-210 fix.
     add d01f1d6  Merge branch 'NLPCRAFT-203'
     add e8f8470  WIP on tests.
     add 4e7b8c3  Fix for ANTLR4 space handing in QSTRINGs.
     add 7456d58  Fix for dialog flow tests.
     add ced7b3b  Further fixes for dialog flow tests.
     add 5014de5  Update NCIntentSolverEngine.scala
     add 70598dc  Logging & tests improvements for intent matcher.
     add 64c5b59  Minor test fixes.
     add 7dcb606  Minor test fixes.
     add fa09364  Merge branch 'master' of https://github.com/apache/incubator-nlpcraft
     add d0daf6f  Added warning for intersecting intents.
     add 9f973b4  Fixed release date for 0.7.3 release.
     add 7857cd1  Improved logging for intersecting intent matches.
     add 26d92d3  Switch to 2021 in (C).
     add 9a517e1  Naming cleanup.
     add 8e078cc  Remove dup logging from CLI.
     add 647c82a  Fix for NLPCRAFT-214.
     add 3b6f89c  Fixes.
     add b1fcf66  Fix pckgName -> pkgName.
     add 4a048d9  Update NCCli.scala
     add c948d79  Fix for NLPCraft CLI 'test-model' command.
     add b4560d9  Fixed light switch example.
     add 727f3d4  Update lightswitch_model.yaml
     add 80ea0df  Update NCCli.scala
     add eeb278e  Update README.md
     add a3b28a5  Update README.md
     add 1decb45  Fixes for readme.
     add 8beb699  Fixes for readme files.
     add 7623bc5  Fix for NLPCRAFT-217.
     add 5cfcdd0  Added Java and Kotlin examples for LightSwitch.
     add f55c257  Update LightSwitchKotlinModel.kt
     add a0fc371  Fix for NLPCFAFT-220.
     add 4599203  LimitManager bugfixes.
     add 36de483  NCDeployManager bugfixes.
     add c68171e  `swear_words` configuration moved to extra resources.
     add ea0045f  WIP.
     add 2f1a98e  WIP.
     add 3ad718a  WIP.
     add fc84ad9  WIP.
     add 8672bab  WIP.
     add d758001  WIP.
     add a83b7cf  WIP.
     add ab0674c  WIP.
     add 87e4f37  Code review & refactoring.
     add d8408ca  WIP.
     add 8f09fef  WIP.
     add ede2b5d  WIP.
     add 3500379  Update NCCli.scala
     add 6646199  WIP.
     add 853d91a  NLPCRAFT-92: Create Groovy-based example for NLPCraft.
     add dc9a5bf  Merge pull request #11 from paulk-asert/nlpcraft92
     add 85b6642  Merge branch 'master' into NLPCRAFT-224
     add 1499a8a  Update NCToken.java
     add 2642a5e  WIP.
     add a2b33ee  WIP.
     add 9208f36  WIP.
     add 2334aee  Update NCCli.scala
     add c09b2af  Update NCCliCommands.scala
     add ee0b160  Update NCCliCommands.scala
     add dbea8e7  Merge branch 'master' into NLPCRAFT-111
     add 31ab7cf  WIP.
     add bff04ca  Update NCExternalConfigManager.scala
     add 9077ce6  Sql generator tool test added.
     add 1107db2  Merge branch 'master' into NLPCRAFT-228
     add b28cb3f  Minor fix.
     add 79ad8cf  WIP.
     add 861373f  Merge branch 'master' into NLPCRAFT-211
     add 409ad8d  Merge branch 'master' into NLPCRAFT-228
     add a581129  WIP.
     add d77878a  WIP & refactoring.
     add 2097399  WIP.
     add 4208a28  WIP.
     add f63c9d0  NLP sentence processing minor fix.
     add fc2e3ea  Prep for 0.7.4 release.
     add 2c64be4  Merge branch 'master' into NLPCRAFT-111
     add c030316  WIP.
     new f2642e9  NLPCRAFT-91: Initial files
     new dd63d2e  NLPCRAFT-91: Base stubs for Minecraft example
     new 5cf7888  NLPCRAFT-91: Initial model for weather command
     new fbe6a5f  NLPCRAFT-91: Organize model files
     new daded2c  NLPCRAFT-91: Fix minecraft model
     new 44c84fd  NLPCRAFT-91: Add mod for Minecraft as example
     new c0e96f9  NLPCRAFT-91: Fix build after restructure
     new 2ef6c00  NLPCRAFT-91: Add sign in to mod
     new e410bb4  NLPCRAFT-91: Add README
     new 5eaeafa  NLPCRAFT-91: Improve credentials handling
     new 740261a  NLPCRAFT-91: Settings support for mod and cleanup data files
     new fbf2b93  NLPCRAFT-91: Add /time command support

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (88aa41c)
            \
             N -- N -- N   refs/heads/NLPCRAFT-91 (fbf2b93)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 LICENSE                                            |   5 +
 NOTICE                                             |   2 +-
 README.md                                          |   8 +-
 bindist/NOTICE                                     |   2 +-
 docker/Dockerfile                                  |   2 +-
 docker/readme.md                                   |  16 +-
 .../badfilter/swear_words.txt                      |   0
 external/md5.txt                                   |   1 +
 nlpcraft-stanford/pom.xml                          |   2 +-
 nlpcraft/pom.xml                                   |   4 +-
 nlpcraft/src/main/python/ctxword/README.md         |   4 +-
 nlpcraft/src/main/python/ctxword/WINDOWS_SETUP.md  |   4 +-
 nlpcraft/src/main/python/ctxword/jupyter/README.md |   4 +-
 .../common/extcfg/NCExternalConfigHolder.scala     |   4 +-
 .../common/extcfg/NCExternalConfigManager.scala    | 140 ++--
 .../common/extcfg/NCExternalConfigType.scala       |   4 +-
 .../module/NCModule.scala}                         |  46 +-
 .../apache/nlpcraft/common/nlp/NCNlpSentence.scala | 131 +++-
 .../common/nlp/numeric/NCNumericManager.scala      |  24 +-
 .../scala/org/apache/nlpcraft/common/package.scala |   3 +-
 .../nlpcraft/common/pool/NCThreadPoolManager.scala | 105 +++
 .../org/apache/nlpcraft/common/util/NCUtils.scala  |  79 +-
 .../apache/nlpcraft/common/version/NCVersion.scala |   3 +-
 .../scala/org/apache/nlpcraft/examples/README.md   |   4 +-
 .../apache/nlpcraft/examples/alarm/AlarmModel.java |   1 +
 .../org/apache/nlpcraft/examples/alarm/README.md   |  28 +-
 .../org/apache/nlpcraft/examples/echo/README.md    |  26 +-
 .../apache/nlpcraft/examples/helloworld/README.md  |  24 +-
 ...chModel.scala => LightSwitchGroovyModel.groovy} |  67 +-
 .../examples/lightswitch/LightSwitchJavaModel.java |  80 ++
 ...SwitchModel.scala => LightSwitchKotlinModel.kt} |  67 +-
 .../examples/lightswitch/LightSwitchModel.scala    |   3 +-
 .../apache/nlpcraft/examples/lightswitch/README.md |  26 +-
 .../examples/lightswitch/lightswitch_model.yaml    |   8 +-
 .../org/apache/nlpcraft/examples/phone/README.md   |  25 +-
 .../org/apache/nlpcraft/examples/sql/README.md     |  27 +-
 .../nlpcraft/examples/sql/db/SqlBuilder.scala      |   4 +-
 .../nlpcraft/examples/sql/db/SqlServer.scala       |  11 +-
 .../org/apache/nlpcraft/examples/time/README.md    |  22 +-
 .../org/apache/nlpcraft/examples/weather/README.md |  26 +-
 .../scala/org/apache/nlpcraft/model/NCElement.java |   2 +-
 .../scala/org/apache/nlpcraft/model/NCToken.java   |   2 +-
 .../model/factories/basic/NCBasicModelFactory.java |   3 +-
 .../model/intent/impl/NCIntentDslCompiler.scala    |  58 +-
 .../model/intent/impl/NCIntentSolver.scala         |  19 +-
 .../model/intent/impl/NCIntentSolverEngine.scala   | 573 ++++++++------
 .../model/intent/impl/NCIntentSolverVariant.scala  |  39 +-
 .../model/intent/impl/antlr4/NCIntentDsl.g4        |  23 +-
 .../model/intent/impl/antlr4/NCIntentDsl.interp    |  12 +-
 .../model/intent/impl/antlr4/NCIntentDsl.tokens    | 107 +--
 .../impl/antlr4/NCIntentDslBaseListener.java       |  50 +-
 .../intent/impl/antlr4/NCIntentDslLexer.interp     |  11 +-
 .../model/intent/impl/antlr4/NCIntentDslLexer.java | 220 +++---
 .../intent/impl/antlr4/NCIntentDslLexer.tokens     | 107 +--
 .../intent/impl/antlr4/NCIntentDslListener.java    |  42 +-
 .../intent/impl/antlr4/NCIntentDslParser.java      | 858 ++++++---------------
 .../model/intent/utils/NCDslFlowItem.scala         |  43 --
 .../nlpcraft/model/intent/utils/NCDslIntent.scala  |  32 +-
 .../nlpcraft/model/tools/cmdline/NCCli.scala       | 187 +++--
 .../model/tools/cmdline/NCCliCommands.scala        | 127 +--
 .../model/tools/embedded/NCEmbeddedResult.java     |   2 +-
 .../model/tools/sqlgen/NCSqlModelGenerator.java    |   7 +-
 .../sqlgen/impl/NCSqlModelGeneratorImpl.scala      | 128 ++-
 .../nlpcraft/model/tools/test/NCTestClient.java    |   8 +
 .../model/tools/test/NCTestClientBuilder.java      |  26 +
 .../org/apache/nlpcraft/probe/NCProbeBoot.scala    |  33 +-
 .../nlpcraft/probe/mgrs/NCProbeVariants.scala      |   9 +
 .../probe/mgrs/deploy/NCDeployManager.scala        |  44 +-
 .../mgrs/model/NCModelSynonymDslCompiler.scala     |   4 +-
 .../model/antlr4/NCSynonymDslBaseListener.java     |   2 +-
 .../probe/mgrs/model/antlr4/NCSynonymDslLexer.java |   4 +-
 .../mgrs/model/antlr4/NCSynonymDslListener.java    |   2 +-
 .../mgrs/model/antlr4/NCSynonymDslParser.java      |   4 +-
 .../probe/mgrs/nlp/NCProbeEnrichmentManager.scala  |  64 +-
 .../dictionary/NCDictionaryEnricher.scala          |  10 +-
 .../mgrs/nlp/enrichers/limit/NCLimitEnricher.scala |   2 +-
 .../org/apache/nlpcraft/server/NCServer.scala      | 121 +--
 .../nlpcraft/server/ignite/NCIgniteHelpers.scala   |   2 +-
 .../server/nlp/core/NCNlpServerManager.scala       |   4 +
 .../nlp/core/opennlp/NCOpenNlpNerEnricher.scala    |   8 +-
 .../server/nlp/core/opennlp/NCOpenNlpParser.scala  |   8 +-
 .../server/nlp/core/spacy/NCSpaCyNerEnricher.scala |  10 +-
 .../nlp/enrichers/NCServerEnrichmentManager.scala  |   3 +
 .../server/nlp/enrichers/date/NCDateEnricher.scala |  17 +-
 .../nlpcraft/server/probe/NCProbeManager.scala     |  26 +-
 .../nlpcraft/server/query/NCQueryManager.scala     |  22 +-
 .../nlpcraft/server/rest/NCBasicRestApi.scala      |  61 +-
 .../nlpcraft/server/rest/NCRestManager.scala       |   5 +-
 .../server/sugsyn/NCSuggestSynonymManager.scala    |  72 +-
 .../nlpcraft/server/user/NCUserManager.scala       |   2 +-
 .../apache/nlpcraft/common/util/NCUtilsSpec.scala  |   8 +-
 .../nlpcraft/examples/sql/NCSqlExampleSpec.scala   |   5 +-
 .../nlpcraft/examples/sql/NCSqlGeneratorSpec.scala |  70 ++
 .../apache/nlpcraft/model/NCIntentDslSpec.scala    |  20 +-
 ...CIntentDslSpec.scala => NCIntentDslSpec2.scala} |  42 +-
 .../nlpcraft/model/NCIntentPrioritiesSpec.scala    |  63 ++
 .../model/conversation/NCConversationSpec.scala    |   1 +
 .../nlpcraft/model/dialog/NCDialogSpec.scala       | 120 +++
 .../intent/impl/NCIntentSolverEngineSpec.scala     |  54 --
 .../nlpcraft/model/tools/cmdline/NCCliSpec.scala   |  32 -
 .../nlpcraft/models/stm/NCStmTestModelSpec.scala   |   7 -
 .../nlp/enrichers/limit/NCEnricherLimitSpec.scala  |  31 +-
 .../nlp/enrichers/sort/NCEnricherSortSpec.scala    |   5 +
 openapi/README.md                                  |   2 +-
 openapi/nlpcraft_swagger.yml                       |   2 +-
 pom.xml                                            | 111 ++-
 106 files changed, 2562 insertions(+), 2278 deletions(-)
 rename {nlpcraft/src/main/resources => external}/badfilter/swear_words.txt (100%)
 copy nlpcraft/src/main/scala/org/apache/nlpcraft/{model/impl/json/NCMacroJson.java => common/module/NCModule.scala} (61%)
 create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/common/pool/NCThreadPoolManager.scala
 copy nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/{LightSwitchModel.scala => LightSwitchGroovyModel.groovy} (51%)
 create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchJavaModel.java
 copy nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/{LightSwitchModel.scala => LightSwitchKotlinModel.kt} (54%)
 delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/utils/NCDslFlowItem.scala
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/examples/sql/NCSqlGeneratorSpec.scala
 copy nlpcraft/src/test/scala/org/apache/nlpcraft/model/{NCIntentDslSpec.scala => NCIntentDslSpec2.scala} (55%)
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala
 create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
 delete mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverEngineSpec.scala
 delete mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliSpec.scala


[incubator-nlpcraft] 03/12: NLPCRAFT-91: Initial model for weather command

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5cf788839e0798e083f891ca873ca04828e41cba
Author: Ifropc <if...@apache.org>
AuthorDate: Sun Dec 20 23:25:17 2020 -0800

    NLPCRAFT-91: Initial model for weather command
---
 .../org/apache/nlpcraft/example/MinecraftModel.kt  | 19 ++----
 .../src/main/resources/minecraft.yaml              | 48 +++++++++----
 nlpcraft-examples/src/main/resources/nlpcraft.conf | 78 ++++++++++++++++++++++
 3 files changed, 121 insertions(+), 24 deletions(-)

diff --git a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index 4f5593f..76cedd9 100644
--- a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
+++ b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
@@ -21,18 +21,13 @@ package org.apache.nlpcraft.example
 import org.apache.nlpcraft.model.*
 
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
+    @NCIntentRef("weatherIntent")
+    @Suppress("unused")
+    fun onMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
+        if (ctx.isAmbiguous) {
+            throw NCRejection("Ambiguous request")
+        }
 
-    @NCIntentRef("intentId")
-    fun onMatch(ctx: NCIntentMatch, @NCIntentTerm("element") tok: NCToken): NCResult {
-        // TODO: add the actual intent logic here.
-
-        // As a placeholder - just return an echo string.
-        return NCResult.text(
-            String.format(
-                "Word `%s` found in text: `%s`",
-                tok.originalText,
-                ctx.context.request.normalizedText
-            )
-        )
+        return NCResult.text("weather ${tok.id}")
     }
 }
diff --git a/nlpcraft-examples/src/main/resources/minecraft.yaml b/nlpcraft-examples/src/main/resources/minecraft.yaml
index 0306294..872bf90 100644
--- a/nlpcraft-examples/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/src/main/resources/minecraft.yaml
@@ -1,21 +1,45 @@
-# Mandatory model configuration.
-id: minecraft
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+id: nlpcraft.minecraft.ex
 name: Minecraft Model
 version: '1.0'
 description: Minecraft Model.
 
-# List of macros, if any.
-macros:
-  - name: "<MY_MACRO>"
-    macro: "{word1|word2}"
-
-# List of model elements.
 elements:
-  - id: elementId
-    description: An element.
+  - id: rain
+    description: Set rain weather
+    groups:
+      - weather
+    synonyms:
+      - "{rain|rainy}"
+  - id: sun
+    description: Set sunny weather
+    groups:
+      - weather
+    synonyms:
+      - "{sun|sunny|clear sky}"
+  - id: storm
+    description: Set stormy weather
+    groups:
+      - weather
     synonyms:
-      - "{some|*} <MY_MACRO>"
+      - "{thunder|storm|stormy}"
 
 # List of model intents.
 intents:
-  - intent=intentId term(element)={id == 'elementId'}
+  - intent=weatherIntent term(arg)={groups @@ 'weather'}
diff --git a/nlpcraft-examples/src/main/resources/nlpcraft.conf b/nlpcraft-examples/src/main/resources/nlpcraft.conf
new file mode 100644
index 0000000..f9b4a44
--- /dev/null
+++ b/nlpcraft-examples/src/main/resources/nlpcraft.conf
@@ -0,0 +1,78 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+nlpcraft {
+    server {
+        lifecycle = ""
+        database {
+            jdbc {
+                url = "jdbc:ignite:thin://127.0.0.1/nlpcraft"
+                driver = org.apache.ignite.IgniteJdbcThinDriver
+            }
+            igniteDbInitialize = false
+            c3p0 {
+                maxStatements = 180
+                pool {
+                    initSize = 10
+                    minSize = 1
+                    maxSize = 50
+                    acquireIncrement = 2
+                }
+            }
+        }
+        rest {
+            host = "0.0.0.0"
+            port = 8081
+            apiImpl = "org.apache.nlpcraft.server.rest.NCBasicRestApi"
+        }
+        user {
+            pwdPoolBlowup = 3
+            timeoutScannerFreqMins = 1
+            accessTokenExpireTimeoutMins = 60
+        }
+        probe {
+            links {
+                upLink = "0.0.0.0:8201" # Server to probe data pipe.
+                downLink = "0.0.0.0:8202" # Probe to server data pipe.
+            }
+            pingTimeoutMs = 2000
+            soTimeoutMs = 5000
+            reconnectTimeoutMs = 5000
+        }
+        datesFormatStyle = MDY
+        tokenProviders = "nlpcraft"
+        ctxword.url="http://localhost:5000"
+    }
+
+    nlpEngine = "opennlp"
+
+    extConfig {
+        extUrl = "https://github.com/apache/incubator-nlpcraft/raw/master/external"
+        checkMd5 = true
+    }
+    probe {
+        id = "extended.examples"
+        token = "3141592653589793"
+        upLink = "0.0.0.0:8201"   # Server to probe data pipe.
+        downLink = "0.0.0.0:8202" # Probe to server data pipe.
+        jarsFolder = null
+        models =
+            """org.apache.nlpcraft.example.MinecraftModel"""
+        lifecycle = ""
+        resultMaxSizeBytes = 1048576
+    }
+}


[incubator-nlpcraft] 09/12: NLPCRAFT-91: Add README

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e410bb46b4f0a88a09b55ed18519ee7ac276978a
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Dec 23 21:14:52 2020 -0800

    NLPCRAFT-91: Add README
---
 nlpcraft-examples/minecraft-model/README.md | 56 +++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
new file mode 100644
index 0000000..4b1dd2a
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -0,0 +1,56 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<img src="https://nlpcraft.apache.org/images/nlpcraft_logo_black.gif" height="80px" alt="">
+<br>
+
+[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/apache/opennlp/master/LICENSE)
+[![build](https://github.com/apache/incubator-nlpcraft/workflows/build/badge.svg)](https://github.com/apache/incubator-nlpcraft/actions)
+[![Documentation Status](https://img.shields.io/:docs-latest-green.svg)](https://nlpcraft.apache.org/docs.html)
+[![Gitter](https://badges.gitter.im/apache-nlpcraft/community.svg)](https://gitter.im/apache-nlpcraft/community)
+
+### Overview
+This module is part of Minecraft example. This part provides model for Minecraft server commands. 
+Seconds part (**../minecraft-mod**) provides mod for Minecraft server sending requests to the NLPCraft server.
+
+### Startup
+Start server normally. For running probe it's required to use dedicated configuration located in [resouces folder](src/main/resources/nlpcraft.conf)
+
+### Installation
+1. Download [Minecraft client](https://www.minecraft.net/en-us/download)
+2. Download [Forge server installer](https://files.minecraftforge.net/) and follow instructions
+3. Build mod (`cd ../minecraft-mod && ./gradlew clean build`)
+4. Copy mod to mods folder of your forge server folder (`cp build/libs/nlpcraft-mod-*.jar <forge-server-location>/mods`)
+5. Start server (`java -jar forge.jar`). For detailed instructions refer to [wiki](https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server)
+6. Server commands could be invoked directly from server CLI.
+7. Using Forge client is not required, vanilla client from step 1 could be used
+8. Connect to the server from client and play!
+
+### Usage
+After starting Minecraft server with mod, you can use natural language to invoke certain commands. It's not required to
+use modded client, so vanilla client could be used. Commands could be either invoked on server side (e.g. `make it sunny`) or
+on client side, prefixed with slash (`/make it sunny`)
+
+### Supported commands
+| Command | Example of usage |
+| :---: |:---:|
+`/weather` | All those moments will be lost in time, like tears in rain | 
+
+### Copyright
+Copyright (C) 2020 Apache Software Foundation
+
+<img src="https://www.apache.org/img/ASF20thAnniversary.jpg" height="64px" alt="ASF Logo">


[incubator-nlpcraft] 12/12: NLPCRAFT-91: Add /time command support

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fbf2b9328a42e6cd438541e7d1ccc14876d6928e
Author: Ifropc <if...@apache.org>
AuthorDate: Sun Dec 27 19:07:31 2020 -0800

    NLPCRAFT-91: Add /time command support
---
 nlpcraft-examples/minecraft-model/README.md        |  3 +-
 .../org/apache/nlpcraft/example/MinecraftModel.kt  | 23 +++++++++++++++-
 .../src/main/resources/minecraft.yaml              | 32 ++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
index 6b504e3..67b5002 100644
--- a/nlpcraft-examples/minecraft-model/README.md
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -47,7 +47,8 @@ on client side, prefixed with slash (`/make it sunny`)
 ### Supported commands
 | Command | Example of usage |
 | :---: |:---:|
-`/weather` | All those moments will be lost in time, like tears in rain | 
+`/weather` | Make it rain | 
+`/time` | Set current time to evening | 
 
 ### Copyright
 Copyright (C) 2020 Apache Software Foundation
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 76cedd9..676066a 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
@@ -18,16 +18,37 @@
 
 package org.apache.nlpcraft.example
 
+import org.apache.nlpcraft.common.NCException
 import org.apache.nlpcraft.model.*
 
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     @NCIntentRef("weatherIntent")
     @Suppress("unused")
-    fun onMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
+    fun onWeatherMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
         }
 
         return NCResult.text("weather ${tok.id}")
     }
+
+    @NCIntentRef("timeIntent")
+    @Suppress("unused")
+    fun onTimeMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
+        if (ctx.isAmbiguous) {
+            throw NCRejection("Ambiguous request")
+        }
+
+        val time: Int = when (tok.id) {
+            "morning" -> 23000
+            "day" -> 1000
+            "afternoon" -> 6000
+            "evening" -> 12000
+            "night" -> 12000
+            "midnight" -> 18000
+            else -> null
+        } ?: throw NCException("Invalid token id")
+
+        return NCResult.text("time set $time")
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index a679ddd..f6b37d5 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -40,6 +40,38 @@ elements:
     synonyms:
       - "{thunder|storm|stormy}"
 
+  - id: morning
+    groups:
+      - time
+    synonyms:
+      - "{morning}"
+  - id: day
+    groups:
+      - time
+    synonyms:
+      - "{day}"
+  - id: afternoon
+    groups:
+      - time
+    synonyms:
+      - "{afternoon|noon}"
+  - id: evening
+    groups:
+      - time
+    synonyms:
+      - "{evening}"
+  - id: night
+    groups:
+      - time
+    synonyms:
+      - "{night}"
+  - id: midnight
+    groups:
+      - time
+    synonyms:
+      - "{midnight}"
+
 # List of model intents.
 intents:
   - intent=weatherIntent term(arg)={groups @@ 'weather'}
+  - intent=timeIntent term(arg)={groups @@ 'time'}


[incubator-nlpcraft] 04/12: NLPCRAFT-91: Organize model files

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fbe6a5f6f09ec3289ff6a921ae21582af77c5303
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Dec 21 18:55:27 2020 -0800

    NLPCRAFT-91: Organize model files
---
 nlpcraft-examples/{ => minecraft-model}/pom.xml    |  4 +--
 .../org/apache/nlpcraft/example/MinecraftModel.kt  |  0
 .../src/main/resources/minecraft.yaml              |  0
 .../src/main/resources/nlpcraft.conf               |  0
 .../org/apache/nlpcraft/example/ExampleTest.kt     | 30 ----------------------
 pom.xml                                            |  4 +--
 6 files changed, 4 insertions(+), 34 deletions(-)

diff --git a/nlpcraft-examples/pom.xml b/nlpcraft-examples/minecraft-model/pom.xml
similarity index 97%
rename from nlpcraft-examples/pom.xml
rename to nlpcraft-examples/minecraft-model/pom.xml
index 97637b5..160ceb8 100644
--- a/nlpcraft-examples/pom.xml
+++ b/nlpcraft-examples/minecraft-model/pom.xml
@@ -21,8 +21,8 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
-    <name>NLPCraft - Examples</name>
-    <artifactId>nlpcraft-examples</artifactId>
+    <name>NLPCraft example Minecraft model</name>
+    <artifactId>minecraft-model</artifactId>
 
     <parent>
         <groupId>org.apache.nlpcraft</groupId>
diff --git a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
similarity index 100%
rename from nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
rename to nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
diff --git a/nlpcraft-examples/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
similarity index 100%
rename from nlpcraft-examples/src/main/resources/minecraft.yaml
rename to nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
diff --git a/nlpcraft-examples/src/main/resources/nlpcraft.conf b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft.conf
similarity index 100%
rename from nlpcraft-examples/src/main/resources/nlpcraft.conf
rename to nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft.conf
diff --git a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
deleted file mode 100644
index e1b4271..0000000
--- a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.nlpcraft.example
-
-import org.junit.jupiter.api.Assertions
-import org.junit.jupiter.api.Test
-
-class ExampleTest {
-    @Test
-    fun testPass() {
-        Assertions.assertTrue(true)
-    }
-}
-
diff --git a/pom.xml b/pom.xml
index 0a1eabe..b4af369 100644
--- a/pom.xml
+++ b/pom.xml
@@ -727,9 +727,9 @@
         </profile>
 
         <profile>
-            <id>examples</id>
+            <id>example-minecraft</id>
             <modules>
-                <module>nlpcraft-examples</module>
+                <module>nlpcraft-examples/minecraft-model</module>
             </modules>
         </profile>
 


[incubator-nlpcraft] 08/12: NLPCRAFT-91: Add sign in to mod

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2ef6c00fde38403b475c7f0d252990a188f18e1a
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Dec 23 20:29:37 2020 -0800

    NLPCRAFT-91: Add sign in to mod
---
 .../org/apache/nplcraft/example/ExampleMod.java    | 53 +++++++++++++++++-----
 1 file changed, 41 insertions(+), 12 deletions(-)

diff --git a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
index e92966a..12b5039 100644
--- a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
+++ b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
@@ -40,6 +40,7 @@ public class ExampleMod {
     private static final Logger LOGGER = LogManager.getLogger();
     private final Gson gson = new Gson();
     private MinecraftServer server;
+    private Optional<String> token = Optional.empty();
     private boolean inRecursion = false;
 
     public ExampleMod() {
@@ -71,24 +72,44 @@ public class ExampleMod {
     }
 
     private Optional<NCResponse> askProbe(String txt) {
-        try {
-            AskParams params = new AskParams();
-            params.txt = txt.startsWith("/") ? txt.substring(1) : txt;
+        AskParams params = new AskParams();
+        params.txt = txt.startsWith("/") ? txt.substring(1) : txt;
+
+        Optional<String> optional = getToken();
+        if (!optional.isPresent()) {
+            return Optional.empty();
+        }
+        params.acsTok = optional.get();
+
+        return post("ask/sync", gson.toJson(params), NCResponse.class);
+    }
+
+    private Optional<String> getToken() {
+        if (!token.isPresent()) {
+            // TODO
+            NCSignIn sign = new NCSignIn();
+            sign.email = "admin@admin.com";
+            sign.passwd = "admin";
+
+            token = post("signin", gson.toJson(sign), NCSignResponse.class).map(x -> x.acsTok);
+        }
 
-            String str = "http://0.0.0.0:8081/api/v1/ask/sync";
+        return token;
+    }
+
+    private <T> Optional<T> post(String url, String postJson, Class<T> clazz) {
+        try {
+            String str = "http://0.0.0.0:8081/api/v1/" + url;
 
-            URL url = new URL(str);
-            HttpURLConnection http = (HttpURLConnection) url.openConnection();
+            HttpURLConnection http = (HttpURLConnection) new URL(str).openConnection();
             http.setRequestMethod("POST"); // PUT is another valid option
             http.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
             http.setConnectTimeout(1_000);
             http.setReadTimeout(1_000);
 
-            String postJsonData = gson.toJson(params);
-
             http.setDoOutput(true);
             DataOutputStream wr = new DataOutputStream(http.getOutputStream());
-            wr.writeBytes(postJsonData);
+            wr.writeBytes(postJson);
             wr.flush();
             wr.close();
 
@@ -96,7 +117,7 @@ public class ExampleMod {
 
             BufferedReader in = new BufferedReader(new InputStreamReader(http.getInputStream()));
 
-            NCResponse response = gson.fromJson(in, NCResponse.class);
+            T response = gson.fromJson(in, clazz);
 
             return Optional.of(response);
         } catch (Exception e) {
@@ -107,9 +128,8 @@ public class ExampleMod {
     }
 
     private class AskParams {
-        // TODO
-        private final String acsTok = "4oe8dBpnpoSAbLo9BbzaL";
         private final String mdlId = "nlpcraft.minecraft.ex";
+        private String acsTok;
         private String txt;
 
         @Override
@@ -151,4 +171,13 @@ public class ExampleMod {
                     '}';
         }
     }
+
+    private class NCSignIn {
+        String email;
+        String passwd;
+    }
+
+    private class NCSignResponse {
+        private String acsTok;
+    }
 }


[incubator-nlpcraft] 11/12: NLPCRAFT-91: Settings support for mod and cleanup data files

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 740261a15face065ec2c473601a08089b7a2672f
Author: Ifropc <if...@apache.org>
AuthorDate: Sun Dec 27 18:12:06 2020 -0800

    NLPCRAFT-91: Settings support for mod and cleanup data files
---
 .../org/apache/nplcraft/example/ExampleMod.java    | 56 +++++++++-------------
 nlpcraft-examples/minecraft-model/README.md        |  2 +-
 .../src/main/resources/nlpcraft-credentials.json   |  4 --
 .../src/main/resources/nlpcraft-settings.json      |  6 +++
 4 files changed, 30 insertions(+), 38 deletions(-)

diff --git a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
index 02628e3..577e890 100644
--- a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
+++ b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
@@ -23,6 +23,7 @@ import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Optional;
@@ -42,6 +43,7 @@ public class ExampleMod {
     private static final String MODEL_ID = "nlpcraft.minecraft.ex";
     private final Gson gson = new Gson();
     private NCSignIn creds;
+    private String baseUrl;
     private MinecraftServer server;
     private Optional<String> token = Optional.empty();
     private boolean inRecursion = false;
@@ -89,7 +91,7 @@ public class ExampleMod {
 
     private Optional<String> getToken() {
         if (!token.isPresent()) {
-            obtainCreds();
+            loadSettings();
 
             token = post("signin", gson.toJson(creds), NCSignResponse.class).map(x -> x.acsTok);
         }
@@ -99,7 +101,7 @@ public class ExampleMod {
 
     private <T> Optional<T> post(String url, String postJson, Class<T> clazz) {
         try {
-            String str = "http://0.0.0.0:8081/api/v1/" + url;
+            String str = baseUrl + url;
 
             HttpURLConnection http = (HttpURLConnection) new URL(str).openConnection();
             http.setRequestMethod("POST"); // PUT is another valid option
@@ -127,52 +129,43 @@ public class ExampleMod {
         return Optional.empty();
     }
 
-    private void obtainCreds() {
+    private void loadSettings() {
         creds = new NCSignIn();
         creds.email = "admin@admin.com";
         creds.passwd = "admin";
+        String host = "0.0.0.0";
+        String port = "8081";
 
         Path configDir = Paths.get("config");
 
-        Path jsonPath = FileUtil.resolveResourcePath(configDir, "nlpcraft-credentials", ".json");
+        Path jsonPath = FileUtil.resolveResourcePath(configDir, "nlpcraft-settings", ".json");
 
         try {
             Reader reader = Files.newBufferedReader(jsonPath);
 
-            creds = gson.fromJson(reader, NCSignIn.class);
-        } catch (FileNotFoundException e) {
+            NCSettings settings = gson.fromJson(reader, NCSettings.class);
+            creds.email = settings.email;
+            creds.passwd = settings.passwd;
+            host = settings.host;
+            port = settings.port;
+        } catch (NoSuchFileException e) {
             LOGGER.info("Credentials were not found");
         } catch (IOException e) {
             LOGGER.error(e);
         }
+
+        baseUrl = "http://" + host + ":" + port + "/api/v1/";
     }
 
     private class AskParams {
         private final String mdlId = MODEL_ID;
         private String acsTok;
         private String txt;
-
-        @Override
-        public String toString() {
-            return "AskParams{" +
-                    "acsTok='" + acsTok + '\'' +
-                    ", mdlId='" + mdlId + '\'' +
-                    ", txt='" + txt + '\'' +
-                    '}';
-        }
     }
 
     private class NCResponse {
         private String status;
         private NCState state;
-
-        @Override
-        public String toString() {
-            return "NCResponse{" +
-                    "status='" + status + '\'' +
-                    ", state=" + state +
-                    '}';
-        }
     }
 
     private class NCState {
@@ -180,16 +173,6 @@ public class ExampleMod {
         private String error;
         private String status;
         private String resBody;
-
-        @Override
-        public String toString() {
-            return "NCState{" +
-                    "errorCode=" + errorCode +
-                    ", error='" + error + '\'' +
-                    ", status='" + status + '\'' +
-                    ", resBody='" + resBody + '\'' +
-                    '}';
-        }
     }
 
     private class NCSignIn {
@@ -200,4 +183,11 @@ public class ExampleMod {
     private class NCSignResponse {
         private String acsTok;
     }
+
+    private class NCSettings {
+        private String email;
+        private String passwd;
+        private String host;
+        private String port;
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
index 1fd3605..6b504e3 100644
--- a/nlpcraft-examples/minecraft-model/README.md
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -35,7 +35,7 @@ Start server normally. For running probe it's required to use dedicated configur
 1. Download [Forge server installer](https://files.minecraftforge.net/) and follow instructions
 1. Build mod (`cd ../minecraft-mod && ./gradlew clean build`)
 1. Copy mod to mods folder of your forge server folder (`cp build/libs/nlpcraft-mod-*.jar <forge-server-location>/mods`)
-1. (Optional) if non-default credentials are used, put them in `main/resources/nlpcraft-credentials.json` and copy file to `<forge-server-location>/config`
+1. (Optional) If non-default settings are used, put them in `main/resources/nlpcraft-settings.json` and copy file to `<forge-server-location>/config`
 1. Start server (`java -jar forge.jar`). For detailed instructions refer to [wiki](https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server)
 1. Connect to the server from client and play!
 
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json
deleted file mode 100644
index cb7ceef..0000000
--- a/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "email": "admin@admin.com",
-  "passwd": "admin"
-}
\ No newline at end of file
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-settings.json b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-settings.json
new file mode 100644
index 0000000..e1a4eae
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-settings.json
@@ -0,0 +1,6 @@
+{
+  "email": "admin@admin.com",
+  "passwd": "admin",
+  "host": "0.0.0.0",
+  "port": 8081
+}
\ No newline at end of file


[incubator-nlpcraft] 07/12: NLPCRAFT-91: Fix build after restructure

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c0e96f9b6ec510c2284d92e2fcf3d38efdfc6457
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Dec 23 20:06:01 2020 -0800

    NLPCRAFT-91: Fix build after restructure
---
 nlpcraft-examples/minecraft-model/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/pom.xml b/nlpcraft-examples/minecraft-model/pom.xml
index 160ceb8..a1bbd7f 100644
--- a/nlpcraft-examples/minecraft-model/pom.xml
+++ b/nlpcraft-examples/minecraft-model/pom.xml
@@ -27,8 +27,8 @@
     <parent>
         <groupId>org.apache.nlpcraft</groupId>
         <artifactId>nlpcraft-parent</artifactId>
-        <version>0.7.2</version>
-        <relativePath>../</relativePath>
+        <version>0.7.3</version>
+        <relativePath>../../</relativePath>
     </parent>
 
     <properties>


[incubator-nlpcraft] 01/12: NLPCRAFT-91: Initial files

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f2642e9ed94a59e9fc7e70cdbd6f31a6b6ac8c92
Author: Ifropc <if...@apache.org>
AuthorDate: Sun Dec 13 15:38:19 2020 -0800

    NLPCRAFT-91: Initial files
---
 nlpcraft-examples/pom.xml                          | 91 ++++++++++++++++++++++
 .../kotlin/org/apache/nlpcraft/example/Example.kt  | 23 ++++++
 .../org/apache/nlpcraft/example/ExampleTest.kt     | 32 ++++++++
 pom.xml                                            |  7 ++
 4 files changed, 153 insertions(+)

diff --git a/nlpcraft-examples/pom.xml b/nlpcraft-examples/pom.xml
new file mode 100644
index 0000000..97637b5
--- /dev/null
+++ b/nlpcraft-examples/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>NLPCraft - Examples</name>
+    <artifactId>nlpcraft-examples</artifactId>
+
+    <parent>
+        <groupId>org.apache.nlpcraft</groupId>
+        <artifactId>nlpcraft-parent</artifactId>
+        <version>0.7.2</version>
+        <relativePath>../</relativePath>
+    </parent>
+
+    <properties>
+        <kotlin.ver>1.4.10</kotlin.ver>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>nlpcraft</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib</artifactId>
+            <version>${kotlin.ver}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <version>${kotlin.ver}</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>src/main/kotlin</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>test-compile</id>
+                        <phase>test-compile</phase>
+                        <goals>
+                            <goal>test-compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>src/test/kotlin</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt
new file mode 100644
index 0000000..2591725
--- /dev/null
+++ b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.nlpcraft.example
+
+fun testExample() {
+    print("Test")
+}
\ No newline at end of file
diff --git a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
new file mode 100644
index 0000000..6b25e48
--- /dev/null
+++ b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.nlpcraft.example
+
+import org.junit.jupiter.api.Assertions
+import org.junit.jupiter.api.Test
+
+class ExampleTest {
+    @Test
+    fun testPass() {
+        testExample()
+
+        Assertions.assertTrue(true)
+    }
+}
+
diff --git a/pom.xml b/pom.xml
index 00a0d97..0a1eabe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -727,6 +727,13 @@
         </profile>
 
         <profile>
+            <id>examples</id>
+            <modules>
+                <module>nlpcraft-examples</module>
+            </modules>
+        </profile>
+
+        <profile>
             <id>release</id>
             <activation>
                 <property>


[incubator-nlpcraft] 02/12: NLPCRAFT-91: Base stubs for Minecraft example

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dd63d2e75b64beb07093a9762ac779097f4d4b2f
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Dec 17 22:35:40 2020 -0800

    NLPCRAFT-91: Base stubs for Minecraft example
---
 .../example/{Example.kt => MinecraftModel.kt}       | 21 ++++++++++++++++++---
 nlpcraft-examples/src/main/resources/minecraft.yaml | 21 +++++++++++++++++++++
 .../org/apache/nlpcraft/example/ExampleTest.kt      |  2 --
 3 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
similarity index 60%
rename from nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt
rename to nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index 2591725..4f5593f 100644
--- a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt
+++ b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
@@ -18,6 +18,21 @@
 
 package org.apache.nlpcraft.example
 
-fun testExample() {
-    print("Test")
-}
\ No newline at end of file
+import org.apache.nlpcraft.model.*
+
+class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
+
+    @NCIntentRef("intentId")
+    fun onMatch(ctx: NCIntentMatch, @NCIntentTerm("element") tok: NCToken): NCResult {
+        // TODO: add the actual intent logic here.
+
+        // As a placeholder - just return an echo string.
+        return NCResult.text(
+            String.format(
+                "Word `%s` found in text: `%s`",
+                tok.originalText,
+                ctx.context.request.normalizedText
+            )
+        )
+    }
+}
diff --git a/nlpcraft-examples/src/main/resources/minecraft.yaml b/nlpcraft-examples/src/main/resources/minecraft.yaml
new file mode 100644
index 0000000..0306294
--- /dev/null
+++ b/nlpcraft-examples/src/main/resources/minecraft.yaml
@@ -0,0 +1,21 @@
+# Mandatory model configuration.
+id: minecraft
+name: Minecraft Model
+version: '1.0'
+description: Minecraft Model.
+
+# List of macros, if any.
+macros:
+  - name: "<MY_MACRO>"
+    macro: "{word1|word2}"
+
+# List of model elements.
+elements:
+  - id: elementId
+    description: An element.
+    synonyms:
+      - "{some|*} <MY_MACRO>"
+
+# List of model intents.
+intents:
+  - intent=intentId term(element)={id == 'elementId'}
diff --git a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
index 6b25e48..e1b4271 100644
--- a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
+++ b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt
@@ -24,8 +24,6 @@ import org.junit.jupiter.api.Test
 class ExampleTest {
     @Test
     fun testPass() {
-        testExample()
-
         Assertions.assertTrue(true)
     }
 }


[incubator-nlpcraft] 10/12: NLPCRAFT-91: Improve credentials handling

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5eaeafa2c07227f38216e34a6834a3ba0a549482
Author: Ifropc <if...@apache.org>
AuthorDate: Sun Dec 27 17:49:37 2020 -0800

    NLPCRAFT-91: Improve credentials handling
---
 .../org/apache/nplcraft/example/ExampleMod.java    | 50 +++++++++++++++-------
 nlpcraft-examples/minecraft-model/README.md        | 13 +++---
 .../src/main/resources/nlpcraft-credentials.json   |  4 ++
 3 files changed, 45 insertions(+), 22 deletions(-)

diff --git a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
index 12b5039..02628e3 100644
--- a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
+++ b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
@@ -19,7 +19,15 @@
 package org.apache.nplcraft.example;
 
 import com.google.gson.Gson;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Optional;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.FileUtil;
 import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.event.CommandEvent;
 import net.minecraftforge.eventbus.api.SubscribeEvent;
@@ -28,17 +36,12 @@ import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Optional;
-
 @Mod("nlpcraft_mod")
 public class ExampleMod {
     private static final Logger LOGGER = LogManager.getLogger();
+    private static final String MODEL_ID = "nlpcraft.minecraft.ex";
     private final Gson gson = new Gson();
+    private NCSignIn creds;
     private MinecraftServer server;
     private Optional<String> token = Optional.empty();
     private boolean inRecursion = false;
@@ -86,12 +89,9 @@ public class ExampleMod {
 
     private Optional<String> getToken() {
         if (!token.isPresent()) {
-            // TODO
-            NCSignIn sign = new NCSignIn();
-            sign.email = "admin@admin.com";
-            sign.passwd = "admin";
+            obtainCreds();
 
-            token = post("signin", gson.toJson(sign), NCSignResponse.class).map(x -> x.acsTok);
+            token = post("signin", gson.toJson(creds), NCSignResponse.class).map(x -> x.acsTok);
         }
 
         return token;
@@ -127,8 +127,28 @@ public class ExampleMod {
         return Optional.empty();
     }
 
+    private void obtainCreds() {
+        creds = new NCSignIn();
+        creds.email = "admin@admin.com";
+        creds.passwd = "admin";
+
+        Path configDir = Paths.get("config");
+
+        Path jsonPath = FileUtil.resolveResourcePath(configDir, "nlpcraft-credentials", ".json");
+
+        try {
+            Reader reader = Files.newBufferedReader(jsonPath);
+
+            creds = gson.fromJson(reader, NCSignIn.class);
+        } catch (FileNotFoundException e) {
+            LOGGER.info("Credentials were not found");
+        } catch (IOException e) {
+            LOGGER.error(e);
+        }
+    }
+
     private class AskParams {
-        private final String mdlId = "nlpcraft.minecraft.ex";
+        private final String mdlId = MODEL_ID;
         private String acsTok;
         private String txt;
 
@@ -173,8 +193,8 @@ public class ExampleMod {
     }
 
     private class NCSignIn {
-        String email;
-        String passwd;
+        private String email;
+        private String passwd;
     }
 
     private class NCSignResponse {
diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
index 4b1dd2a..1fd3605 100644
--- a/nlpcraft-examples/minecraft-model/README.md
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -32,13 +32,12 @@ Start server normally. For running probe it's required to use dedicated configur
 
 ### Installation
 1. Download [Minecraft client](https://www.minecraft.net/en-us/download)
-2. Download [Forge server installer](https://files.minecraftforge.net/) and follow instructions
-3. Build mod (`cd ../minecraft-mod && ./gradlew clean build`)
-4. Copy mod to mods folder of your forge server folder (`cp build/libs/nlpcraft-mod-*.jar <forge-server-location>/mods`)
-5. Start server (`java -jar forge.jar`). For detailed instructions refer to [wiki](https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server)
-6. Server commands could be invoked directly from server CLI.
-7. Using Forge client is not required, vanilla client from step 1 could be used
-8. Connect to the server from client and play!
+1. Download [Forge server installer](https://files.minecraftforge.net/) and follow instructions
+1. Build mod (`cd ../minecraft-mod && ./gradlew clean build`)
+1. Copy mod to mods folder of your forge server folder (`cp build/libs/nlpcraft-mod-*.jar <forge-server-location>/mods`)
+1. (Optional) if non-default credentials are used, put them in `main/resources/nlpcraft-credentials.json` and copy file to `<forge-server-location>/config`
+1. Start server (`java -jar forge.jar`). For detailed instructions refer to [wiki](https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server)
+1. Connect to the server from client and play!
 
 ### Usage
 After starting Minecraft server with mod, you can use natural language to invoke certain commands. It's not required to
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json
new file mode 100644
index 0000000..cb7ceef
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/nlpcraft-credentials.json
@@ -0,0 +1,4 @@
+{
+  "email": "admin@admin.com",
+  "passwd": "admin"
+}
\ No newline at end of file


[incubator-nlpcraft] 05/12: NLPCRAFT-91: Fix minecraft model

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit daded2c3e68402d0c66a3c580a05815a17881357
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Dec 21 20:59:52 2020 -0800

    NLPCRAFT-91: Fix minecraft model
---
 nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 872bf90..a679ddd 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -27,13 +27,13 @@ elements:
       - weather
     synonyms:
       - "{rain|rainy}"
-  - id: sun
+  - id: clear
     description: Set sunny weather
     groups:
       - weather
     synonyms:
       - "{sun|sunny|clear sky}"
-  - id: storm
+  - id: thunder
     description: Set stormy weather
     groups:
       - weather


[incubator-nlpcraft] 06/12: NLPCRAFT-91: Add mod for Minecraft as example

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 44c84fdfb131806a79828565e4265bd18d6f5efd
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Dec 21 21:01:52 2020 -0800

    NLPCRAFT-91: Add mod for Minecraft as example
---
 nlpcraft-examples/minecraft-mod/.gitignore         |   3 +
 nlpcraft-examples/minecraft-mod/LICENSE.txt        | 520 +++++++++++++++++++++
 nlpcraft-examples/minecraft-mod/build.gradle       |  70 +++
 .../gradle/wrapper/gradle-wrapper.jar              | Bin 0 -> 54708 bytes
 .../gradle/wrapper/gradle-wrapper.properties       |   5 +
 nlpcraft-examples/minecraft-mod/gradlew            | 172 +++++++
 nlpcraft-examples/minecraft-mod/gradlew.bat        |  84 ++++
 .../org/apache/nplcraft/example/ExampleMod.java    | 154 ++++++
 .../src/main/resources/META-INF/mods.toml          |  28 ++
 9 files changed, 1036 insertions(+)

diff --git a/nlpcraft-examples/minecraft-mod/.gitignore b/nlpcraft-examples/minecraft-mod/.gitignore
new file mode 100644
index 0000000..b6f374b
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/.gitignore
@@ -0,0 +1,3 @@
+logs
+.gradle
+build
\ No newline at end of file
diff --git a/nlpcraft-examples/minecraft-mod/LICENSE.txt b/nlpcraft-examples/minecraft-mod/LICENSE.txt
new file mode 100644
index 0000000..b0cbe2b
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/LICENSE.txt
@@ -0,0 +1,520 @@
+Unless noted below, Minecraft Forge, Forge Mod Loader, and all 
+parts herein are licensed under the terms of the LGPL 2.1 found
+here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and 
+copied below.
+
+Homepage: http://minecraftforge.net/
+          https://github.com/MinecraftForge/MinecraftForge
+          
+
+A note on authorship:
+All source artifacts are property of their original author, with
+the exclusion of the contents of the patches directory and others
+copied from it from time to time. Authorship of the contents of
+the patches directory is retained by the Minecraft Forge project.
+This is because the patches are partially machine generated
+artifacts, and are changed heavily due to the way forge works.
+Individual attribution within them is impossible.
+
+Consent:
+All contributions to Forge must consent to the release of any
+patch content to the Forge project.
+
+A note on infectivity:
+The LGPL is chosen specifically so that projects may depend on Forge
+features without being infected with its license. That is the 
+purpose of the LGPL. Mods and others using this code via ordinary
+Java mechanics for referencing libraries are specifically not bound
+by Forge's license for the Mod code.
+
+
+=== MCP Data ===
+This software includes data from the Minecraft Coder Pack (MCP), with kind permission
+from them. The license to MCP data is not transitive - distribution of this data by
+third parties requires independent licensing from the MCP team. This data is not
+redistributable without permission from the MCP team.
+
+=== Sharing ===
+I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of
+the minecraft modding community. All contributions to these parts should be licensed under the same additional grant.
+
+-- Runtime patcher --
+License is granted to redistribute the runtime patcher code (src/main/java/net/minecraftforge/fml/common/patcher
+and subdirectories) under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
+
+-- ASM transformers --
+License is granted to redistribute the ASM transformer code (src/main/java/net/minecraftforge/common/asm/ and subdirectories)
+under any alternative open source license as classified by the OSI (http://opensource.org/licenses)
+
+=========================================================================
+This software includes portions from the Apache Maven project at
+http://maven.apache.org/ specifically the ComparableVersion.java code. It is
+included based on guidelines at
+http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html
+with notices intact. The only change is a non-functional change of package name.
+
+This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating
+binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/
+authored by genman, heikok, pivot.
+The only changes are to replace some Trove collection types with standard Java collections, and repackaged.
+=========================================================================
+
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
diff --git a/nlpcraft-examples/minecraft-mod/build.gradle b/nlpcraft-examples/minecraft-mod/build.gradle
new file mode 100644
index 0000000..0ab9ebe
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/build.gradle
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+buildscript {
+    repositories {
+        maven { url = 'https://files.minecraftforge.net/maven' }
+        jcenter()
+        mavenCentral()
+    }
+    dependencies {
+        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
+    }
+}
+apply plugin: 'net.minecraftforge.gradle'
+version = '1.0'
+group = 'com.apache.nlpcraft'
+archivesBaseName = 'nlpcraft-mod'
+
+sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
+
+minecraft {
+    mappings channel: 'snapshot', version: '20201028-1.16.3'
+    runs {
+        server {
+            workingDirectory project.file('run')
+            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
+            property 'forge.logging.console.level', 'debug'
+            mods {
+                examplemod {
+                    source sourceSets.main
+                }
+            }
+        }
+    }
+}
+
+dependencies {
+    minecraft 'net.minecraftforge:forge:1.16.4-35.1.13'
+}
+
+jar {
+    manifest {
+        attributes([
+                "Specification-Title"     : "examplemod",
+                "Specification-Vendor"    : "examplemodsareus",
+                "Specification-Version"   : "1",
+                "Implementation-Title"    : project.name,
+                "Implementation-Version"  : "${version}",
+                "Implementation-Vendor"   : "examplemodsareus",
+                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
+        ])
+    }
+}
+
+jar.finalizedBy('reobfJar')
diff --git a/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.jar b/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..7a3265e
Binary files /dev/null and b/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.properties b/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..1d5b29f
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
diff --git a/nlpcraft-examples/minecraft-mod/gradlew b/nlpcraft-examples/minecraft-mod/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/nlpcraft-examples/minecraft-mod/gradlew.bat b/nlpcraft-examples/minecraft-mod/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
new file mode 100644
index 0000000..e92966a
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/src/main/java/org/apache/nplcraft/example/ExampleMod.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.nplcraft.example;
+
+import com.google.gson.Gson;
+import net.minecraft.server.MinecraftServer;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.CommandEvent;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Optional;
+
+@Mod("nlpcraft_mod")
+public class ExampleMod {
+    private static final Logger LOGGER = LogManager.getLogger();
+    private final Gson gson = new Gson();
+    private MinecraftServer server;
+    private boolean inRecursion = false;
+
+    public ExampleMod() {
+        MinecraftForge.EVENT_BUS.register(this);
+    }
+
+    @SubscribeEvent
+    public void onServerStarting(FMLServerStartingEvent event) {
+        this.server = event.getServer();
+    }
+
+    @SubscribeEvent
+    public void onCommandEvent(CommandEvent event) {
+        if (inRecursion) {
+            inRecursion = false;
+            return;
+        }
+        String command = event.getParseResults().getReader().getString();
+        LOGGER.debug("Processing command:" + command);
+        askProbe(command).map(r -> r.state)
+                .filter(s -> s.errorCode == null)
+                .map(s -> s.resBody)
+                .ifPresent(s -> {
+                    LOGGER.info("Command {} was converted to {}", command, s);
+                    event.setCanceled(true);
+                    inRecursion = true;
+                    server.getCommandManager().handleCommand(server.getCommandSource(), "/" + s);
+                });
+    }
+
+    private Optional<NCResponse> askProbe(String txt) {
+        try {
+            AskParams params = new AskParams();
+            params.txt = txt.startsWith("/") ? txt.substring(1) : txt;
+
+            String str = "http://0.0.0.0:8081/api/v1/ask/sync";
+
+            URL url = new URL(str);
+            HttpURLConnection http = (HttpURLConnection) url.openConnection();
+            http.setRequestMethod("POST"); // PUT is another valid option
+            http.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
+            http.setConnectTimeout(1_000);
+            http.setReadTimeout(1_000);
+
+            String postJsonData = gson.toJson(params);
+
+            http.setDoOutput(true);
+            DataOutputStream wr = new DataOutputStream(http.getOutputStream());
+            wr.writeBytes(postJsonData);
+            wr.flush();
+            wr.close();
+
+            LOGGER.debug("Command sent to NC server");
+
+            BufferedReader in = new BufferedReader(new InputStreamReader(http.getInputStream()));
+
+            NCResponse response = gson.fromJson(in, NCResponse.class);
+
+            return Optional.of(response);
+        } catch (Exception e) {
+            LOGGER.error(e);
+        }
+
+        return Optional.empty();
+    }
+
+    private class AskParams {
+        // TODO
+        private final String acsTok = "4oe8dBpnpoSAbLo9BbzaL";
+        private final String mdlId = "nlpcraft.minecraft.ex";
+        private String txt;
+
+        @Override
+        public String toString() {
+            return "AskParams{" +
+                    "acsTok='" + acsTok + '\'' +
+                    ", mdlId='" + mdlId + '\'' +
+                    ", txt='" + txt + '\'' +
+                    '}';
+        }
+    }
+
+    private class NCResponse {
+        private String status;
+        private NCState state;
+
+        @Override
+        public String toString() {
+            return "NCResponse{" +
+                    "status='" + status + '\'' +
+                    ", state=" + state +
+                    '}';
+        }
+    }
+
+    private class NCState {
+        private Integer errorCode;
+        private String error;
+        private String status;
+        private String resBody;
+
+        @Override
+        public String toString() {
+            return "NCState{" +
+                    "errorCode=" + errorCode +
+                    ", error='" + error + '\'' +
+                    ", status='" + status + '\'' +
+                    ", resBody='" + resBody + '\'' +
+                    '}';
+        }
+    }
+}
diff --git a/nlpcraft-examples/minecraft-mod/src/main/resources/META-INF/mods.toml b/nlpcraft-examples/minecraft-mod/src/main/resources/META-INF/mods.toml
new file mode 100644
index 0000000..ae74561
--- /dev/null
+++ b/nlpcraft-examples/minecraft-mod/src/main/resources/META-INF/mods.toml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+modLoader="javafml"
+loaderVersion="[35,)"
+license="Apache"
+[[mods]]
+modId="nlpcraft_mod"
+version="${file.jarVersion}"
+displayName="Nlpcraft example Mod"
+displayURL="https://nlpcraft.apache.org/"
+description='''
+Nlpcraft example mod
+'''
\ No newline at end of file