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/03/19 01:57:55 UTC

[incubator-nlpcraft] branch NLPCRAFT-91 updated (5b1066a -> bf11d2b)

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 5b1066a  NLPCRAFT-91: Add basic test
 discard 24fb531  NLPCRAFT-91: Uncomment macros
 discard 19e58c7  NLPCRAFT-91: Fixes for new syntax
 discard 01fc96e  NLPCRAFT-91: Add examples to MinecraftModel
 discard 241aa8f  NLPCRAFT-91: Finish fill command
 discard fd2595f  NLPCRAFT-91: Small fixes for model
 discard 9410185  NLPCRAFT-91: Support basic /fill command (different shapes and static position)
 discard 0cb9bdb  Add copyright
 discard 76c4101  NLPCRAFT-91: Replace usage of macros with stand-alone element
 discard 0bdf421  Fix regex
 discard cc37c2b  NLPCRAFT-91: fill command draft
 discard 75a4600  Update README
 discard a8acaf2  NLPCRAFT-91: "Give" supports player target and quantity
 discard a1fbd13  NLPCRAFT-91: Give intent support
 discard 86dd15b  Version bump
 discard 4681a0c  NLPCRAFT-91: Add /time command support
 discard d96a89c  NLPCRAFT-91: Settings support for mod and cleanup data files
 discard c687773  NLPCRAFT-91: Improve credentials handling
 discard 133789e  NLPCRAFT-91: Add README
 discard 69daa91  NLPCRAFT-91: Add sign in to mod
 discard 8bcbb29  NLPCRAFT-91: Fix build after restructure
 discard 0328dfc  NLPCRAFT-91: Add mod for Minecraft as example
 discard 567282c  NLPCRAFT-91: Fix minecraft model
 discard 71a3574  NLPCRAFT-91: Organize model files
 discard fa81e86  NLPCRAFT-91: Initial model for weather command
 discard a819544  NLPCRAFT-91: Base stubs for Minecraft example
 discard d603378  NLPCRAFT-91: Initial files
     add 1b19154  Sentences collapsing performance improvements.
     add 3146084  DSL synonyms processing refactoring.
     add db066f4  Minor refactoring.
     add dee0744  Minor performance improvements.
     add fbe5c8e  Similar sentences (with different 'direct' synonyms property) processing fixes.
     add df67add  Update NCCli.scala
     add 1cb2df3  Update NCCli.scala
     add 19d4491  Update NCCli.scala
     new 66fade4  NLPCRAFT-91: Initial files
     new 6b962c1  NLPCRAFT-91: Base stubs for Minecraft example
     new e210a73  NLPCRAFT-91: Initial model for weather command
     new 8f66b0d  NLPCRAFT-91: Organize model files
     new 5440357  NLPCRAFT-91: Fix minecraft model
     new 7c896b9  NLPCRAFT-91: Add mod for Minecraft as example
     new dff94ee  NLPCRAFT-91: Fix build after restructure
     new 5d903f0  NLPCRAFT-91: Add sign in to mod
     new b28cf43  NLPCRAFT-91: Add README
     new 24cf30c  NLPCRAFT-91: Improve credentials handling
     new 7d50239  NLPCRAFT-91: Settings support for mod and cleanup data files
     new 5b738c4  NLPCRAFT-91: Add /time command support
     new 158253b  Version bump
     new b3bbc9b  NLPCRAFT-91: Give intent support
     new c590a61  NLPCRAFT-91: "Give" supports player target and quantity
     new 113f5c8  Update README
     new ca905a8  NLPCRAFT-91: fill command draft
     new 96bbcc7  Fix regex
     new 19173f3  NLPCRAFT-91: Replace usage of macros with stand-alone element
     new cbcfd4d  Add copyright
     new d45d88a  NLPCRAFT-91: Support basic /fill command (different shapes and static position)
     new de05f20  NLPCRAFT-91: Small fixes for model
     new 5b729f6  NLPCRAFT-91: Finish fill command
     new 9ddba5e  NLPCRAFT-91: Add examples to MinecraftModel
     new 67808d6  NLPCRAFT-91: Fixes for new syntax
     new fae84d6  NLPCRAFT-91: Uncomment macros
     new bf11d2b  NLPCRAFT-91: Add basic test

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   (5b1066a)
            \
             N -- N -- N   refs/heads/NLPCRAFT-91 (bf11d2b)

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 27 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:
 .../apache/nlpcraft/common/nlp/NCNlpSentence.scala | 773 +--------------------
 .../nlpcraft/common/nlp/NCNlpSentenceToken.scala   |   2 +-
 .../nlpcraft/examples/sql/db/SqlAccess.scala       |   2 +-
 .../nlpcraft/model/tools/cmdline/NCCli.scala       |   4 +-
 .../org/apache/nlpcraft/probe/NCProbeBoot.scala    |   2 +
 .../nlpcraft/probe/mgrs/NCProbeSynonym.scala       |  16 +-
 .../nlpcraft/probe/mgrs/NCProbeVariants.scala      |   4 +-
 .../probe/mgrs/nlp/NCProbeEnrichmentManager.scala  |   3 +-
 .../mgrs/nlp/enrichers/model/NCModelEnricher.scala | 271 +++++---
 .../probe/mgrs/sentence/NCSentenceHelper.java      | 199 ++++++
 .../mgrs/sentence/NCSentenceManager.scala}         | 396 +++--------
 .../scala/org/apache/nlpcraft/NCTestContext.scala  |   2 +-
 .../org/apache/nlpcraft/NCTestEnvironment.java     |   6 +
 .../nlpcraft/examples/sql/NCSqlExampleSpec.scala   |   2 +-
 .../nlpcraft/examples/sql/NCSqlModelSpec.scala     |   2 +-
 ...pec3.scala => NCEnricherNestedModelSpec4.scala} |  18 +-
 16 files changed, 556 insertions(+), 1146 deletions(-)
 create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/sentence/NCSentenceHelper.java
 copy nlpcraft/src/main/scala/org/apache/nlpcraft/{common/nlp/NCNlpSentence.scala => probe/mgrs/sentence/NCSentenceManager.scala} (66%)
 copy nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/{NCEnricherNestedModelSpec3.scala => NCEnricherNestedModelSpec4.scala} (81%)

[incubator-nlpcraft] 16/27: Update 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 113f5c8ea88cbca90f429ba02c275a8d8d66677c
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Feb 8 17:32:53 2021 -0800

    Update README
---
 nlpcraft-examples/minecraft-model/README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
index 67b5002..348cd79 100644
--- a/nlpcraft-examples/minecraft-model/README.md
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -49,6 +49,7 @@ on client side, prefixed with slash (`/make it sunny`)
 | :---: |:---:|
 `/weather` | Make it rain | 
 `/time` | Set current time to evening | 
+`/give` | Give me iron sword | 
 
 ### Copyright
 Copyright (C) 2020 Apache Software Foundation

[incubator-nlpcraft] 09/27: 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 b28cf4362df212726a3635dfce0dc26ca2c29e6a
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] 04/27: 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 8f66b0df271b6d7787feaaeee5d1373e3936719d
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] 06/27: 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 7c896b9211ecc701a29916e642f26defac05df34
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

[incubator-nlpcraft] 13/27: Version bump

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 158253b83cb201f2f03c496186c14df4451a7cb7
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 4 19:10:59 2021 -0800

    Version bump
---
 nlpcraft-examples/minecraft-model/pom.xml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/pom.xml b/nlpcraft-examples/minecraft-model/pom.xml
index a1bbd7f..dbae4ab 100644
--- a/nlpcraft-examples/minecraft-model/pom.xml
+++ b/nlpcraft-examples/minecraft-model/pom.xml
@@ -27,14 +27,10 @@
     <parent>
         <groupId>org.apache.nlpcraft</groupId>
         <artifactId>nlpcraft-parent</artifactId>
-        <version>0.7.3</version>
+        <version>0.7.4</version>
         <relativePath>../../</relativePath>
     </parent>
 
-    <properties>
-        <kotlin.ver>1.4.10</kotlin.ver>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>

[incubator-nlpcraft] 22/27: NLPCRAFT-91: Small fixes for 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 de05f20270dfdb850e1a240111c4583a6efb7323
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 18 18:24:31 2021 -0800

    NLPCRAFT-91: Small fixes for model
---
 .../kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt  | 11 +++++++----
 .../main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt |  4 ++++
 .../minecraft-model/src/main/resources/minecraft.yaml         |  5 ++++-
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
index b43694b..26d617e 100644
--- a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
@@ -35,14 +35,17 @@ class FIllMatchProcessor {
 
             // TODO: Use user rotation
             // TODO: handle y coordinate for cube
-            return NCResult.text("execute at @p positioned ~ ~ ~*1 rotated 0 0 run fill ${from.relativeRotated()} ${to.relativeRotated()} $block")
+            return NCResult.text("execute at @p positioned ~ ~ ~ rotated 0 0 run fill ${from.relativeRotated()} ${to.relativeRotated()} $block")
         }
 
         private fun resultCoordinates(length: Int, shape: String): Pair<Coordinate, Coordinate> {
             return when (shape) {
-                "line" -> Coordinate(-length / 2) to Coordinate((length - 1) / 2)
-                "square" -> Coordinate(-length / 2,0, -length / 2) to Coordinate((length - 1) / 2, 0,(length - 1) / 2)
-                "cube" -> Coordinate(-length / 2,-length / 2, -length / 2) to Coordinate((length - 1) / 2, (length - 1) / 2,(length - 1) / 2)
+                "line" -> Coordinate(-length / 2) to
+                        Coordinate((length - 1) / 2)
+                "square" -> Coordinate(-length / 2, 0, -length / 2) to
+                        Coordinate((length - 1) / 2, 0, (length - 1) / 2)
+                "cube" -> Coordinate(-length / 2, -length / 2, -length / 2) to
+                        Coordinate((length - 1) / 2, (length - 1) / 2, (length - 1) / 2)
                 else -> {
                     throw NCRejection("Unsupported shape")
                 }
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 d4ed279..b92c57c 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
@@ -81,4 +81,8 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     ): NCResult {
         return FIllMatchProcessor.process(ctx, shape, block, length, position)
     }
+
+    override fun getAbstractTokens(): MutableSet<String> {
+        return mutableSetOf("mc:player")
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 8ff6b5a..31762b1 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -99,6 +99,7 @@ elements:
   - id: give:action
     synonyms:
       - "{give ^^[target](id == 'mc:player')^^}"
+    "permutateSynonyms": false
   - id: give:block-word
     synonyms:
       - "{block|blocks}"
@@ -128,12 +129,14 @@ elements:
       - fill:position
     synonyms:
       - "{{at|near} ^^[player](id == 'mc:player')^^ {position|*}|where ^^[player](id == 'mc:player')^^}"
+    "permutateSynonyms": false
 
   - id: position:front
     groups:
       - fill:position
     synonyms:
-      - "{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}? {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
+      - "{{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}|*} {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
+    "permutateSynonyms": false
 
 
 

[incubator-nlpcraft] 25/27: NLPCRAFT-91: Fixes for new syntax

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 67808d6e8c970df850c7088af2d23cd9e66fcf3e
Author: Ifropc <if...@apache.org>
AuthorDate: Fri Feb 26 21:05:44 2021 -0800

    NLPCRAFT-91: Fixes for new syntax
---
 nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 99cee41..9ad7c6a 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -123,19 +123,19 @@ elements:
       - "wall"
   - id: fill:length
     synonyms:
-      - "{{size|length|diameter} {of|*} ^^[length](id == 'nlpcraft:num')^^}"
+      - "{{size|length|diameter} {of|_} ^^[length](id == 'nlpcraft:num')^^}"
   - id: position:player
     groups:
       - fill:position
     synonyms:
-      - "{{at|near} ^^[player](id == 'mc:player')^^ {position|*}|where ^^[player](id == 'mc:player')^^}"
+      - "{{at|near} ^^[player](id == 'mc:player')^^ {position|_}|where ^^[player](id == 'mc:player')^^}"
     "permutateSynonyms": false
 
   - id: position:front
     groups:
       - fill:position
     synonyms:
-      - "{{^^[distance](id == 'nlpcraft:num')^^|*} {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
+      - "{{^^[distance](id == 'nlpcraft:num')^^|_} {in|_} front {of|_} ^^[player](id == 'mc:player')^^}"
     "permutateSynonyms": false
 
 

[incubator-nlpcraft] 10/27: 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 24cf30c511171ab07f6b68ec1309282c50cf3424
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] 15/27: NLPCRAFT-91: "Give" supports player target and quantity

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 c590a61256e8629bca57ec315636c85f275da960
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 4 21:59:22 2021 -0800

    NLPCRAFT-91: "Give" supports player target and quantity
---
 .../org/apache/nlpcraft/example/MinecraftModel.kt       | 17 ++++++++++++++---
 .../minecraft-model/src/main/resources/minecraft.yaml   |  7 +++++--
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index bf6ff5c..9e476d2 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
@@ -21,6 +21,7 @@ package org.apache.nlpcraft.example
 import org.apache.nlpcraft.common.NCException
 import org.apache.nlpcraft.example.MinecraftObjectValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
+import java.util.*
 
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     @NCIntentRef("weatherIntent")
@@ -58,15 +59,25 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     fun onGiveMatch(
         ctx: NCIntentMatch,
         @NCIntentTerm("item") item: NCToken,
-        @NCIntentTerm("target") target: NCToken
+        @NCIntentTerm("target") target: NCToken,
+        @NCIntentTerm("quantity") quantity: Optional<NCToken>
     ): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
         }
 
         val itemRegistry = dumps["item"]!![item.value]!!
-        val player = if (target.value == "me") "@p" else target.value?:"@p"
+        val player = if (target.normText() == "me") "@p" else target.originalText ?: "@p"
 
-        return NCResult.text("give $player $itemRegistry")
+        val itemQuantity = quantity
+            .flatMap { x -> x.metaOpt<Double>("nlpcraft:num:from") }
+            .map { x -> x.toLong() }
+            .orElse(1)
+
+        return NCResult.text("give $player $itemRegistry $itemQuantity")
+    }
+
+    private fun NCToken.normText(): String {
+        return this.meta("nlpcraft:nlp:normtext")
     }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 1696d20..d56e05a 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -79,7 +79,7 @@ elements:
       - "{give}"
   - id: give:target
     synonyms:
-      - "{me}" # TODO: also could be another player
+      - "{me|//[a-zA-Z0-9]+//}"
   - id: give:item
     metadata:
       minecraft:type: item
@@ -90,4 +90,7 @@ elements:
 intents:
   - intent=weatherIntent term(arg)={groups @@ 'weather'}
   - intent=timeIntent term(arg)={groups @@ 'time'}
-  - intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'give:target'} term(item)={id == 'give:item'}
+  - intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'give:target'} term(quantity)={id == 'nlpcraft:num'}? term(item)={id == 'give:item'}
+
+# give me sand
+swearWordsAllowed: true

[incubator-nlpcraft] 11/27: 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 7d50239acd5c75fb03a86137b902ab68b341c791
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] 21/27: NLPCRAFT-91: Support basic /fill command (different shapes and static position)

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 d45d88a7ca988e824db232d3427c33c02544ac98
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 11 00:24:48 2021 -0800

    NLPCRAFT-91: Support basic /fill command (different shapes and static position)
---
 .../org/apache/nplcraft/example/ExampleMod.java    |  5 ++-
 .../apache/nlpcraft/example/FIllMatchProcessor.kt  | 52 ++++++++++++++++++++++
 .../org/apache/nlpcraft/example/MinecraftModel.kt  | 17 +------
 .../kotlin/org/apache/nlpcraft/example/Utils.kt    | 49 ++++++++++++++++++++
 .../src/main/resources/minecraft.yaml              |  7 ++-
 5 files changed, 109 insertions(+), 21 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 c3c349f..f76ccd8 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
@@ -31,6 +31,7 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.util.FileUtil;
+import net.minecraft.util.math.vector.Vector2f;
 import net.minecraft.util.registry.DefaultedRegistry;
 import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.event.CommandEvent;
@@ -68,7 +69,7 @@ public class ExampleMod {
             return;
         }
         String command = event.getParseResults().getReader().getString();
-        LOGGER.debug("Processing command:" + command);
+        Vector2f rotation = event.getParseResults().getContext().getSource().getRotation();
         askProbe(command).map(r -> r.state)
                 .filter(s -> s.errorCode == null)
                 .map(s -> s.resBody)
@@ -134,7 +135,7 @@ public class ExampleMod {
             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);
+            http.setReadTimeout(3_000);
 
             http.setDoOutput(true);
             DataOutputStream wr = new DataOutputStream(http.getOutputStream());
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
new file mode 100644
index 0000000..b43694b
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
@@ -0,0 +1,52 @@
+/*
+ * 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.apache.nlpcraft.example.MinecraftObjectValueLoader.Companion.dumps
+import org.apache.nlpcraft.model.*
+
+class FIllMatchProcessor {
+    companion object {
+        fun process(
+            ctx: NCIntentMatch,
+            @NCIntentTerm("shape") shape: NCToken,
+            @NCIntentTerm("block") blockToken: NCToken,
+            @NCIntentTerm("len") length: NCToken,
+            @NCIntentTerm("position") position: NCToken
+        ): NCResult {
+            val (from, to) = resultCoordinates(length = length.toInt(), shape.id)
+            val block = dumps["item"]!![blockToken.value]!!
+
+            // TODO: Use user rotation
+            // TODO: handle y coordinate for cube
+            return NCResult.text("execute at @p positioned ~ ~ ~*1 rotated 0 0 run fill ${from.relativeRotated()} ${to.relativeRotated()} $block")
+        }
+
+        private fun resultCoordinates(length: Int, shape: String): Pair<Coordinate, Coordinate> {
+            return when (shape) {
+                "line" -> Coordinate(-length / 2) to Coordinate((length - 1) / 2)
+                "square" -> Coordinate(-length / 2,0, -length / 2) to Coordinate((length - 1) / 2, 0,(length - 1) / 2)
+                "cube" -> Coordinate(-length / 2,-length / 2, -length / 2) to Coordinate((length - 1) / 2, (length - 1) / 2,(length - 1) / 2)
+                else -> {
+                    throw NCRejection("Unsupported shape")
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
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 99a5ad2..d4ed279 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
@@ -25,8 +25,6 @@ import java.util.*
 
 @Suppress("unused")
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
-    private var firstPersonWords = setOf("me", "my", "i")
-
     @NCIntentRef("weatherIntent")
     fun onWeatherMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
@@ -68,10 +66,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
 
         val itemRegistry = dumps["item"]!![item.value]!!
         val player = player(target.partTokens[1])
-        val itemQuantity = quantity
-            .flatMap { x -> x.metaOpt<Double>("nlpcraft:num:from") }
-            .map { x -> x.toLong() }
-            .orElse(1)
+        val itemQuantity = quantity.map(NCToken::toInt).orElse(1)
 
         return NCResult.text("give $player $itemRegistry $itemQuantity")
     }
@@ -84,14 +79,6 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
         @NCIntentTerm("len") length: NCToken,
         @NCIntentTerm("position") position: NCToken,
     ): NCResult {
-        TODO()
-    }
-
-    private fun NCToken.normText(): String {
-        return this.meta("nlpcraft:nlp:normtext")
-    }
-
-    private fun player(target: NCToken): String {
-        return if (firstPersonWords.contains(target.normText())) "@p" else target.originalText ?: "@p"
+        return FIllMatchProcessor.process(ctx, shape, block, length, position)
     }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt
new file mode 100644
index 0000000..79fc784
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt
@@ -0,0 +1,49 @@
+/*
+ * 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.apache.nlpcraft.model.NCToken
+
+private var firstPersonWords = setOf("me", "my", "i")
+
+internal fun NCToken.normText(): String {
+    return this.meta("nlpcraft:nlp:normtext")
+}
+
+internal fun NCToken.toInt(): Int {
+    return this.meta<Double>("nlpcraft:num:from").toInt()
+}
+
+internal fun player(target: NCToken): String {
+    return if (firstPersonWords.contains(target.normText())) "@p" else target.originalText ?: "@p"
+}
+
+internal data class Coordinate(val x: Int = 0, val y: Int = 0, val z: Int = 0) {
+    override fun toString(): String {
+        return "$x $y $z"
+    }
+
+    fun relative(): String {
+        return "~$x ~$y ~$z"
+    }
+
+    fun relativeRotated(): String {
+        return "^$x ^$y ^$z"
+    }
+}
\ No newline at end of file
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 6d356bd..8ff6b5a 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -24,8 +24,10 @@ description: Minecraft Model.
 ]
 
 macros:
+#  - name: "<PLAYER_NAME>"
+#    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
   - name: "<PLAYER_NAME>"
-    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
+    macro: "{me|I|my}"
 
 elements:
   # General synonyms
@@ -108,9 +110,6 @@ elements:
   - id: cube
     groups:
       - fill:shape
-  - id: sphere
-    groups:
-      - fill:shape
   - id: square
     groups:
       - fill:shape

[incubator-nlpcraft] 05/27: 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 5440357c7e0afa8e3090f94ce0e3f88a9b971b67
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] 12/27: 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 5b738c4f4a3e49d3ef6642431d71dc9237a94a53
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] 14/27: NLPCRAFT-91: Give intent 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 b3bbc9b724ea25155e77649f78a7f71d33175895
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 4 21:16:15 2021 -0800

    NLPCRAFT-91: Give intent support
---
 .../org/apache/nplcraft/example/ExampleMod.java    |  32 +
 nlpcraft-examples/minecraft-model/pom.xml          |   5 +
 .../org/apache/nlpcraft/example/MinecraftModel.kt  |  18 +
 .../org/apache/nlpcraft/example/ValueLoaders.kt    |  49 +
 .../minecraft-model/src/main/resources/blocks.json | 792 ++++++++++++++++
 .../minecraft-model/src/main/resources/item.json   | 997 +++++++++++++++++++++
 .../src/main/resources/minecraft.yaml              |  16 +
 7 files changed, 1909 insertions(+)

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 577e890..c3c349f 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
@@ -26,14 +26,18 @@ import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Map;
 import java.util.Optional;
+import java.util.stream.Collectors;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.util.FileUtil;
+import net.minecraft.util.registry.DefaultedRegistry;
 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 net.minecraftforge.registries.ForgeRegistryEntry;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -76,6 +80,29 @@ public class ExampleMod {
                 });
     }
 
+    private <T extends ForgeRegistryEntry<?>> void dumpRegistry(DefaultedRegistry<T> registry) {
+        Dump dump = new Dump();
+        dump.version = server.getMinecraftVersion();
+        // regular name -> registry name
+        dump.data = registry.stream().filter(x -> x.getRegistryName() != null).collect(Collectors.toMap(
+                x -> transformPath(x.getRegistryName().getPath()),
+                x -> x.getRegistryName().toString())
+        );
+        // add matching like grass -> grass_block
+        dump.data.putAll(registry.stream()
+                .filter(x -> x.getRegistryName() != null && x.getRegistryName().getPath().endsWith("_block"))
+                .collect(Collectors.toMap(
+                        x -> transformPath(x.getRegistryName().getPath().replace("_block", "")),
+                        x -> x.getRegistryName().toString())
+                )
+        );
+        LOGGER.info(gson.toJson(dump));
+    }
+
+    private String transformPath(String path) {
+        return path.replaceAll("_", " ");
+    }
+
     private Optional<NCResponse> askProbe(String txt) {
         AskParams params = new AskParams();
         params.txt = txt.startsWith("/") ? txt.substring(1) : txt;
@@ -190,4 +217,9 @@ public class ExampleMod {
         private String host;
         private String port;
     }
+
+    private class Dump {
+        private String version;
+        private Map<String, String> data;
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/pom.xml b/nlpcraft-examples/minecraft-model/pom.xml
index dbae4ab..8a221aa 100644
--- a/nlpcraft-examples/minecraft-model/pom.xml
+++ b/nlpcraft-examples/minecraft-model/pom.xml
@@ -33,6 +33,11 @@
 
     <dependencies>
         <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-kotlin</artifactId>
+            <version>${jackson.ver}</version>
+        </dependency>
+        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>nlpcraft</artifactId>
             <version>${project.version}</version>
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 676066a..bf6ff5c 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
@@ -19,6 +19,7 @@
 package org.apache.nlpcraft.example
 
 import org.apache.nlpcraft.common.NCException
+import org.apache.nlpcraft.example.MinecraftObjectValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
 
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
@@ -51,4 +52,21 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
 
         return NCResult.text("time set $time")
     }
+
+    @NCIntentRef("giveIntent")
+    @Suppress("unused")
+    fun onGiveMatch(
+        ctx: NCIntentMatch,
+        @NCIntentTerm("item") item: NCToken,
+        @NCIntentTerm("target") target: NCToken
+    ): NCResult {
+        if (ctx.isAmbiguous) {
+            throw NCRejection("Ambiguous request")
+        }
+
+        val itemRegistry = dumps["item"]!![item.value]!!
+        val player = if (target.value == "me") "@p" else target.value?:"@p"
+
+        return NCResult.text("give $player $itemRegistry")
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
new file mode 100644
index 0000000..989371e
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
@@ -0,0 +1,49 @@
+package org.apache.nlpcraft.example
+
+import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
+import org.apache.nlpcraft.common.NCException
+import org.apache.nlpcraft.model.NCElement
+import org.apache.nlpcraft.model.NCModelFileAdapter
+import org.apache.nlpcraft.model.NCValue
+import org.apache.nlpcraft.model.NCValueLoader
+
+class MinecraftObjectValueLoader : NCValueLoader {
+    companion object {
+        internal var dumps = mutableMapOf<String, Map<String, String>>()
+    }
+
+    override fun load(owner: NCElement?): MutableSet<NCValue> {
+        val type = owner!!.metax<String>("minecraft:type")
+
+        val inputStream = NCModelFileAdapter::class.java.classLoader.getResourceAsStream("${type}.json")
+            ?: throw NCException("Minecraft object dump not found: ${type}.json")
+
+        val mapper = jacksonObjectMapper()
+
+        val dump = try {
+            mapper.readValue(inputStream, Dump::class.java)
+        } catch (e: Exception) {
+            throw NCException("Failed to read file: ${type}.json", e)
+        }
+
+        dumps[type] = dump.data
+
+        return dump.data.map { x -> NCMinecraftValue(x.key, x.value) }.toMutableSet()
+    }
+}
+
+private class NCMinecraftValue(private var name: String, private var registry: String) : NCValue {
+    override fun getName(): String {
+        return name
+    }
+
+    override fun getSynonyms(): MutableList<String> {
+        return mutableListOf(name)
+    }
+
+    override fun toString(): String {
+        return registry
+    }
+}
+
+private data class Dump(val version: String, val data: Map<String, String>)
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/blocks.json b/nlpcraft-examples/minecraft-model/src/main/resources/blocks.json
new file mode 100644
index 0000000..10415bb
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/blocks.json
@@ -0,0 +1,792 @@
+{
+  "version": "1.16.4",
+  "data": {
+    "sea lantern": "minecraft:sea_lantern",
+    "oak fence gate": "minecraft:oak_fence_gate",
+    "red bed": "minecraft:red_bed",
+    "black shulker box": "minecraft:black_shulker_box",
+    "dark oak leaves": "minecraft:dark_oak_leaves",
+    "chiseled quartz block": "minecraft:chiseled_quartz_block",
+    "warped wart block": "minecraft:warped_wart_block",
+    "green concrete powder": "minecraft:green_concrete_powder",
+    "red wall banner": "minecraft:red_wall_banner",
+    "potted azure bluet": "minecraft:potted_azure_bluet",
+    "dark oak log": "minecraft:dark_oak_log",
+    "chiseled nether bricks": "minecraft:chiseled_nether_bricks",
+    "brown wall banner": "minecraft:brown_wall_banner",
+    "fletching table": "minecraft:fletching_table",
+    "scaffolding": "minecraft:scaffolding",
+    "potted birch sapling": "minecraft:potted_birch_sapling",
+    "brick stairs": "minecraft:brick_stairs",
+    "crimson sign": "minecraft:crimson_sign",
+    "black stained glass pane": "minecraft:black_stained_glass_pane",
+    "cocoa": "minecraft:cocoa",
+    "cyan shulker box": "minecraft:cyan_shulker_box",
+    "honeycomb": "minecraft:honeycomb_block",
+    "blackstone slab": "minecraft:blackstone_slab",
+    "tripwire": "minecraft:tripwire",
+    "prismarine slab": "minecraft:prismarine_slab",
+    "stone pressure plate": "minecraft:stone_pressure_plate",
+    "iron trapdoor": "minecraft:iron_trapdoor",
+    "redstone": "minecraft:redstone_block",
+    "end stone brick stairs": "minecraft:end_stone_brick_stairs",
+    "stone brick wall": "minecraft:stone_brick_wall",
+    "nether wart": "minecraft:nether_wart_block",
+    "cyan glazed terracotta": "minecraft:cyan_glazed_terracotta",
+    "chorus plant": "minecraft:chorus_plant",
+    "dead brain coral block": "minecraft:dead_brain_coral_block",
+    "netherite block": "minecraft:netherite_block",
+    "pink bed": "minecraft:pink_bed",
+    "dead bubble coral block": "minecraft:dead_bubble_coral_block",
+    "tube coral": "minecraft:tube_coral_block",
+    "slime": "minecraft:slime_block",
+    "gold": "minecraft:gold_block",
+    "acacia pressure plate": "minecraft:acacia_pressure_plate",
+    "piston head": "minecraft:piston_head",
+    "dead bubble coral fan": "minecraft:dead_bubble_coral_fan",
+    "black stained glass": "minecraft:black_stained_glass",
+    "dead horn coral": "minecraft:dead_horn_coral_block",
+    "black concrete powder": "minecraft:black_concrete_powder",
+    "red terracotta": "minecraft:red_terracotta",
+    "potted cornflower": "minecraft:potted_cornflower",
+    "twisting vines plant": "minecraft:twisting_vines_plant",
+    "wither skeleton skull": "minecraft:wither_skeleton_skull",
+    "coarse dirt": "minecraft:coarse_dirt",
+    "dead horn coral wall fan": "minecraft:dead_horn_coral_wall_fan",
+    "orange wall banner": "minecraft:orange_wall_banner",
+    "smooth quartz slab": "minecraft:smooth_quartz_slab",
+    "wither skeleton wall skull": "minecraft:wither_skeleton_wall_skull",
+    "dead fire coral wall fan": "minecraft:dead_fire_coral_wall_fan",
+    "daylight detector": "minecraft:daylight_detector",
+    "magenta stained glass": "minecraft:magenta_stained_glass",
+    "dark oak wall sign": "minecraft:dark_oak_wall_sign",
+    "acacia button": "minecraft:acacia_button",
+    "crimson fungus": "minecraft:crimson_fungus",
+    "jungle wood": "minecraft:jungle_wood",
+    "dead tube coral block": "minecraft:dead_tube_coral_block",
+    "ender chest": "minecraft:ender_chest",
+    "pink concrete powder": "minecraft:pink_concrete_powder",
+    "farmland": "minecraft:farmland",
+    "fire coral wall fan": "minecraft:fire_coral_wall_fan",
+    "lime stained glass pane": "minecraft:lime_stained_glass_pane",
+    "melon": "minecraft:melon",
+    "light blue bed": "minecraft:light_blue_bed",
+    "polished basalt": "minecraft:polished_basalt",
+    "redstone lamp": "minecraft:redstone_lamp",
+    "warped stem": "minecraft:warped_stem",
+    "dried kelp": "minecraft:dried_kelp_block",
+    "sand": "minecraft:sand",
+    "redstone block": "minecraft:redstone_block",
+    "red sandstone": "minecraft:red_sandstone",
+    "beacon": "minecraft:beacon",
+    "lime wool": "minecraft:lime_wool",
+    "lime bed": "minecraft:lime_bed",
+    "magenta banner": "minecraft:magenta_banner",
+    "brown concrete powder": "minecraft:brown_concrete_powder",
+    "orange tulip": "minecraft:orange_tulip",
+    "yellow glazed terracotta": "minecraft:yellow_glazed_terracotta",
+    "gray terracotta": "minecraft:gray_terracotta",
+    "blackstone": "minecraft:blackstone",
+    "emerald": "minecraft:emerald_block",
+    "acacia trapdoor": "minecraft:acacia_trapdoor",
+    "light blue wool": "minecraft:light_blue_wool",
+    "iron bars": "minecraft:iron_bars",
+    "dark oak fence": "minecraft:dark_oak_fence",
+    "rose bush": "minecraft:rose_bush",
+    "nether brick fence": "minecraft:nether_brick_fence",
+    "beehive": "minecraft:beehive",
+    "lilac": "minecraft:lilac",
+    "magenta stained glass pane": "minecraft:magenta_stained_glass_pane",
+    "brown concrete": "minecraft:brown_concrete",
+    "red stained glass": "minecraft:red_stained_glass",
+    "light blue glazed terracotta": "minecraft:light_blue_glazed_terracotta",
+    "cracked polished blackstone bricks": "minecraft:cracked_polished_blackstone_bricks",
+    "carved pumpkin": "minecraft:carved_pumpkin",
+    "sticky piston": "minecraft:sticky_piston",
+    "red concrete": "minecraft:red_concrete",
+    "nether gold ore": "minecraft:nether_gold_ore",
+    "oak door": "minecraft:oak_door",
+    "potted poppy": "minecraft:potted_poppy",
+    "fire coral fan": "minecraft:fire_coral_fan",
+    "prismarine stairs": "minecraft:prismarine_stairs",
+    "warped fence": "minecraft:warped_fence",
+    "stone slab": "minecraft:stone_slab",
+    "light weighted pressure plate": "minecraft:light_weighted_pressure_plate",
+    "green stained glass pane": "minecraft:green_stained_glass_pane",
+    "warped slab": "minecraft:warped_slab",
+    "white stained glass": "minecraft:white_stained_glass",
+    "nether brick stairs": "minecraft:nether_brick_stairs",
+    "lime concrete powder": "minecraft:lime_concrete_powder",
+    "jungle slab": "minecraft:jungle_slab",
+    "chorus flower": "minecraft:chorus_flower",
+    "glowstone": "minecraft:glowstone",
+    "chipped anvil": "minecraft:chipped_anvil",
+    "potted white tulip": "minecraft:potted_white_tulip",
+    "purpur stairs": "minecraft:purpur_stairs",
+    "end rod": "minecraft:end_rod",
+    "crimson stem": "minecraft:crimson_stem",
+    "diorite": "minecraft:diorite",
+    "light blue concrete powder": "minecraft:light_blue_concrete_powder",
+    "lime concrete": "minecraft:lime_concrete",
+    "blue bed": "minecraft:blue_bed",
+    "potted dandelion": "minecraft:potted_dandelion",
+    "yellow terracotta": "minecraft:yellow_terracotta",
+    "polished andesite": "minecraft:polished_andesite",
+    "cobweb": "minecraft:cobweb",
+    "pink tulip": "minecraft:pink_tulip",
+    "light blue terracotta": "minecraft:light_blue_terracotta",
+    "gravel": "minecraft:gravel",
+    "cyan concrete powder": "minecraft:cyan_concrete_powder",
+    "yellow shulker box": "minecraft:yellow_shulker_box",
+    "yellow banner": "minecraft:yellow_banner",
+    "jigsaw": "minecraft:jigsaw",
+    "tnt": "minecraft:tnt",
+    "prismarine brick stairs": "minecraft:prismarine_brick_stairs",
+    "diorite wall": "minecraft:diorite_wall",
+    "cyan wool": "minecraft:cyan_wool",
+    "white concrete powder": "minecraft:white_concrete_powder",
+    "diamond block": "minecraft:diamond_block",
+    "horn coral wall fan": "minecraft:horn_coral_wall_fan",
+    "birch leaves": "minecraft:birch_leaves",
+    "cobblestone stairs": "minecraft:cobblestone_stairs",
+    "crimson pressure plate": "minecraft:crimson_pressure_plate",
+    "air": "minecraft:air",
+    "sandstone": "minecraft:sandstone",
+    "cyan concrete": "minecraft:cyan_concrete",
+    "conduit": "minecraft:conduit",
+    "command block": "minecraft:command_block",
+    "bedrock": "minecraft:bedrock",
+    "purple stained glass pane": "minecraft:purple_stained_glass_pane",
+    "oxeye daisy": "minecraft:oxeye_daisy",
+    "blue orchid": "minecraft:blue_orchid",
+    "end stone brick wall": "minecraft:end_stone_brick_wall",
+    "potted jungle sapling": "minecraft:potted_jungle_sapling",
+    "bubble coral": "minecraft:bubble_coral_block",
+    "comparator": "minecraft:comparator",
+    "yellow wall banner": "minecraft:yellow_wall_banner",
+    "diorite stairs": "minecraft:diorite_stairs",
+    "smooth sandstone slab": "minecraft:smooth_sandstone_slab",
+    "jack o lantern": "minecraft:jack_o_lantern",
+    "orange bed": "minecraft:orange_bed",
+    "zombie head": "minecraft:zombie_head",
+    "potted pink tulip": "minecraft:potted_pink_tulip",
+    "polished diorite": "minecraft:polished_diorite",
+    "crafting table": "minecraft:crafting_table",
+    "blackstone wall": "minecraft:blackstone_wall",
+    "netherite": "minecraft:netherite_block",
+    "oak planks": "minecraft:oak_planks",
+    "dark prismarine stairs": "minecraft:dark_prismarine_stairs",
+    "cut red sandstone": "minecraft:cut_red_sandstone",
+    "stonecutter": "minecraft:stonecutter",
+    "light blue shulker box": "minecraft:light_blue_shulker_box",
+    "oak sapling": "minecraft:oak_sapling",
+    "potted acacia sapling": "minecraft:potted_acacia_sapling",
+    "polished blackstone brick slab": "minecraft:polished_blackstone_brick_slab",
+    "spruce button": "minecraft:spruce_button",
+    "terracotta": "minecraft:terracotta",
+    "orange terracotta": "minecraft:orange_terracotta",
+    "purple banner": "minecraft:purple_banner",
+    "cartography table": "minecraft:cartography_table",
+    "snow": "minecraft:snow_block",
+    "grass path": "minecraft:grass_path",
+    "birch planks": "minecraft:birch_planks",
+    "polished blackstone pressure plate": "minecraft:polished_blackstone_pressure_plate",
+    "dragon wall head": "minecraft:dragon_wall_head",
+    "brick wall": "minecraft:brick_wall",
+    "weeping vines plant": "minecraft:weeping_vines_plant",
+    "gilded blackstone": "minecraft:gilded_blackstone",
+    "gray glazed terracotta": "minecraft:gray_glazed_terracotta",
+    "brain coral wall fan": "minecraft:brain_coral_wall_fan",
+    "grass block": "minecraft:grass_block",
+    "smooth red sandstone slab": "minecraft:smooth_red_sandstone_slab",
+    "basalt": "minecraft:basalt",
+    "green wool": "minecraft:green_wool",
+    "horn coral block": "minecraft:horn_coral_block",
+    "cracked nether bricks": "minecraft:cracked_nether_bricks",
+    "spruce door": "minecraft:spruce_door",
+    "quartz pillar": "minecraft:quartz_pillar",
+    "dead tube coral wall fan": "minecraft:dead_tube_coral_wall_fan",
+    "stripped warped hyphae": "minecraft:stripped_warped_hyphae",
+    "quartz": "minecraft:quartz_block",
+    "red nether bricks": "minecraft:red_nether_bricks",
+    "ladder": "minecraft:ladder",
+    "lodestone": "minecraft:lodestone",
+    "birch door": "minecraft:birch_door",
+    "soul wall torch": "minecraft:soul_wall_torch",
+    "sandstone wall": "minecraft:sandstone_wall",
+    "yellow stained glass": "minecraft:yellow_stained_glass",
+    "cyan stained glass": "minecraft:cyan_stained_glass",
+    "crying obsidian": "minecraft:crying_obsidian",
+    "brown stained glass pane": "minecraft:brown_stained_glass_pane",
+    "player head": "minecraft:player_head",
+    "purple stained glass": "minecraft:purple_stained_glass",
+    "warped fence gate": "minecraft:warped_fence_gate",
+    "potted brown mushroom": "minecraft:potted_brown_mushroom",
+    "polished granite stairs": "minecraft:polished_granite_stairs",
+    "cake": "minecraft:cake",
+    "smooth quartz stairs": "minecraft:smooth_quartz_stairs",
+    "lapis": "minecraft:lapis_block",
+    "crimson door": "minecraft:crimson_door",
+    "chiseled quartz": "minecraft:chiseled_quartz_block",
+    "dark oak pressure plate": "minecraft:dark_oak_pressure_plate",
+    "polished blackstone bricks": "minecraft:polished_blackstone_bricks",
+    "turtle egg": "minecraft:turtle_egg",
+    "bamboo": "minecraft:bamboo",
+    "magenta terracotta": "minecraft:magenta_terracotta",
+    "blue terracotta": "minecraft:blue_terracotta",
+    "stripped oak log": "minecraft:stripped_oak_log",
+    "gray stained glass pane": "minecraft:gray_stained_glass_pane",
+    "orange carpet": "minecraft:orange_carpet",
+    "magenta concrete powder": "minecraft:magenta_concrete_powder",
+    "brain coral": "minecraft:brain_coral_block",
+    "white shulker box": "minecraft:white_shulker_box",
+    "dead bush": "minecraft:dead_bush",
+    "kelp plant": "minecraft:kelp_plant",
+    "mossy stone brick slab": "minecraft:mossy_stone_brick_slab",
+    "purple bed": "minecraft:purple_bed",
+    "clay": "minecraft:clay",
+    "soul soil": "minecraft:soul_soil",
+    "magenta bed": "minecraft:magenta_bed",
+    "jungle button": "minecraft:jungle_button",
+    "lectern": "minecraft:lectern",
+    "red sandstone stairs": "minecraft:red_sandstone_stairs",
+    "wet sponge": "minecraft:wet_sponge",
+    "stripped crimson hyphae": "minecraft:stripped_crimson_hyphae",
+    "jungle fence": "minecraft:jungle_fence",
+    "gold ore": "minecraft:gold_ore",
+    "mossy cobblestone": "minecraft:mossy_cobblestone",
+    "blue glazed terracotta": "minecraft:blue_glazed_terracotta",
+    "oak leaves": "minecraft:oak_leaves",
+    "gray carpet": "minecraft:gray_carpet",
+    "repeater": "minecraft:repeater",
+    "mycelium": "minecraft:mycelium",
+    "blue banner": "minecraft:blue_banner",
+    "red nether brick wall": "minecraft:red_nether_brick_wall",
+    "acacia wood": "minecraft:acacia_wood",
+    "cyan bed": "minecraft:cyan_bed",
+    "brown shulker box": "minecraft:brown_shulker_box",
+    "enchanting table": "minecraft:enchanting_table",
+    "green shulker box": "minecraft:green_shulker_box",
+    "smooth red sandstone": "minecraft:smooth_red_sandstone",
+    "hay": "minecraft:hay_block",
+    "glass": "minecraft:glass",
+    "chest": "minecraft:chest",
+    "seagrass": "minecraft:seagrass",
+    "oak wall sign": "minecraft:oak_wall_sign",
+    "packed ice": "minecraft:packed_ice",
+    "frosted ice": "minecraft:frosted_ice",
+    "diorite slab": "minecraft:diorite_slab",
+    "prismarine wall": "minecraft:prismarine_wall",
+    "grindstone": "minecraft:grindstone",
+    "bubble coral wall fan": "minecraft:bubble_coral_wall_fan",
+    "orange shulker box": "minecraft:orange_shulker_box",
+    "blackstone stairs": "minecraft:blackstone_stairs",
+    "warped wall sign": "minecraft:warped_wall_sign",
+    "dragon head": "minecraft:dragon_head",
+    "green glazed terracotta": "minecraft:green_glazed_terracotta",
+    "potted red tulip": "minecraft:potted_red_tulip",
+    "stripped acacia log": "minecraft:stripped_acacia_log",
+    "sweet berry bush": "minecraft:sweet_berry_bush",
+    "warped trapdoor": "minecraft:warped_trapdoor",
+    "andesite slab": "minecraft:andesite_slab",
+    "gray shulker box": "minecraft:gray_shulker_box",
+    "lava": "minecraft:lava",
+    "melon stem": "minecraft:melon_stem",
+    "light blue stained glass": "minecraft:light_blue_stained_glass",
+    "purple carpet": "minecraft:purple_carpet",
+    "cut sandstone": "minecraft:cut_sandstone",
+    "stripped birch log": "minecraft:stripped_birch_log",
+    "spruce pressure plate": "minecraft:spruce_pressure_plate",
+    "yellow carpet": "minecraft:yellow_carpet",
+    "orange wool": "minecraft:orange_wool",
+    "acacia fence": "minecraft:acacia_fence",
+    "bone": "minecraft:bone_block",
+    "birch sapling": "minecraft:birch_sapling",
+    "stripped dark oak wood": "minecraft:stripped_dark_oak_wood",
+    "target": "minecraft:target",
+    "smooth red sandstone stairs": "minecraft:smooth_red_sandstone_stairs",
+    "blast furnace": "minecraft:blast_furnace",
+    "polished diorite stairs": "minecraft:polished_diorite_stairs",
+    "quartz block": "minecraft:quartz_block",
+    "cauldron": "minecraft:cauldron",
+    "dark oak sapling": "minecraft:dark_oak_sapling",
+    "acacia slab": "minecraft:acacia_slab",
+    "white terracotta": "minecraft:white_terracotta",
+    "dark oak sign": "minecraft:dark_oak_sign",
+    "skeleton wall skull": "minecraft:skeleton_wall_skull",
+    "orange stained glass pane": "minecraft:orange_stained_glass_pane",
+    "light blue banner": "minecraft:light_blue_banner",
+    "shulker box": "minecraft:shulker_box",
+    "birch log": "minecraft:birch_log",
+    "polished granite": "minecraft:polished_granite",
+    "spruce log": "minecraft:spruce_log",
+    "infested stone bricks": "minecraft:infested_stone_bricks",
+    "smooth stone": "minecraft:smooth_stone",
+    "wither rose": "minecraft:wither_rose",
+    "stripped crimson stem": "minecraft:stripped_crimson_stem",
+    "potted warped fungus": "minecraft:potted_warped_fungus",
+    "jungle wall sign": "minecraft:jungle_wall_sign",
+    "dead bubble coral": "minecraft:dead_bubble_coral_block",
+    "black carpet": "minecraft:black_carpet",
+    "light gray stained glass": "minecraft:light_gray_stained_glass",
+    "oak pressure plate": "minecraft:oak_pressure_plate",
+    "lime terracotta": "minecraft:lime_terracotta",
+    "tripwire hook": "minecraft:tripwire_hook",
+    "polished blackstone brick wall": "minecraft:polished_blackstone_brick_wall",
+    "brick slab": "minecraft:brick_slab",
+    "lapis ore": "minecraft:lapis_ore",
+    "dark oak stairs": "minecraft:dark_oak_stairs",
+    "chain command": "minecraft:chain_command_block",
+    "warped nylium": "minecraft:warped_nylium",
+    "lily pad": "minecraft:lily_pad",
+    "jungle fence gate": "minecraft:jungle_fence_gate",
+    "light blue wall banner": "minecraft:light_blue_wall_banner",
+    "acacia stairs": "minecraft:acacia_stairs",
+    "tall grass": "minecraft:tall_grass",
+    "polished blackstone button": "minecraft:polished_blackstone_button",
+    "barrel": "minecraft:barrel",
+    "stripped spruce log": "minecraft:stripped_spruce_log",
+    "chain": "minecraft:chain",
+    "nether portal": "minecraft:nether_portal",
+    "light gray concrete": "minecraft:light_gray_concrete",
+    "weeping vines": "minecraft:weeping_vines",
+    "brewing stand": "minecraft:brewing_stand",
+    "magenta glazed terracotta": "minecraft:magenta_glazed_terracotta",
+    "polished blackstone slab": "minecraft:polished_blackstone_slab",
+    "light gray concrete powder": "minecraft:light_gray_concrete_powder",
+    "brown carpet": "minecraft:brown_carpet",
+    "stripped jungle wood": "minecraft:stripped_jungle_wood",
+    "potted bamboo": "minecraft:potted_bamboo",
+    "stripped spruce wood": "minecraft:stripped_spruce_wood",
+    "dead brain coral": "minecraft:dead_brain_coral_block",
+    "coal block": "minecraft:coal_block",
+    "stone stairs": "minecraft:stone_stairs",
+    "green stained glass": "minecraft:green_stained_glass",
+    "heavy weighted pressure plate": "minecraft:heavy_weighted_pressure_plate",
+    "prismarine": "minecraft:prismarine",
+    "nether bricks": "minecraft:nether_bricks",
+    "warped sign": "minecraft:warped_sign",
+    "infested chiseled stone bricks": "minecraft:infested_chiseled_stone_bricks",
+    "dead horn coral block": "minecraft:dead_horn_coral_block",
+    "end portal frame": "minecraft:end_portal_frame",
+    "stripped oak wood": "minecraft:stripped_oak_wood",
+    "white stained glass pane": "minecraft:white_stained_glass_pane",
+    "activator rail": "minecraft:activator_rail",
+    "jungle log": "minecraft:jungle_log",
+    "vine": "minecraft:vine",
+    "magenta wool": "minecraft:magenta_wool",
+    "bone block": "minecraft:bone_block",
+    "rail": "minecraft:rail",
+    "coal ore": "minecraft:coal_ore",
+    "cyan banner": "minecraft:cyan_banner",
+    "water": "minecraft:water",
+    "quartz slab": "minecraft:quartz_slab",
+    "birch stairs": "minecraft:birch_stairs",
+    "pink stained glass": "minecraft:pink_stained_glass",
+    "acacia fence gate": "minecraft:acacia_fence_gate",
+    "red concrete powder": "minecraft:red_concrete_powder",
+    "iron door": "minecraft:iron_door",
+    "oak button": "minecraft:oak_button",
+    "bubble column": "minecraft:bubble_column",
+    "pink wool": "minecraft:pink_wool",
+    "light gray carpet": "minecraft:light_gray_carpet",
+    "chain command block": "minecraft:chain_command_block",
+    "purple concrete": "minecraft:purple_concrete",
+    "dragon egg": "minecraft:dragon_egg",
+    "warped fungus": "minecraft:warped_fungus",
+    "stripped jungle log": "minecraft:stripped_jungle_log",
+    "prismarine bricks": "minecraft:prismarine_bricks",
+    "potted allium": "minecraft:potted_allium",
+    "andesite stairs": "minecraft:andesite_stairs",
+    "brown bed": "minecraft:brown_bed",
+    "crimson hyphae": "minecraft:crimson_hyphae",
+    "stone brick stairs": "minecraft:stone_brick_stairs",
+    "snow block": "minecraft:snow_block",
+    "crimson stairs": "minecraft:crimson_stairs",
+    "red stained glass pane": "minecraft:red_stained_glass_pane",
+    "diamond": "minecraft:diamond_block",
+    "cyan wall banner": "minecraft:cyan_wall_banner",
+    "brown mushroom": "minecraft:brown_mushroom_block",
+    "dark oak wood": "minecraft:dark_oak_wood",
+    "hopper": "minecraft:hopper",
+    "potted red mushroom": "minecraft:potted_red_mushroom",
+    "white banner": "minecraft:white_banner",
+    "magma": "minecraft:magma_block",
+    "creeper head": "minecraft:creeper_head",
+    "yellow stained glass pane": "minecraft:yellow_stained_glass_pane",
+    "black glazed terracotta": "minecraft:black_glazed_terracotta",
+    "red nether brick slab": "minecraft:red_nether_brick_slab",
+    "repeating command": "minecraft:repeating_command_block",
+    "bamboo sapling": "minecraft:bamboo_sapling",
+    "white carpet": "minecraft:white_carpet",
+    "gray wall banner": "minecraft:gray_wall_banner",
+    "potted fern": "minecraft:potted_fern",
+    "warped roots": "minecraft:warped_roots",
+    "quartz stairs": "minecraft:quartz_stairs",
+    "orange glazed terracotta": "minecraft:orange_glazed_terracotta",
+    "allium": "minecraft:allium",
+    "oak log": "minecraft:oak_log",
+    "end stone": "minecraft:end_stone",
+    "pink wall banner": "minecraft:pink_wall_banner",
+    "light gray wall banner": "minecraft:light_gray_wall_banner",
+    "spruce planks": "minecraft:spruce_planks",
+    "red sandstone slab": "minecraft:red_sandstone_slab",
+    "crimson fence": "minecraft:crimson_fence",
+    "sponge": "minecraft:sponge",
+    "blue concrete powder": "minecraft:blue_concrete_powder",
+    "green concrete": "minecraft:green_concrete",
+    "brown glazed terracotta": "minecraft:brown_glazed_terracotta",
+    "grass": "minecraft:grass_block",
+    "wheat": "minecraft:wheat",
+    "andesite wall": "minecraft:andesite_wall",
+    "piston": "minecraft:piston",
+    "sea pickle": "minecraft:sea_pickle",
+    "honey block": "minecraft:honey_block",
+    "kelp": "minecraft:kelp",
+    "sunflower": "minecraft:sunflower",
+    "potted lily of the valley": "minecraft:potted_lily_of_the_valley",
+    "green banner": "minecraft:green_banner",
+    "potted spruce sapling": "minecraft:potted_spruce_sapling",
+    "smooth quartz": "minecraft:smooth_quartz",
+    "spruce fence": "minecraft:spruce_fence",
+    "cave air": "minecraft:cave_air",
+    "smooth stone slab": "minecraft:smooth_stone_slab",
+    "purpur pillar": "minecraft:purpur_pillar",
+    "furnace": "minecraft:furnace",
+    "warped button": "minecraft:warped_button",
+    "brown mushroom block": "minecraft:brown_mushroom_block",
+    "attached pumpkin stem": "minecraft:attached_pumpkin_stem",
+    "polished granite slab": "minecraft:polished_granite_slab",
+    "potted blue orchid": "minecraft:potted_blue_orchid",
+    "oak fence": "minecraft:oak_fence",
+    "dandelion": "minecraft:dandelion",
+    "dead tube coral fan": "minecraft:dead_tube_coral_fan",
+    "light gray stained glass pane": "minecraft:light_gray_stained_glass_pane",
+    "red mushroom block": "minecraft:red_mushroom_block",
+    "note block": "minecraft:note_block",
+    "gold block": "minecraft:gold_block",
+    "soul fire": "minecraft:soul_fire",
+    "black terracotta": "minecraft:black_terracotta",
+    "jungle leaves": "minecraft:jungle_leaves",
+    "mossy cobblestone slab": "minecraft:mossy_cobblestone_slab",
+    "infested stone": "minecraft:infested_stone",
+    "orange stained glass": "minecraft:orange_stained_glass",
+    "polished andesite slab": "minecraft:polished_andesite_slab",
+    "crimson nylium": "minecraft:crimson_nylium",
+    "gray concrete": "minecraft:gray_concrete",
+    "mossy stone brick stairs": "minecraft:mossy_stone_brick_stairs",
+    "sugar cane": "minecraft:sugar_cane",
+    "red banner": "minecraft:red_banner",
+    "magenta wall banner": "minecraft:magenta_wall_banner",
+    "polished diorite slab": "minecraft:polished_diorite_slab",
+    "azure bluet": "minecraft:azure_bluet",
+    "mossy stone bricks": "minecraft:mossy_stone_bricks",
+    "smooth sandstone": "minecraft:smooth_sandstone",
+    "green carpet": "minecraft:green_carpet",
+    "birch trapdoor": "minecraft:birch_trapdoor",
+    "purpur block": "minecraft:purpur_block",
+    "dispenser": "minecraft:dispenser",
+    "gray stained glass": "minecraft:gray_stained_glass",
+    "chiseled polished blackstone": "minecraft:chiseled_polished_blackstone",
+    "magenta concrete": "minecraft:magenta_concrete",
+    "spruce wood": "minecraft:spruce_wood",
+    "dead bubble coral wall fan": "minecraft:dead_bubble_coral_wall_fan",
+    "fire coral block": "minecraft:fire_coral_block",
+    "black wool": "minecraft:black_wool",
+    "cut red sandstone slab": "minecraft:cut_red_sandstone_slab",
+    "potted oak sapling": "minecraft:potted_oak_sapling",
+    "infested cobblestone": "minecraft:infested_cobblestone",
+    "light blue concrete": "minecraft:light_blue_concrete",
+    "horn coral fan": "minecraft:horn_coral_fan",
+    "birch fence": "minecraft:birch_fence",
+    "purple concrete powder": "minecraft:purple_concrete_powder",
+    "birch wood": "minecraft:birch_wood",
+    "cyan stained glass pane": "minecraft:cyan_stained_glass_pane",
+    "nether brick wall": "minecraft:nether_brick_wall",
+    "black concrete": "minecraft:black_concrete",
+    "lime banner": "minecraft:lime_banner",
+    "iron": "minecraft:iron_block",
+    "light blue stained glass pane": "minecraft:light_blue_stained_glass_pane",
+    "white concrete": "minecraft:white_concrete",
+    "twisting vines": "minecraft:twisting_vines",
+    "dropper": "minecraft:dropper",
+    "polished blackstone brick stairs": "minecraft:polished_blackstone_brick_stairs",
+    "lime wall banner": "minecraft:lime_wall_banner",
+    "crimson trapdoor": "minecraft:crimson_trapdoor",
+    "cobblestone wall": "minecraft:cobblestone_wall",
+    "bookshelf": "minecraft:bookshelf",
+    "brain coral fan": "minecraft:brain_coral_fan",
+    "purpur": "minecraft:purpur_block",
+    "pink banner": "minecraft:pink_banner",
+    "bell": "minecraft:bell",
+    "emerald ore": "minecraft:emerald_ore",
+    "acacia log": "minecraft:acacia_log",
+    "crimson fence gate": "minecraft:crimson_fence_gate",
+    "white bed": "minecraft:white_bed",
+    "spruce slab": "minecraft:spruce_slab",
+    "birch slab": "minecraft:birch_slab",
+    "anvil": "minecraft:anvil",
+    "structure block": "minecraft:structure_block",
+    "oak slab": "minecraft:oak_slab",
+    "red tulip": "minecraft:red_tulip",
+    "cut sandstone slab": "minecraft:cut_sandstone_slab",
+    "birch pressure plate": "minecraft:birch_pressure_plate",
+    "soul campfire": "minecraft:soul_campfire",
+    "red wool": "minecraft:red_wool",
+    "attached melon stem": "minecraft:attached_melon_stem",
+    "soul torch": "minecraft:soul_torch",
+    "torch": "minecraft:torch",
+    "flower pot": "minecraft:flower_pot",
+    "acacia sapling": "minecraft:acacia_sapling",
+    "lantern": "minecraft:lantern",
+    "iron block": "minecraft:iron_block",
+    "spawner": "minecraft:spawner",
+    "crimson planks": "minecraft:crimson_planks",
+    "bubble coral block": "minecraft:bubble_coral_block",
+    "acacia sign": "minecraft:acacia_sign",
+    "jungle stairs": "minecraft:jungle_stairs",
+    "jungle door": "minecraft:jungle_door",
+    "potted dark oak sapling": "minecraft:potted_dark_oak_sapling",
+    "blue stained glass": "minecraft:blue_stained_glass",
+    "lapis block": "minecraft:lapis_block",
+    "ancient debris": "minecraft:ancient_debris",
+    "dead fire coral": "minecraft:dead_fire_coral_block",
+    "warped door": "minecraft:warped_door",
+    "dark prismarine slab": "minecraft:dark_prismarine_slab",
+    "dark oak slab": "minecraft:dark_oak_slab",
+    "nether wart block": "minecraft:nether_wart_block",
+    "bubble coral fan": "minecraft:bubble_coral_fan",
+    "red sandstone wall": "minecraft:red_sandstone_wall",
+    "cracked stone bricks": "minecraft:cracked_stone_bricks",
+    "dirt": "minecraft:dirt",
+    "lever": "minecraft:lever",
+    "lime carpet": "minecraft:lime_carpet",
+    "smooth sandstone stairs": "minecraft:smooth_sandstone_stairs",
+    "dark oak planks": "minecraft:dark_oak_planks",
+    "purple glazed terracotta": "minecraft:purple_glazed_terracotta",
+    "spruce stairs": "minecraft:spruce_stairs",
+    "coal": "minecraft:coal_block",
+    "emerald block": "minecraft:emerald_block",
+    "acacia planks": "minecraft:acacia_planks",
+    "brown terracotta": "minecraft:brown_terracotta",
+    "green wall banner": "minecraft:green_wall_banner",
+    "glass pane": "minecraft:glass_pane",
+    "cobblestone": "minecraft:cobblestone",
+    "red carpet": "minecraft:red_carpet",
+    "red mushroom": "minecraft:red_mushroom_block",
+    "bricks": "minecraft:bricks",
+    "green terracotta": "minecraft:green_terracotta",
+    "white wall banner": "minecraft:white_wall_banner",
+    "structure": "minecraft:structure_block",
+    "structure void": "minecraft:structure_void",
+    "jungle sapling": "minecraft:jungle_sapling",
+    "potted warped roots": "minecraft:potted_warped_roots",
+    "magenta shulker box": "minecraft:magenta_shulker_box",
+    "pumpkin": "minecraft:pumpkin",
+    "polished blackstone wall": "minecraft:polished_blackstone_wall",
+    "mossy stone brick wall": "minecraft:mossy_stone_brick_wall",
+    "acacia wall sign": "minecraft:acacia_wall_sign",
+    "dead horn coral fan": "minecraft:dead_horn_coral_fan",
+    "blue wool": "minecraft:blue_wool",
+    "mossy cobblestone wall": "minecraft:mossy_cobblestone_wall",
+    "chiseled sandstone": "minecraft:chiseled_sandstone",
+    "spruce sapling": "minecraft:spruce_sapling",
+    "observer": "minecraft:observer",
+    "dead brain coral fan": "minecraft:dead_brain_coral_fan",
+    "pink concrete": "minecraft:pink_concrete",
+    "podzol": "minecraft:podzol",
+    "redstone wire": "minecraft:redstone_wire",
+    "stripped dark oak log": "minecraft:stripped_dark_oak_log",
+    "fire": "minecraft:fire",
+    "yellow concrete powder": "minecraft:yellow_concrete_powder",
+    "andesite": "minecraft:andesite",
+    "detector rail": "minecraft:detector_rail",
+    "chiseled red sandstone": "minecraft:chiseled_red_sandstone",
+    "pink stained glass pane": "minecraft:pink_stained_glass_pane",
+    "gray banner": "minecraft:gray_banner",
+    "chiseled stone bricks": "minecraft:chiseled_stone_bricks",
+    "pumpkin stem": "minecraft:pumpkin_stem",
+    "hay block": "minecraft:hay_block",
+    "jungle trapdoor": "minecraft:jungle_trapdoor",
+    "peony": "minecraft:peony",
+    "yellow concrete": "minecraft:yellow_concrete",
+    "light gray shulker box": "minecraft:light_gray_shulker_box",
+    "poppy": "minecraft:poppy",
+    "end stone bricks": "minecraft:end_stone_bricks",
+    "gray concrete powder": "minecraft:gray_concrete_powder",
+    "soul sand": "minecraft:soul_sand",
+    "orange banner": "minecraft:orange_banner",
+    "cactus": "minecraft:cactus",
+    "magma block": "minecraft:magma_block",
+    "carrots": "minecraft:carrots",
+    "jungle pressure plate": "minecraft:jungle_pressure_plate",
+    "pink glazed terracotta": "minecraft:pink_glazed_terracotta",
+    "black wall banner": "minecraft:black_wall_banner",
+    "granite wall": "minecraft:granite_wall",
+    "red nether brick stairs": "minecraft:red_nether_brick_stairs",
+    "light gray banner": "minecraft:light_gray_banner",
+    "skeleton skull": "minecraft:skeleton_skull",
+    "bee nest": "minecraft:bee_nest",
+    "light gray wool": "minecraft:light_gray_wool",
+    "powered rail": "minecraft:powered_rail",
+    "lime glazed terracotta": "minecraft:lime_glazed_terracotta",
+    "infested cracked stone bricks": "minecraft:infested_cracked_stone_bricks",
+    "nether brick slab": "minecraft:nether_brick_slab",
+    "blue shulker box": "minecraft:blue_shulker_box",
+    "red glazed terracotta": "minecraft:red_glazed_terracotta",
+    "slime block": "minecraft:slime_block",
+    "warped hyphae": "minecraft:warped_hyphae",
+    "purple wool": "minecraft:purple_wool",
+    "ice": "minecraft:ice",
+    "lime stained glass": "minecraft:lime_stained_glass",
+    "mossy cobblestone stairs": "minecraft:mossy_cobblestone_stairs",
+    "smoker": "minecraft:smoker",
+    "respawn anchor": "minecraft:respawn_anchor",
+    "lime shulker box": "minecraft:lime_shulker_box",
+    "red shulker box": "minecraft:red_shulker_box",
+    "loom": "minecraft:loom",
+    "pink terracotta": "minecraft:pink_terracotta",
+    "brown banner": "minecraft:brown_banner",
+    "end gateway": "minecraft:end_gateway",
+    "potted crimson fungus": "minecraft:potted_crimson_fungus",
+    "potted cactus": "minecraft:potted_cactus",
+    "spruce fence gate": "minecraft:spruce_fence_gate",
+    "blue stained glass pane": "minecraft:blue_stained_glass_pane",
+    "composter": "minecraft:composter",
+    "obsidian": "minecraft:obsidian",
+    "crimson slab": "minecraft:crimson_slab",
+    "brown wool": "minecraft:brown_wool",
+    "purple wall banner": "minecraft:purple_wall_banner",
+    "brain coral block": "minecraft:brain_coral_block",
+    "repeating command block": "minecraft:repeating_command_block",
+    "potted crimson roots": "minecraft:potted_crimson_roots",
+    "spruce wall sign": "minecraft:spruce_wall_sign",
+    "crimson wall sign": "minecraft:crimson_wall_sign",
+    "orange concrete powder": "minecraft:orange_concrete_powder",
+    "redstone ore": "minecraft:redstone_ore",
+    "potatoes": "minecraft:potatoes",
+    "jukebox": "minecraft:jukebox",
+    "oak sign": "minecraft:oak_sign",
+    "tall seagrass": "minecraft:tall_seagrass",
+    "honey": "minecraft:honey_block",
+    "sandstone stairs": "minecraft:sandstone_stairs",
+    "tube coral block": "minecraft:tube_coral_block",
+    "warped stairs": "minecraft:warped_stairs",
+    "dead fire coral fan": "minecraft:dead_fire_coral_fan",
+    "iron ore": "minecraft:iron_ore",
+    "void air": "minecraft:void_air",
+    "mushroom stem": "minecraft:mushroom_stem",
+    "dark oak trapdoor": "minecraft:dark_oak_trapdoor",
+    "stone": "minecraft:stone",
+    "stripped acacia wood": "minecraft:stripped_acacia_wood",
+    "potted wither rose": "minecraft:potted_wither_rose",
+    "zombie wall head": "minecraft:zombie_wall_head",
+    "acacia leaves": "minecraft:acacia_leaves",
+    "tube coral fan": "minecraft:tube_coral_fan",
+    "potted oxeye daisy": "minecraft:potted_oxeye_daisy",
+    "green bed": "minecraft:green_bed",
+    "player wall head": "minecraft:player_wall_head",
+    "polished andesite stairs": "minecraft:polished_andesite_stairs",
+    "redstone torch": "minecraft:redstone_torch",
+    "dark oak door": "minecraft:dark_oak_door",
+    "polished blackstone stairs": "minecraft:polished_blackstone_stairs",
+    "yellow bed": "minecraft:yellow_bed",
+    "oak stairs": "minecraft:oak_stairs",
+    "red sand": "minecraft:red_sand",
+    "redstone wall torch": "minecraft:redstone_wall_torch",
+    "tube coral wall fan": "minecraft:tube_coral_wall_fan",
+    "end stone brick slab": "minecraft:end_stone_brick_slab",
+    "nether quartz ore": "minecraft:nether_quartz_ore",
+    "fern": "minecraft:fern",
+    "gray bed": "minecraft:gray_bed",
+    "trapped chest": "minecraft:trapped_chest",
+    "light blue carpet": "minecraft:light_blue_carpet",
+    "large fern": "minecraft:large_fern",
+    "black banner": "minecraft:black_banner",
+    "purple terracotta": "minecraft:purple_terracotta",
+    "stripped birch wood": "minecraft:stripped_birch_wood",
+    "purpur slab": "minecraft:purpur_slab",
+    "soul lantern": "minecraft:soul_lantern",
+    "yellow wool": "minecraft:yellow_wool",
+    "smithing table": "minecraft:smithing_table",
+    "dark oak fence gate": "minecraft:dark_oak_fence_gate",
+    "dark oak button": "minecraft:dark_oak_button",
+    "honeycomb block": "minecraft:honeycomb_block",
+    "white glazed terracotta": "minecraft:white_glazed_terracotta",
+    "dried kelp block": "minecraft:dried_kelp_block",
+    "warped planks": "minecraft:warped_planks",
+    "pink carpet": "minecraft:pink_carpet",
+    "blue wall banner": "minecraft:blue_wall_banner",
+    "wall torch": "minecraft:wall_torch",
+    "diamond ore": "minecraft:diamond_ore",
+    "sandstone slab": "minecraft:sandstone_slab",
+    "cobblestone slab": "minecraft:cobblestone_slab",
+    "nether sprouts": "minecraft:nether_sprouts",
+    "quartz bricks": "minecraft:quartz_bricks",
+    "granite stairs": "minecraft:granite_stairs",
+    "blue ice": "minecraft:blue_ice",
+    "stone button": "minecraft:stone_button",
+    "potted orange tulip": "minecraft:potted_orange_tulip",
+    "crimson roots": "minecraft:crimson_roots",
+    "polished blackstone": "minecraft:polished_blackstone",
+    "spruce trapdoor": "minecraft:spruce_trapdoor",
+    "warped wart": "minecraft:warped_wart_block",
+    "cyan carpet": "minecraft:cyan_carpet",
+    "fire coral": "minecraft:fire_coral_block",
+    "cornflower": "minecraft:cornflower",
+    "birch wall sign": "minecraft:birch_wall_sign",
+    "dead tube coral": "minecraft:dead_tube_coral_block",
+    "cyan terracotta": "minecraft:cyan_terracotta",
+    "warped pressure plate": "minecraft:warped_pressure_plate",
+    "dark prismarine": "minecraft:dark_prismarine",
+    "acacia door": "minecraft:acacia_door",
+    "orange concrete": "minecraft:orange_concrete",
+    "stone bricks": "minecraft:stone_bricks",
+    "barrier": "minecraft:barrier",
+    "beetroots": "minecraft:beetroots",
+    "prismarine brick slab": "minecraft:prismarine_brick_slab",
+    "petrified oak slab": "minecraft:petrified_oak_slab",
+    "campfire": "minecraft:campfire",
+    "oak trapdoor": "minecraft:oak_trapdoor",
+    "spruce leaves": "minecraft:spruce_leaves",
+    "dead fire coral block": "minecraft:dead_fire_coral_block",
+    "horn coral": "minecraft:horn_coral_block",
+    "stripped warped stem": "minecraft:stripped_warped_stem",
+    "birch fence gate": "minecraft:birch_fence_gate",
+    "black bed": "minecraft:black_bed",
+    "moving piston": "minecraft:moving_piston",
+    "infested mossy stone bricks": "minecraft:infested_mossy_stone_bricks",
+    "blue carpet": "minecraft:blue_carpet",
+    "light gray glazed terracotta": "minecraft:light_gray_glazed_terracotta",
+    "white wool": "minecraft:white_wool",
+    "birch button": "minecraft:birch_button",
+    "spruce sign": "minecraft:spruce_sign",
+    "note": "minecraft:note_block",
+    "birch sign": "minecraft:birch_sign",
+    "shroomlight": "minecraft:shroomlight",
+    "magenta carpet": "minecraft:magenta_carpet",
+    "purple shulker box": "minecraft:purple_shulker_box",
+    "gray wool": "minecraft:gray_wool",
+    "light gray terracotta": "minecraft:light_gray_terracotta",
+    "granite slab": "minecraft:granite_slab",
+    "netherrack": "minecraft:netherrack",
+    "end portal": "minecraft:end_portal",
+    "creeper wall head": "minecraft:creeper_wall_head",
+    "oak wood": "minecraft:oak_wood",
+    "blue concrete": "minecraft:blue_concrete",
+    "damaged anvil": "minecraft:damaged_anvil",
+    "dead brain coral wall fan": "minecraft:dead_brain_coral_wall_fan",
+    "jungle planks": "minecraft:jungle_planks",
+    "light gray bed": "minecraft:light_gray_bed",
+    "command": "minecraft:command_block",
+    "white tulip": "minecraft:white_tulip",
+    "potted dead bush": "minecraft:potted_dead_bush",
+    "lily of the valley": "minecraft:lily_of_the_valley",
+    "stone brick slab": "minecraft:stone_brick_slab",
+    "granite": "minecraft:granite",
+    "jungle sign": "minecraft:jungle_sign",
+    "brown stained glass": "minecraft:brown_stained_glass",
+    "pink shulker box": "minecraft:pink_shulker_box",
+    "crimson button": "minecraft:crimson_button"
+  }
+}
\ No newline at end of file
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/item.json b/nlpcraft-examples/minecraft-model/src/main/resources/item.json
new file mode 100644
index 0000000..4e37f5f
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/item.json
@@ -0,0 +1,997 @@
+{
+  "version": "1.16.4",
+  "data": {
+    "sea lantern": "minecraft:sea_lantern",
+    "oak fence gate": "minecraft:oak_fence_gate",
+    "red bed": "minecraft:red_bed",
+    "egg": "minecraft:egg",
+    "black shulker box": "minecraft:black_shulker_box",
+    "dark oak leaves": "minecraft:dark_oak_leaves",
+    "melon slice": "minecraft:melon_slice",
+    "guardian spawn egg": "minecraft:guardian_spawn_egg",
+    "chiseled quartz block": "minecraft:chiseled_quartz_block",
+    "warped wart block": "minecraft:warped_wart_block",
+    "slime spawn egg": "minecraft:slime_spawn_egg",
+    "green concrete powder": "minecraft:green_concrete_powder",
+    "leather helmet": "minecraft:leather_helmet",
+    "rabbit": "minecraft:rabbit",
+    "dark oak log": "minecraft:dark_oak_log",
+    "chiseled nether bricks": "minecraft:chiseled_nether_bricks",
+    "music disc blocks": "minecraft:music_disc_blocks",
+    "ghast tear": "minecraft:ghast_tear",
+    "iron nugget": "minecraft:iron_nugget",
+    "fletching table": "minecraft:fletching_table",
+    "scaffolding": "minecraft:scaffolding",
+    "brick stairs": "minecraft:brick_stairs",
+    "crimson sign": "minecraft:crimson_sign",
+    "cooked rabbit": "minecraft:cooked_rabbit",
+    "black stained glass pane": "minecraft:black_stained_glass_pane",
+    "phantom spawn egg": "minecraft:phantom_spawn_egg",
+    "netherite ingot": "minecraft:netherite_ingot",
+    "cyan shulker box": "minecraft:cyan_shulker_box",
+    "strider spawn egg": "minecraft:strider_spawn_egg",
+    "honeycomb": "minecraft:honeycomb_block",
+    "blackstone slab": "minecraft:blackstone_slab",
+    "prismarine slab": "minecraft:prismarine_slab",
+    "stone pressure plate": "minecraft:stone_pressure_plate",
+    "iron trapdoor": "minecraft:iron_trapdoor",
+    "redstone": "minecraft:redstone_block",
+    "end stone brick stairs": "minecraft:end_stone_brick_stairs",
+    "stone brick wall": "minecraft:stone_brick_wall",
+    "wolf spawn egg": "minecraft:wolf_spawn_egg",
+    "cyan glazed terracotta": "minecraft:cyan_glazed_terracotta",
+    "nether wart": "minecraft:nether_wart_block",
+    "chorus plant": "minecraft:chorus_plant",
+    "dead brain coral block": "minecraft:dead_brain_coral_block",
+    "netherite block": "minecraft:netherite_block",
+    "dead bubble coral block": "minecraft:dead_bubble_coral_block",
+    "tube coral": "minecraft:tube_coral_block",
+    "diamond sword": "minecraft:diamond_sword",
+    "pink bed": "minecraft:pink_bed",
+    "wooden sword": "minecraft:wooden_sword",
+    "slime": "minecraft:slime_block",
+    "golden pickaxe": "minecraft:golden_pickaxe",
+    "gold": "minecraft:gold_block",
+    "acacia pressure plate": "minecraft:acacia_pressure_plate",
+    "zombified piglin spawn egg": "minecraft:zombified_piglin_spawn_egg",
+    "dead bubble coral fan": "minecraft:dead_bubble_coral_fan",
+    "black stained glass": "minecraft:black_stained_glass",
+    "dead horn coral": "minecraft:dead_horn_coral_block",
+    "black concrete powder": "minecraft:black_concrete_powder",
+    "red terracotta": "minecraft:red_terracotta",
+    "wither skeleton skull": "minecraft:wither_skeleton_skull",
+    "coarse dirt": "minecraft:coarse_dirt",
+    "smooth quartz slab": "minecraft:smooth_quartz_slab",
+    "knowledge book": "minecraft:knowledge_book",
+    "daylight detector": "minecraft:daylight_detector",
+    "charcoal": "minecraft:charcoal",
+    "magenta stained glass": "minecraft:magenta_stained_glass",
+    "saddle": "minecraft:saddle",
+    "acacia button": "minecraft:acacia_button",
+    "crimson fungus": "minecraft:crimson_fungus",
+    "jungle wood": "minecraft:jungle_wood",
+    "dead tube coral block": "minecraft:dead_tube_coral_block",
+    "leather chestplate": "minecraft:leather_chestplate",
+    "ender chest": "minecraft:ender_chest",
+    "pink concrete powder": "minecraft:pink_concrete_powder",
+    "ink sac": "minecraft:ink_sac",
+    "vindicator spawn egg": "minecraft:vindicator_spawn_egg",
+    "farmland": "minecraft:farmland",
+    "lime stained glass pane": "minecraft:lime_stained_glass_pane",
+    "melon": "minecraft:melon",
+    "spider eye": "minecraft:spider_eye",
+    "husk spawn egg": "minecraft:husk_spawn_egg",
+    "magenta dye": "minecraft:magenta_dye",
+    "music disc far": "minecraft:music_disc_far",
+    "tropical fish bucket": "minecraft:tropical_fish_bucket",
+    "light blue bed": "minecraft:light_blue_bed",
+    "polished basalt": "minecraft:polished_basalt",
+    "redstone lamp": "minecraft:redstone_lamp",
+    "warped stem": "minecraft:warped_stem",
+    "dried kelp": "minecraft:dried_kelp_block",
+    "sand": "minecraft:sand",
+    "redstone block": "minecraft:redstone_block",
+    "red sandstone": "minecraft:red_sandstone",
+    "beacon": "minecraft:beacon",
+    "lime wool": "minecraft:lime_wool",
+    "flint": "minecraft:flint",
+    "lime bed": "minecraft:lime_bed",
+    "brown concrete powder": "minecraft:brown_concrete_powder",
+    "magenta banner": "minecraft:magenta_banner",
+    "orange tulip": "minecraft:orange_tulip",
+    "yellow glazed terracotta": "minecraft:yellow_glazed_terracotta",
+    "gray terracotta": "minecraft:gray_terracotta",
+    "emerald": "minecraft:emerald_block",
+    "blackstone": "minecraft:blackstone",
+    "acacia trapdoor": "minecraft:acacia_trapdoor",
+    "light blue wool": "minecraft:light_blue_wool",
+    "netherite sword": "minecraft:netherite_sword",
+    "drowned spawn egg": "minecraft:drowned_spawn_egg",
+    "dark oak fence": "minecraft:dark_oak_fence",
+    "iron bars": "minecraft:iron_bars",
+    "rose bush": "minecraft:rose_bush",
+    "nether brick fence": "minecraft:nether_brick_fence",
+    "beehive": "minecraft:beehive",
+    "lilac": "minecraft:lilac",
+    "netherite helmet": "minecraft:netherite_helmet",
+    "magenta stained glass pane": "minecraft:magenta_stained_glass_pane",
+    "brown concrete": "minecraft:brown_concrete",
+    "red stained glass": "minecraft:red_stained_glass",
+    "light blue glazed terracotta": "minecraft:light_blue_glazed_terracotta",
+    "cracked polished blackstone bricks": "minecraft:cracked_polished_blackstone_bricks",
+    "carved pumpkin": "minecraft:carved_pumpkin",
+    "sticky piston": "minecraft:sticky_piston",
+    "red concrete": "minecraft:red_concrete",
+    "nether gold ore": "minecraft:nether_gold_ore",
+    "fire coral fan": "minecraft:fire_coral_fan",
+    "oak door": "minecraft:oak_door",
+    "fire charge": "minecraft:fire_charge",
+    "prismarine stairs": "minecraft:prismarine_stairs",
+    "warped fence": "minecraft:warped_fence",
+    "stone slab": "minecraft:stone_slab",
+    "light weighted pressure plate": "minecraft:light_weighted_pressure_plate",
+    "green stained glass pane": "minecraft:green_stained_glass_pane",
+    "warped slab": "minecraft:warped_slab",
+    "stray spawn egg": "minecraft:stray_spawn_egg",
+    "nether brick stairs": "minecraft:nether_brick_stairs",
+    "white stained glass": "minecraft:white_stained_glass",
+    "lime concrete powder": "minecraft:lime_concrete_powder",
+    "jungle slab": "minecraft:jungle_slab",
+    "chorus flower": "minecraft:chorus_flower",
+    "glowstone": "minecraft:glowstone",
+    "chipped anvil": "minecraft:chipped_anvil",
+    "purpur stairs": "minecraft:purpur_stairs",
+    "beetroot soup": "minecraft:beetroot_soup",
+    "end rod": "minecraft:end_rod",
+    "yellow dye": "minecraft:yellow_dye",
+    "crimson stem": "minecraft:crimson_stem",
+    "diorite": "minecraft:diorite",
+    "light blue concrete powder": "minecraft:light_blue_concrete_powder",
+    "lime concrete": "minecraft:lime_concrete",
+    "blue bed": "minecraft:blue_bed",
+    "fermented spider eye": "minecraft:fermented_spider_eye",
+    "yellow terracotta": "minecraft:yellow_terracotta",
+    "polished andesite": "minecraft:polished_andesite",
+    "cobweb": "minecraft:cobweb",
+    "blaze powder": "minecraft:blaze_powder",
+    "pink tulip": "minecraft:pink_tulip",
+    "light blue terracotta": "minecraft:light_blue_terracotta",
+    "gravel": "minecraft:gravel",
+    "cyan concrete powder": "minecraft:cyan_concrete_powder",
+    "chainmail chestplate": "minecraft:chainmail_chestplate",
+    "elytra": "minecraft:elytra",
+    "tipped arrow": "minecraft:tipped_arrow",
+    "yellow shulker box": "minecraft:yellow_shulker_box",
+    "jigsaw": "minecraft:jigsaw",
+    "cod bucket": "minecraft:cod_bucket",
+    "yellow banner": "minecraft:yellow_banner",
+    "tnt": "minecraft:tnt",
+    "diorite wall": "minecraft:diorite_wall",
+    "prismarine brick stairs": "minecraft:prismarine_brick_stairs",
+    "stone axe": "minecraft:stone_axe",
+    "wheat seeds": "minecraft:wheat_seeds",
+    "cyan wool": "minecraft:cyan_wool",
+    "white concrete powder": "minecraft:white_concrete_powder",
+    "written book": "minecraft:written_book",
+    "tnt minecart": "minecraft:tnt_minecart",
+    "diamond block": "minecraft:diamond_block",
+    "birch leaves": "minecraft:birch_leaves",
+    "cobblestone stairs": "minecraft:cobblestone_stairs",
+    "golden leggings": "minecraft:golden_leggings",
+    "crimson pressure plate": "minecraft:crimson_pressure_plate",
+    "air": "minecraft:air",
+    "sandstone": "minecraft:sandstone",
+    "item frame": "minecraft:item_frame",
+    "cyan concrete": "minecraft:cyan_concrete",
+    "conduit": "minecraft:conduit",
+    "music disc chirp": "minecraft:music_disc_chirp",
+    "command block": "minecraft:command_block",
+    "bedrock": "minecraft:bedrock",
+    "purple stained glass pane": "minecraft:purple_stained_glass_pane",
+    "blaze rod": "minecraft:blaze_rod",
+    "potato": "minecraft:potato",
+    "oxeye daisy": "minecraft:oxeye_daisy",
+    "bat spawn egg": "minecraft:bat_spawn_egg",
+    "blue orchid": "minecraft:blue_orchid",
+    "end stone brick wall": "minecraft:end_stone_brick_wall",
+    "golden sword": "minecraft:golden_sword",
+    "cooked cod": "minecraft:cooked_cod",
+    "glowstone dust": "minecraft:glowstone_dust",
+    "bubble coral": "minecraft:bubble_coral_block",
+    "comparator": "minecraft:comparator",
+    "chainmail leggings": "minecraft:chainmail_leggings",
+    "rabbit stew": "minecraft:rabbit_stew",
+    "diorite stairs": "minecraft:diorite_stairs",
+    "smooth sandstone slab": "minecraft:smooth_sandstone_slab",
+    "cod": "minecraft:cod",
+    "jack o lantern": "minecraft:jack_o_lantern",
+    "orange bed": "minecraft:orange_bed",
+    "zombie head": "minecraft:zombie_head",
+    "polished diorite": "minecraft:polished_diorite",
+    "crafting table": "minecraft:crafting_table",
+    "arrow": "minecraft:arrow",
+    "salmon spawn egg": "minecraft:salmon_spawn_egg",
+    "blackstone wall": "minecraft:blackstone_wall",
+    "netherite": "minecraft:netherite_block",
+    "netherite shovel": "minecraft:netherite_shovel",
+    "oak planks": "minecraft:oak_planks",
+    "dark prismarine stairs": "minecraft:dark_prismarine_stairs",
+    "phantom membrane": "minecraft:phantom_membrane",
+    "cut red sandstone": "minecraft:cut_red_sandstone",
+    "stonecutter": "minecraft:stonecutter",
+    "light blue shulker box": "minecraft:light_blue_shulker_box",
+    "oak sapling": "minecraft:oak_sapling",
+    "vex spawn egg": "minecraft:vex_spawn_egg",
+    "cocoa beans": "minecraft:cocoa_beans",
+    "polished blackstone brick slab": "minecraft:polished_blackstone_brick_slab",
+    "spruce button": "minecraft:spruce_button",
+    "terracotta": "minecraft:terracotta",
+    "orange terracotta": "minecraft:orange_terracotta",
+    "clock": "minecraft:clock",
+    "zombie horse spawn egg": "minecraft:zombie_horse_spawn_egg",
+    "purple banner": "minecraft:purple_banner",
+    "cartography table": "minecraft:cartography_table",
+    "snow": "minecraft:snow_block",
+    "grass path": "minecraft:grass_path",
+    "experience bottle": "minecraft:experience_bottle",
+    "birch planks": "minecraft:birch_planks",
+    "polished blackstone pressure plate": "minecraft:polished_blackstone_pressure_plate",
+    "pig spawn egg": "minecraft:pig_spawn_egg",
+    "chicken": "minecraft:chicken",
+    "brick wall": "minecraft:brick_wall",
+    "hopper minecart": "minecraft:hopper_minecart",
+    "gilded blackstone": "minecraft:gilded_blackstone",
+    "gray glazed terracotta": "minecraft:gray_glazed_terracotta",
+    "grass block": "minecraft:grass_block",
+    "smooth red sandstone slab": "minecraft:smooth_red_sandstone_slab",
+    "basalt": "minecraft:basalt",
+    "green wool": "minecraft:green_wool",
+    "horn coral block": "minecraft:horn_coral_block",
+    "cracked nether bricks": "minecraft:cracked_nether_bricks",
+    "spruce door": "minecraft:spruce_door",
+    "quartz pillar": "minecraft:quartz_pillar",
+    "stripped warped hyphae": "minecraft:stripped_warped_hyphae",
+    "flower banner pattern": "minecraft:flower_banner_pattern",
+    "quartz": "minecraft:quartz_block",
+    "beetroot": "minecraft:beetroot",
+    "red nether bricks": "minecraft:red_nether_bricks",
+    "acacia boat": "minecraft:acacia_boat",
+    "ladder": "minecraft:ladder",
+    "lodestone": "minecraft:lodestone",
+    "birch door": "minecraft:birch_door",
+    "sandstone wall": "minecraft:sandstone_wall",
+    "yellow stained glass": "minecraft:yellow_stained_glass",
+    "cyan stained glass": "minecraft:cyan_stained_glass",
+    "golden chestplate": "minecraft:golden_chestplate",
+    "crying obsidian": "minecraft:crying_obsidian",
+    "brown stained glass pane": "minecraft:brown_stained_glass_pane",
+    "player head": "minecraft:player_head",
+    "warped fence gate": "minecraft:warped_fence_gate",
+    "purple stained glass": "minecraft:purple_stained_glass",
+    "polished granite stairs": "minecraft:polished_granite_stairs",
+    "red dye": "minecraft:red_dye",
+    "cake": "minecraft:cake",
+    "smooth quartz stairs": "minecraft:smooth_quartz_stairs",
+    "lapis": "minecraft:lapis_block",
+    "pumpkin pie": "minecraft:pumpkin_pie",
+    "crimson door": "minecraft:crimson_door",
+    "chiseled quartz": "minecraft:chiseled_quartz_block",
+    "dark oak pressure plate": "minecraft:dark_oak_pressure_plate",
+    "salmon bucket": "minecraft:salmon_bucket",
+    "lingering potion": "minecraft:lingering_potion",
+    "polished blackstone bricks": "minecraft:polished_blackstone_bricks",
+    "gunpowder": "minecraft:gunpowder",
+    "pufferfish bucket": "minecraft:pufferfish_bucket",
+    "diamond hoe": "minecraft:diamond_hoe",
+    "bamboo": "minecraft:bamboo",
+    "turtle egg": "minecraft:turtle_egg",
+    "magenta terracotta": "minecraft:magenta_terracotta",
+    "blue terracotta": "minecraft:blue_terracotta",
+    "creeper banner pattern": "minecraft:creeper_banner_pattern",
+    "stripped oak log": "minecraft:stripped_oak_log",
+    "gray stained glass pane": "minecraft:gray_stained_glass_pane",
+    "orange carpet": "minecraft:orange_carpet",
+    "golden hoe": "minecraft:golden_hoe",
+    "furnace minecart": "minecraft:furnace_minecart",
+    "magenta concrete powder": "minecraft:magenta_concrete_powder",
+    "brain coral": "minecraft:brain_coral_block",
+    "netherite scrap": "minecraft:netherite_scrap",
+    "white shulker box": "minecraft:white_shulker_box",
+    "dead bush": "minecraft:dead_bush",
+    "oak boat": "minecraft:oak_boat",
+    "skeleton horse spawn egg": "minecraft:skeleton_horse_spawn_egg",
+    "spruce boat": "minecraft:spruce_boat",
+    "mossy stone brick slab": "minecraft:mossy_stone_brick_slab",
+    "clay": "minecraft:clay",
+    "purple bed": "minecraft:purple_bed",
+    "nether brick": "minecraft:nether_brick",
+    "soul soil": "minecraft:soul_soil",
+    "magenta bed": "minecraft:magenta_bed",
+    "jungle button": "minecraft:jungle_button",
+    "lectern": "minecraft:lectern",
+    "magma cream": "minecraft:magma_cream",
+    "stone pickaxe": "minecraft:stone_pickaxe",
+    "birch boat": "minecraft:birch_boat",
+    "red sandstone stairs": "minecraft:red_sandstone_stairs",
+    "wet sponge": "minecraft:wet_sponge",
+    "chest minecart": "minecraft:chest_minecart",
+    "stripped crimson hyphae": "minecraft:stripped_crimson_hyphae",
+    "music disc ward": "minecraft:music_disc_ward",
+    "jungle fence": "minecraft:jungle_fence",
+    "gold ore": "minecraft:gold_ore",
+    "mossy cobblestone": "minecraft:mossy_cobblestone",
+    "blue glazed terracotta": "minecraft:blue_glazed_terracotta",
+    "jungle boat": "minecraft:jungle_boat",
+    "pumpkin seeds": "minecraft:pumpkin_seeds",
+    "oak leaves": "minecraft:oak_leaves",
+    "gray carpet": "minecraft:gray_carpet",
+    "diamond leggings": "minecraft:diamond_leggings",
+    "diamond boots": "minecraft:diamond_boots",
+    "creeper spawn egg": "minecraft:creeper_spawn_egg",
+    "repeater": "minecraft:repeater",
+    "netherite hoe": "minecraft:netherite_hoe",
+    "mycelium": "minecraft:mycelium",
+    "blue banner": "minecraft:blue_banner",
+    "red nether brick wall": "minecraft:red_nether_brick_wall",
+    "chicken spawn egg": "minecraft:chicken_spawn_egg",
+    "acacia wood": "minecraft:acacia_wood",
+    "cyan bed": "minecraft:cyan_bed",
+    "mooshroom spawn egg": "minecraft:mooshroom_spawn_egg",
+    "brown shulker box": "minecraft:brown_shulker_box",
+    "enchanting table": "minecraft:enchanting_table",
+    "green shulker box": "minecraft:green_shulker_box",
+    "smooth red sandstone": "minecraft:smooth_red_sandstone",
+    "hay": "minecraft:hay_block",
+    "glass": "minecraft:glass",
+    "chest": "minecraft:chest",
+    "seagrass": "minecraft:seagrass",
+    "lime dye": "minecraft:lime_dye",
+    "packed ice": "minecraft:packed_ice",
+    "prismarine wall": "minecraft:prismarine_wall",
+    "diorite slab": "minecraft:diorite_slab",
+    "grindstone": "minecraft:grindstone",
+    "orange shulker box": "minecraft:orange_shulker_box",
+    "blackstone stairs": "minecraft:blackstone_stairs",
+    "ender eye": "minecraft:ender_eye",
+    "green glazed terracotta": "minecraft:green_glazed_terracotta",
+    "dragon head": "minecraft:dragon_head",
+    "stripped acacia log": "minecraft:stripped_acacia_log",
+    "cooked beef": "minecraft:cooked_beef",
+    "string": "minecraft:string",
+    "book": "minecraft:book",
+    "warped trapdoor": "minecraft:warped_trapdoor",
+    "andesite slab": "minecraft:andesite_slab",
+    "gray shulker box": "minecraft:gray_shulker_box",
+    "rabbit foot": "minecraft:rabbit_foot",
+    "beetroot seeds": "minecraft:beetroot_seeds",
+    "light blue stained glass": "minecraft:light_blue_stained_glass",
+    "diamond shovel": "minecraft:diamond_shovel",
+    "cave spider spawn egg": "minecraft:cave_spider_spawn_egg",
+    "purple carpet": "minecraft:purple_carpet",
+    "cut sandstone": "minecraft:cut_sandstone",
+    "stripped birch log": "minecraft:stripped_birch_log",
+    "spruce pressure plate": "minecraft:spruce_pressure_plate",
+    "iron axe": "minecraft:iron_axe",
+    "yellow carpet": "minecraft:yellow_carpet",
+    "trident": "minecraft:trident",
+    "orange wool": "minecraft:orange_wool",
+    "acacia fence": "minecraft:acacia_fence",
+    "bone": "minecraft:bone_block",
+    "birch sapling": "minecraft:birch_sapling",
+    "stripped dark oak wood": "minecraft:stripped_dark_oak_wood",
+    "target": "minecraft:target",
+    "smooth red sandstone stairs": "minecraft:smooth_red_sandstone_stairs",
+    "blast furnace": "minecraft:blast_furnace",
+    "polished diorite stairs": "minecraft:polished_diorite_stairs",
+    "quartz block": "minecraft:quartz_block",
+    "cauldron": "minecraft:cauldron",
+    "dark oak sapling": "minecraft:dark_oak_sapling",
+    "acacia slab": "minecraft:acacia_slab",
+    "crossbow": "minecraft:crossbow",
+    "white terracotta": "minecraft:white_terracotta",
+    "dark oak sign": "minecraft:dark_oak_sign",
+    "orange stained glass pane": "minecraft:orange_stained_glass_pane",
+    "piglin spawn egg": "minecraft:piglin_spawn_egg",
+    "light blue banner": "minecraft:light_blue_banner",
+    "shulker box": "minecraft:shulker_box",
+    "music disc pigstep": "minecraft:music_disc_pigstep",
+    "birch log": "minecraft:birch_log",
+    "polished granite": "minecraft:polished_granite",
+    "spruce log": "minecraft:spruce_log",
+    "smooth stone": "minecraft:smooth_stone",
+    "infested stone bricks": "minecraft:infested_stone_bricks",
+    "wither rose": "minecraft:wither_rose",
+    "stripped crimson stem": "minecraft:stripped_crimson_stem",
+    "diamond axe": "minecraft:diamond_axe",
+    "dead bubble coral": "minecraft:dead_bubble_coral_block",
+    "magma cube spawn egg": "minecraft:magma_cube_spawn_egg",
+    "black carpet": "minecraft:black_carpet",
+    "light gray stained glass": "minecraft:light_gray_stained_glass",
+    "oak pressure plate": "minecraft:oak_pressure_plate",
+    "lime terracotta": "minecraft:lime_terracotta",
+    "tripwire hook": "minecraft:tripwire_hook",
+    "polished blackstone brick wall": "minecraft:polished_blackstone_brick_wall",
+    "minecart": "minecraft:minecart",
+    "brick slab": "minecraft:brick_slab",
+    "ender pearl": "minecraft:ender_pearl",
+    "lapis ore": "minecraft:lapis_ore",
+    "dark oak stairs": "minecraft:dark_oak_stairs",
+    "chain command": "minecraft:chain_command_block",
+    "silverfish spawn egg": "minecraft:silverfish_spawn_egg",
+    "warped nylium": "minecraft:warped_nylium",
+    "jungle fence gate": "minecraft:jungle_fence_gate",
+    "lily pad": "minecraft:lily_pad",
+    "iron pickaxe": "minecraft:iron_pickaxe",
+    "acacia stairs": "minecraft:acacia_stairs",
+    "iron leggings": "minecraft:iron_leggings",
+    "tall grass": "minecraft:tall_grass",
+    "polished blackstone button": "minecraft:polished_blackstone_button",
+    "nautilus shell": "minecraft:nautilus_shell",
+    "cat spawn egg": "minecraft:cat_spawn_egg",
+    "barrel": "minecraft:barrel",
+    "stripped spruce log": "minecraft:stripped_spruce_log",
+    "chain": "minecraft:chain",
+    "light gray concrete": "minecraft:light_gray_concrete",
+    "weeping vines": "minecraft:weeping_vines",
+    "brewing stand": "minecraft:brewing_stand",
+    "music disc wait": "minecraft:music_disc_wait",
+    "magenta glazed terracotta": "minecraft:magenta_glazed_terracotta",
+    "polished blackstone slab": "minecraft:polished_blackstone_slab",
+    "light gray concrete powder": "minecraft:light_gray_concrete_powder",
+    "brown carpet": "minecraft:brown_carpet",
+    "stripped jungle wood": "minecraft:stripped_jungle_wood",
+    "stripped spruce wood": "minecraft:stripped_spruce_wood",
+    "dead brain coral": "minecraft:dead_brain_coral_block",
+    "cyan dye": "minecraft:cyan_dye",
+    "coal block": "minecraft:coal_block",
+    "stone stairs": "minecraft:stone_stairs",
+    "green stained glass": "minecraft:green_stained_glass",
+    "heavy weighted pressure plate": "minecraft:heavy_weighted_pressure_plate",
+    "prismarine": "minecraft:prismarine",
+    "nether bricks": "minecraft:nether_bricks",
+    "warped sign": "minecraft:warped_sign",
+    "infested chiseled stone bricks": "minecraft:infested_chiseled_stone_bricks",
+    "porkchop": "minecraft:porkchop",
+    "dead horn coral block": "minecraft:dead_horn_coral_block",
+    "end portal frame": "minecraft:end_portal_frame",
+    "milk bucket": "minecraft:milk_bucket",
+    "stripped oak wood": "minecraft:stripped_oak_wood",
+    "white stained glass pane": "minecraft:white_stained_glass_pane",
+    "diamond pickaxe": "minecraft:diamond_pickaxe",
+    "activator rail": "minecraft:activator_rail",
+    "jungle log": "minecraft:jungle_log",
+    "vine": "minecraft:vine",
+    "magenta wool": "minecraft:magenta_wool",
+    "bone block": "minecraft:bone_block",
+    "rail": "minecraft:rail",
+    "coal ore": "minecraft:coal_ore",
+    "cyan banner": "minecraft:cyan_banner",
+    "quartz slab": "minecraft:quartz_slab",
+    "birch stairs": "minecraft:birch_stairs",
+    "acacia fence gate": "minecraft:acacia_fence_gate",
+    "pink stained glass": "minecraft:pink_stained_glass",
+    "sugar": "minecraft:sugar",
+    "red concrete powder": "minecraft:red_concrete_powder",
+    "bowl": "minecraft:bowl",
+    "writable book": "minecraft:writable_book",
+    "trader llama spawn egg": "minecraft:trader_llama_spawn_egg",
+    "oak button": "minecraft:oak_button",
+    "iron door": "minecraft:iron_door",
+    "pink wool": "minecraft:pink_wool",
+    "light gray carpet": "minecraft:light_gray_carpet",
+    "scute": "minecraft:scute",
+    "rabbit spawn egg": "minecraft:rabbit_spawn_egg",
+    "chain command block": "minecraft:chain_command_block",
+    "purple concrete": "minecraft:purple_concrete",
+    "dragon egg": "minecraft:dragon_egg",
+    "warped fungus": "minecraft:warped_fungus",
+    "stripped jungle log": "minecraft:stripped_jungle_log",
+    "wandering trader spawn egg": "minecraft:wandering_trader_spawn_egg",
+    "prismarine bricks": "minecraft:prismarine_bricks",
+    "andesite stairs": "minecraft:andesite_stairs",
+    "crimson hyphae": "minecraft:crimson_hyphae",
+    "stone hoe": "minecraft:stone_hoe",
+    "brown bed": "minecraft:brown_bed",
+    "rabbit hide": "minecraft:rabbit_hide",
+    "stone brick stairs": "minecraft:stone_brick_stairs",
+    "snow block": "minecraft:snow_block",
+    "crimson stairs": "minecraft:crimson_stairs",
+    "red stained glass pane": "minecraft:red_stained_glass_pane",
+    "diamond": "minecraft:diamond_block",
+    "poisonous potato": "minecraft:poisonous_potato",
+    "brown mushroom": "minecraft:brown_mushroom_block",
+    "iron sword": "minecraft:iron_sword",
+    "dark oak wood": "minecraft:dark_oak_wood",
+    "hopper": "minecraft:hopper",
+    "diamond helmet": "minecraft:diamond_helmet",
+    "sheep spawn egg": "minecraft:sheep_spawn_egg",
+    "white banner": "minecraft:white_banner",
+    "ocelot spawn egg": "minecraft:ocelot_spawn_egg",
+    "chainmail boots": "minecraft:chainmail_boots",
+    "beef": "minecraft:beef",
+    "magma": "minecraft:magma_block",
+    "yellow stained glass pane": "minecraft:yellow_stained_glass_pane",
+    "creeper head": "minecraft:creeper_head",
+    "nether star": "minecraft:nether_star",
+    "black glazed terracotta": "minecraft:black_glazed_terracotta",
+    "red nether brick slab": "minecraft:red_nether_brick_slab",
+    "repeating command": "minecraft:repeating_command_block",
+    "light gray dye": "minecraft:light_gray_dye",
+    "white carpet": "minecraft:white_carpet",
+    "warped roots": "minecraft:warped_roots",
+    "quartz stairs": "minecraft:quartz_stairs",
+    "orange glazed terracotta": "minecraft:orange_glazed_terracotta",
+    "allium": "minecraft:allium",
+    "oak log": "minecraft:oak_log",
+    "bucket": "minecraft:bucket",
+    "iron helmet": "minecraft:iron_helmet",
+    "iron boots": "minecraft:iron_boots",
+    "end stone": "minecraft:end_stone",
+    "spruce planks": "minecraft:spruce_planks",
+    "red sandstone slab": "minecraft:red_sandstone_slab",
+    "crimson fence": "minecraft:crimson_fence",
+    "sponge": "minecraft:sponge",
+    "blue concrete powder": "minecraft:blue_concrete_powder",
+    "green concrete": "minecraft:green_concrete",
+    "parrot spawn egg": "minecraft:parrot_spawn_egg",
+    "brown glazed terracotta": "minecraft:brown_glazed_terracotta",
+    "grass": "minecraft:grass_block",
+    "zombie spawn egg": "minecraft:zombie_spawn_egg",
+    "wheat": "minecraft:wheat",
+    "gold nugget": "minecraft:gold_nugget",
+    "golden horse armor": "minecraft:golden_horse_armor",
+    "purple dye": "minecraft:purple_dye",
+    "andesite wall": "minecraft:andesite_wall",
+    "fishing rod": "minecraft:fishing_rod",
+    "piston": "minecraft:piston",
+    "sea pickle": "minecraft:sea_pickle",
+    "dragon breath": "minecraft:dragon_breath",
+    "honey block": "minecraft:honey_block",
+    "kelp": "minecraft:kelp",
+    "sunflower": "minecraft:sunflower",
+    "green banner": "minecraft:green_banner",
+    "turtle spawn egg": "minecraft:turtle_spawn_egg",
+    "smooth quartz": "minecraft:smooth_quartz",
+    "spruce fence": "minecraft:spruce_fence",
+    "elder guardian spawn egg": "minecraft:elder_guardian_spawn_egg",
+    "smooth stone slab": "minecraft:smooth_stone_slab",
+    "music disc 11": "minecraft:music_disc_11",
+    "music disc 13": "minecraft:music_disc_13",
+    "purpur pillar": "minecraft:purpur_pillar",
+    "furnace": "minecraft:furnace",
+    "warped button": "minecraft:warped_button",
+    "brown mushroom block": "minecraft:brown_mushroom_block",
+    "polished granite slab": "minecraft:polished_granite_slab",
+    "oak fence": "minecraft:oak_fence",
+    "dandelion": "minecraft:dandelion",
+    "dead tube coral fan": "minecraft:dead_tube_coral_fan",
+    "light gray stained glass pane": "minecraft:light_gray_stained_glass_pane",
+    "red mushroom block": "minecraft:red_mushroom_block",
+    "note block": "minecraft:note_block",
+    "gold block": "minecraft:gold_block",
+    "black terracotta": "minecraft:black_terracotta",
+    "jungle leaves": "minecraft:jungle_leaves",
+    "mossy cobblestone slab": "minecraft:mossy_cobblestone_slab",
+    "spectral arrow": "minecraft:spectral_arrow",
+    "infested stone": "minecraft:infested_stone",
+    "orange stained glass": "minecraft:orange_stained_glass",
+    "shulker shell": "minecraft:shulker_shell",
+    "polished andesite slab": "minecraft:polished_andesite_slab",
+    "crimson nylium": "minecraft:crimson_nylium",
+    "gray concrete": "minecraft:gray_concrete",
+    "mossy stone brick stairs": "minecraft:mossy_stone_brick_stairs",
+    "sugar cane": "minecraft:sugar_cane",
+    "red banner": "minecraft:red_banner",
+    "polished diorite slab": "minecraft:polished_diorite_slab",
+    "white dye": "minecraft:white_dye",
+    "debug stick": "minecraft:debug_stick",
+    "turtle helmet": "minecraft:turtle_helmet",
+    "azure bluet": "minecraft:azure_bluet",
+    "baked potato": "minecraft:baked_potato",
+    "mossy stone bricks": "minecraft:mossy_stone_bricks",
+    "smooth sandstone": "minecraft:smooth_sandstone",
+    "green carpet": "minecraft:green_carpet",
+    "sweet berries": "minecraft:sweet_berries",
+    "purpur block": "minecraft:purpur_block",
+    "birch trapdoor": "minecraft:birch_trapdoor",
+    "golden helmet": "minecraft:golden_helmet",
+    "green dye": "minecraft:green_dye",
+    "stone shovel": "minecraft:stone_shovel",
+    "dispenser": "minecraft:dispenser",
+    "gray stained glass": "minecraft:gray_stained_glass",
+    "chiseled polished blackstone": "minecraft:chiseled_polished_blackstone",
+    "magenta concrete": "minecraft:magenta_concrete",
+    "spruce wood": "minecraft:spruce_wood",
+    "cooked salmon": "minecraft:cooked_salmon",
+    "piglin banner pattern": "minecraft:piglin_banner_pattern",
+    "fire coral block": "minecraft:fire_coral_block",
+    "black wool": "minecraft:black_wool",
+    "cut red sandstone slab": "minecraft:cut_red_sandstone_slab",
+    "firework rocket": "minecraft:firework_rocket",
+    "firework star": "minecraft:firework_star",
+    "infested cobblestone": "minecraft:infested_cobblestone",
+    "light blue concrete": "minecraft:light_blue_concrete",
+    "potion": "minecraft:potion",
+    "horn coral fan": "minecraft:horn_coral_fan",
+    "birch fence": "minecraft:birch_fence",
+    "cooked porkchop": "minecraft:cooked_porkchop",
+    "purple concrete powder": "minecraft:purple_concrete_powder",
+    "birch wood": "minecraft:birch_wood",
+    "nether brick wall": "minecraft:nether_brick_wall",
+    "cyan stained glass pane": "minecraft:cyan_stained_glass_pane",
+    "blaze spawn egg": "minecraft:blaze_spawn_egg",
+    "black concrete": "minecraft:black_concrete",
+    "lime banner": "minecraft:lime_banner",
+    "mule spawn egg": "minecraft:mule_spawn_egg",
+    "iron": "minecraft:iron_block",
+    "light blue stained glass pane": "minecraft:light_blue_stained_glass_pane",
+    "feather": "minecraft:feather",
+    "white concrete": "minecraft:white_concrete",
+    "twisting vines": "minecraft:twisting_vines",
+    "dropper": "minecraft:dropper",
+    "golden shovel": "minecraft:golden_shovel",
+    "witch spawn egg": "minecraft:witch_spawn_egg",
+    "polished blackstone brick stairs": "minecraft:polished_blackstone_brick_stairs",
+    "wooden pickaxe": "minecraft:wooden_pickaxe",
+    "name tag": "minecraft:name_tag",
+    "shulker spawn egg": "minecraft:shulker_spawn_egg",
+    "crimson trapdoor": "minecraft:crimson_trapdoor",
+    "cobblestone wall": "minecraft:cobblestone_wall",
+    "cookie": "minecraft:cookie",
+    "bookshelf": "minecraft:bookshelf",
+    "brain coral fan": "minecraft:brain_coral_fan",
+    "purpur": "minecraft:purpur_block",
+    "pink banner": "minecraft:pink_banner",
+    "bell": "minecraft:bell",
+    "netherite axe": "minecraft:netherite_axe",
+    "emerald ore": "minecraft:emerald_ore",
+    "acacia log": "minecraft:acacia_log",
+    "gold ingot": "minecraft:gold_ingot",
+    "crimson fence gate": "minecraft:crimson_fence_gate",
+    "piglin brute spawn egg": "minecraft:piglin_brute_spawn_egg",
+    "shield": "minecraft:shield",
+    "spruce slab": "minecraft:spruce_slab",
+    "clay ball": "minecraft:clay_ball",
+    "white bed": "minecraft:white_bed",
+    "birch slab": "minecraft:birch_slab",
+    "anvil": "minecraft:anvil",
+    "structure block": "minecraft:structure_block",
+    "enchanted book": "minecraft:enchanted_book",
+    "command block minecart": "minecraft:command_block_minecart",
+    "oak slab": "minecraft:oak_slab",
+    "red tulip": "minecraft:red_tulip",
+    "iron ingot": "minecraft:iron_ingot",
+    "cut sandstone slab": "minecraft:cut_sandstone_slab",
+    "birch pressure plate": "minecraft:birch_pressure_plate",
+    "soul campfire": "minecraft:soul_campfire",
+    "wither skeleton spawn egg": "minecraft:wither_skeleton_spawn_egg",
+    "map": "minecraft:map",
+    "red wool": "minecraft:red_wool",
+    "bread": "minecraft:bread",
+    "soul torch": "minecraft:soul_torch",
+    "torch": "minecraft:torch",
+    "flower pot": "minecraft:flower_pot",
+    "acacia sapling": "minecraft:acacia_sapling",
+    "gray dye": "minecraft:gray_dye",
+    "dark oak boat": "minecraft:dark_oak_boat",
+    "lantern": "minecraft:lantern",
+    "iron block": "minecraft:iron_block",
+    "spawner": "minecraft:spawner",
+    "iron horse armor": "minecraft:iron_horse_armor",
+    "crimson planks": "minecraft:crimson_planks",
+    "bubble coral block": "minecraft:bubble_coral_block",
+    "diamond horse armor": "minecraft:diamond_horse_armor",
+    "acacia sign": "minecraft:acacia_sign",
+    "jungle stairs": "minecraft:jungle_stairs",
+    "jungle door": "minecraft:jungle_door",
+    "blue stained glass": "minecraft:blue_stained_glass",
+    "lapis block": "minecraft:lapis_block",
+    "ancient debris": "minecraft:ancient_debris",
+    "dead fire coral": "minecraft:dead_fire_coral_block",
+    "warped door": "minecraft:warped_door",
+    "dark prismarine slab": "minecraft:dark_prismarine_slab",
+    "bone meal": "minecraft:bone_meal",
+    "prismarine shard": "minecraft:prismarine_shard",
+    "dark oak slab": "minecraft:dark_oak_slab",
+    "iron hoe": "minecraft:iron_hoe",
+    "nether wart block": "minecraft:nether_wart_block",
+    "melon seeds": "minecraft:melon_seeds",
+    "diamond chestplate": "minecraft:diamond_chestplate",
+    "shears": "minecraft:shears",
+    "carrot on a stick": "minecraft:carrot_on_a_stick",
+    "warped fungus on a stick": "minecraft:warped_fungus_on_a_stick",
+    "black dye": "minecraft:black_dye",
+    "bubble coral fan": "minecraft:bubble_coral_fan",
+    "red sandstone wall": "minecraft:red_sandstone_wall",
+    "cracked stone bricks": "minecraft:cracked_stone_bricks",
+    "dirt": "minecraft:dirt",
+    "lever": "minecraft:lever",
+    "ravager spawn egg": "minecraft:ravager_spawn_egg",
+    "lime carpet": "minecraft:lime_carpet",
+    "smooth sandstone stairs": "minecraft:smooth_sandstone_stairs",
+    "tropical fish": "minecraft:tropical_fish",
+    "dark oak planks": "minecraft:dark_oak_planks",
+    "purple glazed terracotta": "minecraft:purple_glazed_terracotta",
+    "compass": "minecraft:compass",
+    "spruce stairs": "minecraft:spruce_stairs",
+    "golden boots": "minecraft:golden_boots",
+    "coal": "minecraft:coal_block",
+    "emerald block": "minecraft:emerald_block",
+    "acacia planks": "minecraft:acacia_planks",
+    "brown terracotta": "minecraft:brown_terracotta",
+    "enderman spawn egg": "minecraft:enderman_spawn_egg",
+    "golden apple": "minecraft:golden_apple",
+    "netherite leggings": "minecraft:netherite_leggings",
+    "bow": "minecraft:bow",
+    "donkey spawn egg": "minecraft:donkey_spawn_egg",
+    "netherite pickaxe": "minecraft:netherite_pickaxe",
+    "glass pane": "minecraft:glass_pane",
+    "cobblestone": "minecraft:cobblestone",
+    "horse spawn egg": "minecraft:horse_spawn_egg",
+    "red carpet": "minecraft:red_carpet",
+    "brick": "minecraft:brick",
+    "red mushroom": "minecraft:red_mushroom_block",
+    "slime ball": "minecraft:slime_ball",
+    "bricks": "minecraft:bricks",
+    "green terracotta": "minecraft:green_terracotta",
+    "lava bucket": "minecraft:lava_bucket",
+    "flint and steel": "minecraft:flint_and_steel",
+    "golden axe": "minecraft:golden_axe",
+    "structure": "minecraft:structure_block",
+    "structure void": "minecraft:structure_void",
+    "popped chorus fruit": "minecraft:popped_chorus_fruit",
+    "jungle sapling": "minecraft:jungle_sapling",
+    "painting": "minecraft:painting",
+    "magenta shulker box": "minecraft:magenta_shulker_box",
+    "pumpkin": "minecraft:pumpkin",
+    "polished blackstone wall": "minecraft:polished_blackstone_wall",
+    "brown dye": "minecraft:brown_dye",
+    "mossy stone brick wall": "minecraft:mossy_stone_brick_wall",
+    "cooked chicken": "minecraft:cooked_chicken",
+    "dead horn coral fan": "minecraft:dead_horn_coral_fan",
+    "blue wool": "minecraft:blue_wool",
+    "polar bear spawn egg": "minecraft:polar_bear_spawn_egg",
+    "mossy cobblestone wall": "minecraft:mossy_cobblestone_wall",
+    "chiseled sandstone": "minecraft:chiseled_sandstone",
+    "spruce sapling": "minecraft:spruce_sapling",
+    "music disc mall": "minecraft:music_disc_mall",
+    "observer": "minecraft:observer",
+    "dead brain coral fan": "minecraft:dead_brain_coral_fan",
+    "squid spawn egg": "minecraft:squid_spawn_egg",
+    "pink concrete": "minecraft:pink_concrete",
+    "podzol": "minecraft:podzol",
+    "stripped dark oak log": "minecraft:stripped_dark_oak_log",
+    "yellow concrete powder": "minecraft:yellow_concrete_powder",
+    "stick": "minecraft:stick",
+    "andesite": "minecraft:andesite",
+    "leather leggings": "minecraft:leather_leggings",
+    "detector rail": "minecraft:detector_rail",
+    "chiseled red sandstone": "minecraft:chiseled_red_sandstone",
+    "pink stained glass pane": "minecraft:pink_stained_glass_pane",
+    "gray banner": "minecraft:gray_banner",
+    "chiseled stone bricks": "minecraft:chiseled_stone_bricks",
+    "hay block": "minecraft:hay_block",
+    "jungle trapdoor": "minecraft:jungle_trapdoor",
+    "music disc stal": "minecraft:music_disc_stal",
+    "splash potion": "minecraft:splash_potion",
+    "peony": "minecraft:peony",
+    "yellow concrete": "minecraft:yellow_concrete",
+    "light gray shulker box": "minecraft:light_gray_shulker_box",
+    "poppy": "minecraft:poppy",
+    "end stone bricks": "minecraft:end_stone_bricks",
+    "gray concrete powder": "minecraft:gray_concrete_powder",
+    "soul sand": "minecraft:soul_sand",
+    "iron chestplate": "minecraft:iron_chestplate",
+    "orange banner": "minecraft:orange_banner",
+    "light blue dye": "minecraft:light_blue_dye",
+    "cow spawn egg": "minecraft:cow_spawn_egg",
+    "cactus": "minecraft:cactus",
+    "magma block": "minecraft:magma_block",
+    "llama spawn egg": "minecraft:llama_spawn_egg",
+    "zoglin spawn egg": "minecraft:zoglin_spawn_egg",
+    "pink dye": "minecraft:pink_dye",
+    "jungle pressure plate": "minecraft:jungle_pressure_plate",
+    "pink glazed terracotta": "minecraft:pink_glazed_terracotta",
+    "granite wall": "minecraft:granite_wall",
+    "red nether brick stairs": "minecraft:red_nether_brick_stairs",
+    "light gray banner": "minecraft:light_gray_banner",
+    "skeleton skull": "minecraft:skeleton_skull",
+    "bee nest": "minecraft:bee_nest",
+    "light gray wool": "minecraft:light_gray_wool",
+    "powered rail": "minecraft:powered_rail",
+    "lime glazed terracotta": "minecraft:lime_glazed_terracotta",
+    "dolphin spawn egg": "minecraft:dolphin_spawn_egg",
+    "chainmail helmet": "minecraft:chainmail_helmet",
+    "water bucket": "minecraft:water_bucket",
+    "nether brick slab": "minecraft:nether_brick_slab",
+    "infested cracked stone bricks": "minecraft:infested_cracked_stone_bricks",
+    "blue shulker box": "minecraft:blue_shulker_box",
+    "red glazed terracotta": "minecraft:red_glazed_terracotta",
+    "slime block": "minecraft:slime_block",
+    "warped hyphae": "minecraft:warped_hyphae",
+    "rotten flesh": "minecraft:rotten_flesh",
+    "music disc strad": "minecraft:music_disc_strad",
+    "purple wool": "minecraft:purple_wool",
+    "ice": "minecraft:ice",
+    "lime stained glass": "minecraft:lime_stained_glass",
+    "mossy cobblestone stairs": "minecraft:mossy_cobblestone_stairs",
+    "cooked mutton": "minecraft:cooked_mutton",
+    "smoker": "minecraft:smoker",
+    "respawn anchor": "minecraft:respawn_anchor",
+    "lime shulker box": "minecraft:lime_shulker_box",
+    "red shulker box": "minecraft:red_shulker_box",
+    "loom": "minecraft:loom",
+    "golden carrot": "minecraft:golden_carrot",
+    "pink terracotta": "minecraft:pink_terracotta",
+    "wooden shovel": "minecraft:wooden_shovel",
+    "brown banner": "minecraft:brown_banner",
+    "spruce fence gate": "minecraft:spruce_fence_gate",
+    "blue stained glass pane": "minecraft:blue_stained_glass_pane",
+    "composter": "minecraft:composter",
+    "mutton": "minecraft:mutton",
+    "obsidian": "minecraft:obsidian",
+    "prismarine crystals": "minecraft:prismarine_crystals",
+    "crimson slab": "minecraft:crimson_slab",
+    "brown wool": "minecraft:brown_wool",
+    "zombie villager spawn egg": "minecraft:zombie_villager_spawn_egg",
+    "brain coral block": "minecraft:brain_coral_block",
+    "repeating command block": "minecraft:repeating_command_block",
+    "orange concrete powder": "minecraft:orange_concrete_powder",
+    "filled map": "minecraft:filled_map",
+    "redstone ore": "minecraft:redstone_ore",
+    "jukebox": "minecraft:jukebox",
+    "oak sign": "minecraft:oak_sign",
+    "apple": "minecraft:apple",
+    "ghast spawn egg": "minecraft:ghast_spawn_egg",
+    "honey": "minecraft:honey_block",
+    "sandstone stairs": "minecraft:sandstone_stairs",
+    "tube coral block": "minecraft:tube_coral_block",
+    "warped stairs": "minecraft:warped_stairs",
+    "wooden axe": "minecraft:wooden_axe",
+    "dead fire coral fan": "minecraft:dead_fire_coral_fan",
+    "iron ore": "minecraft:iron_ore",
+    "mushroom stem": "minecraft:mushroom_stem",
+    "glass bottle": "minecraft:glass_bottle",
+    "dark oak trapdoor": "minecraft:dark_oak_trapdoor",
+    "mushroom stew": "minecraft:mushroom_stew",
+    "stone": "minecraft:stone",
+    "stone sword": "minecraft:stone_sword",
+    "stripped acacia wood": "minecraft:stripped_acacia_wood",
+    "globe banner pattern": "minecraft:globe_banner_pattern",
+    "acacia leaves": "minecraft:acacia_leaves",
+    "tube coral fan": "minecraft:tube_coral_fan",
+    "green bed": "minecraft:green_bed",
+    "polished andesite stairs": "minecraft:polished_andesite_stairs",
+    "redstone torch": "minecraft:redstone_torch",
+    "dark oak door": "minecraft:dark_oak_door",
+    "polished blackstone stairs": "minecraft:polished_blackstone_stairs",
+    "glistering melon slice": "minecraft:glistering_melon_slice",
+    "netherite boots": "minecraft:netherite_boots",
+    "heart of the sea": "minecraft:heart_of_the_sea",
+    "yellow bed": "minecraft:yellow_bed",
+    "villager spawn egg": "minecraft:villager_spawn_egg",
+    "oak stairs": "minecraft:oak_stairs",
+    "red sand": "minecraft:red_sand",
+    "endermite spawn egg": "minecraft:endermite_spawn_egg",
+    "end stone brick slab": "minecraft:end_stone_brick_slab",
+    "spider spawn egg": "minecraft:spider_spawn_egg",
+    "nether quartz ore": "minecraft:nether_quartz_ore",
+    "fern": "minecraft:fern",
+    "trapped chest": "minecraft:trapped_chest",
+    "iron shovel": "minecraft:iron_shovel",
+    "gray bed": "minecraft:gray_bed",
+    "light blue carpet": "minecraft:light_blue_carpet",
+    "large fern": "minecraft:large_fern",
+    "black banner": "minecraft:black_banner",
+    "panda spawn egg": "minecraft:panda_spawn_egg",
+    "purple terracotta": "minecraft:purple_terracotta",
+    "stripped birch wood": "minecraft:stripped_birch_wood",
+    "purpur slab": "minecraft:purpur_slab",
+    "leather": "minecraft:leather",
+    "soul lantern": "minecraft:soul_lantern",
+    "yellow wool": "minecraft:yellow_wool",
+    "blue dye": "minecraft:blue_dye",
+    "smithing table": "minecraft:smithing_table",
+    "dark oak fence gate": "minecraft:dark_oak_fence_gate",
+    "hoglin spawn egg": "minecraft:hoglin_spawn_egg",
+    "dark oak button": "minecraft:dark_oak_button",
+    "honeycomb block": "minecraft:honeycomb_block",
+    "totem of undying": "minecraft:totem_of_undying",
+    "snowball": "minecraft:snowball",
+    "white glazed terracotta": "minecraft:white_glazed_terracotta",
+    "dried kelp block": "minecraft:dried_kelp_block",
+    "warped planks": "minecraft:warped_planks",
+    "pink carpet": "minecraft:pink_carpet",
+    "diamond ore": "minecraft:diamond_ore",
+    "sandstone slab": "minecraft:sandstone_slab",
+    "cobblestone slab": "minecraft:cobblestone_slab",
+    "nether sprouts": "minecraft:nether_sprouts",
+    "quartz bricks": "minecraft:quartz_bricks",
+    "granite stairs": "minecraft:granite_stairs",
+    "blue ice": "minecraft:blue_ice",
+    "music disc cat": "minecraft:music_disc_cat",
+    "stone button": "minecraft:stone_button",
+    "skeleton spawn egg": "minecraft:skeleton_spawn_egg",
+    "crimson roots": "minecraft:crimson_roots",
+    "lead": "minecraft:lead",
+    "suspicious stew": "minecraft:suspicious_stew",
+    "polished blackstone": "minecraft:polished_blackstone",
+    "spruce trapdoor": "minecraft:spruce_trapdoor",
+    "skull banner pattern": "minecraft:skull_banner_pattern",
+    "warped wart": "minecraft:warped_wart_block",
+    "cyan carpet": "minecraft:cyan_carpet",
+    "fire coral": "minecraft:fire_coral_block",
+    "mojang banner pattern": "minecraft:mojang_banner_pattern",
+    "cornflower": "minecraft:cornflower",
+    "armor stand": "minecraft:armor_stand",
+    "dead tube coral": "minecraft:dead_tube_coral_block",
+    "warped pressure plate": "minecraft:warped_pressure_plate",
+    "cyan terracotta": "minecraft:cyan_terracotta",
+    "dark prismarine": "minecraft:dark_prismarine",
+    "orange concrete": "minecraft:orange_concrete",
+    "acacia door": "minecraft:acacia_door",
+    "fox spawn egg": "minecraft:fox_spawn_egg",
+    "orange dye": "minecraft:orange_dye",
+    "stone bricks": "minecraft:stone_bricks",
+    "barrier": "minecraft:barrier",
+    "enchanted golden apple": "minecraft:enchanted_golden_apple",
+    "music disc mellohi": "minecraft:music_disc_mellohi",
+    "bee spawn egg": "minecraft:bee_spawn_egg",
+    "prismarine brick slab": "minecraft:prismarine_brick_slab",
+    "petrified oak slab": "minecraft:petrified_oak_slab",
+    "evoker spawn egg": "minecraft:evoker_spawn_egg",
+    "campfire": "minecraft:campfire",
+    "oak trapdoor": "minecraft:oak_trapdoor",
+    "spruce leaves": "minecraft:spruce_leaves",
+    "dead fire coral block": "minecraft:dead_fire_coral_block",
+    "leather boots": "minecraft:leather_boots",
+    "horn coral": "minecraft:horn_coral_block",
+    "salmon": "minecraft:salmon",
+    "stripped warped stem": "minecraft:stripped_warped_stem",
+    "birch fence gate": "minecraft:birch_fence_gate",
+    "chorus fruit": "minecraft:chorus_fruit",
+    "black bed": "minecraft:black_bed",
+    "leather horse armor": "minecraft:leather_horse_armor",
+    "infested mossy stone bricks": "minecraft:infested_mossy_stone_bricks",
+    "blue carpet": "minecraft:blue_carpet",
+    "light gray glazed terracotta": "minecraft:light_gray_glazed_terracotta",
+    "netherite chestplate": "minecraft:netherite_chestplate",
+    "white wool": "minecraft:white_wool",
+    "birch button": "minecraft:birch_button",
+    "spruce sign": "minecraft:spruce_sign",
+    "note": "minecraft:note_block",
+    "birch sign": "minecraft:birch_sign",
+    "shroomlight": "minecraft:shroomlight",
+    "magenta carpet": "minecraft:magenta_carpet",
+    "purple shulker box": "minecraft:purple_shulker_box",
+    "gray wool": "minecraft:gray_wool",
+    "paper": "minecraft:paper",
+    "light gray terracotta": "minecraft:light_gray_terracotta",
+    "granite slab": "minecraft:granite_slab",
+    "netherrack": "minecraft:netherrack",
+    "cod spawn egg": "minecraft:cod_spawn_egg",
+    "tropical fish spawn egg": "minecraft:tropical_fish_spawn_egg",
+    "pufferfish": "minecraft:pufferfish",
+    "pufferfish spawn egg": "minecraft:pufferfish_spawn_egg",
+    "oak wood": "minecraft:oak_wood",
+    "blue concrete": "minecraft:blue_concrete",
+    "damaged anvil": "minecraft:damaged_anvil",
+    "jungle planks": "minecraft:jungle_planks",
+    "light gray bed": "minecraft:light_gray_bed",
+    "end crystal": "minecraft:end_crystal",
+    "wooden hoe": "minecraft:wooden_hoe",
+    "honey bottle": "minecraft:honey_bottle",
+    "command": "minecraft:command_block",
+    "pillager spawn egg": "minecraft:pillager_spawn_egg",
+    "white tulip": "minecraft:white_tulip",
+    "lily of the valley": "minecraft:lily_of_the_valley",
+    "stone brick slab": "minecraft:stone_brick_slab",
+    "granite": "minecraft:granite",
+    "jungle sign": "minecraft:jungle_sign",
+    "brown stained glass": "minecraft:brown_stained_glass",
+    "pink shulker box": "minecraft:pink_shulker_box",
+    "crimson button": "minecraft:crimson_button",
+    "lapis lazuli": "minecraft:lapis_lazuli",
+    "carrot": "minecraft:carrot"
+  }
+}
\ No newline at end of file
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index f6b37d5..1696d20 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -21,6 +21,7 @@ version: '1.0'
 description: Minecraft Model.
 
 elements:
+  # Weather intent
   - id: rain
     description: Set rain weather
     groups:
@@ -40,6 +41,7 @@ elements:
     synonyms:
       - "{thunder|storm|stormy}"
 
+  # Time intent
   - id: morning
     groups:
       - time
@@ -71,7 +73,21 @@ elements:
     synonyms:
       - "{midnight}"
 
+  # Give intent
+  - id: give:action
+    synonyms:
+      - "{give}"
+  - id: give:target
+    synonyms:
+      - "{me}" # TODO: also could be another player
+  - id: give:item
+    metadata:
+      minecraft:type: item
+    valueLoader: org.apache.nlpcraft.example.MinecraftObjectValueLoader
+
+
 # List of model intents.
 intents:
   - intent=weatherIntent term(arg)={groups @@ 'weather'}
   - intent=timeIntent term(arg)={groups @@ 'time'}
+  - intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'give:target'} term(item)={id == 'give:item'}

[incubator-nlpcraft] 23/27: NLPCRAFT-91: Finish fill 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 5b729f6f7e3890963534aa290b6e6146fb3d6f9e
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 18 19:41:36 2021 -0800

    NLPCRAFT-91: Finish fill command
---
 nlpcraft-examples/minecraft-model/README.md        | 11 +++---
 .../apache/nlpcraft/example/FIllMatchProcessor.kt  | 39 ++++++++++++++++++++--
 .../org/apache/nlpcraft/example/MinecraftModel.kt  |  4 +--
 .../kotlin/org/apache/nlpcraft/example/Utils.kt    |  4 +--
 .../src/main/resources/minecraft.yaml              |  6 ++--
 5 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/README.md b/nlpcraft-examples/minecraft-model/README.md
index 348cd79..63dd1fa 100644
--- a/nlpcraft-examples/minecraft-model/README.md
+++ b/nlpcraft-examples/minecraft-model/README.md
@@ -45,11 +45,12 @@ use modded client, so vanilla client could be used. Commands could be either inv
 on client side, prefixed with slash (`/make it sunny`)
 
 ### Supported commands
-| Command | Example of usage |
-| :---: |:---:|
-`/weather` | Make it rain | 
-`/time` | Set current time to evening | 
-`/give` | Give me iron sword | 
+| Command | Example of usage | Commentary
+| :---: |:---:|:---|
+`/weather` | Make it rain | | 
+`/time` | Set current time to evening | |
+`/give` | Give me iron sword | You can specify quanity |
+`/fill` | Make a cube of gold near me | Can specify length (size of 10, length 10), position (10 meters in front of me/other player) |
 
 ### Copyright
 Copyright (C) 2020 Apache Software Foundation
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
index 26d617e..06db335 100644
--- a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/FIllMatchProcessor.kt
@@ -20,6 +20,7 @@ package org.apache.nlpcraft.example
 
 import org.apache.nlpcraft.example.MinecraftObjectValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
+import java.util.*
 
 class FIllMatchProcessor {
     companion object {
@@ -27,15 +28,20 @@ class FIllMatchProcessor {
             ctx: NCIntentMatch,
             @NCIntentTerm("shape") shape: NCToken,
             @NCIntentTerm("block") blockToken: NCToken,
-            @NCIntentTerm("len") length: NCToken,
+            @NCIntentTerm("len") length: Optional<NCToken>,
             @NCIntentTerm("position") position: NCToken
         ): NCResult {
-            val (from, to) = resultCoordinates(length = length.toInt(), shape.id)
+            val (from, to) = resultCoordinates(transformLength(length), shape.id)
             val block = dumps["item"]!![blockToken.value]!!
+            val player = findPlayer(position)
+            val positionCoordinate = positionCoordinate(position)
 
             // TODO: Use user rotation
             // TODO: handle y coordinate for cube
-            return NCResult.text("execute at @p positioned ~ ~ ~ rotated 0 0 run fill ${from.relativeRotated()} ${to.relativeRotated()} $block")
+            return NCResult.text(
+                "execute at $player positioned ${positionCoordinate.relative()} rotated 0 0 run " +
+                        "fill ${from.relativeRotated()} ${to.relativeRotated()} $block"
+            )
         }
 
         private fun resultCoordinates(length: Int, shape: String): Pair<Coordinate, Coordinate> {
@@ -51,5 +57,32 @@ class FIllMatchProcessor {
                 }
             }
         }
+
+        private fun positionCoordinate(position: NCToken): Coordinate {
+            return when (position.id ) {
+                "position:player" -> Coordinate()
+                "position:front" -> Coordinate(0, 0, transformLength(Optional.of(position), 10))
+                else -> {
+                    throw NCRejection("Unsupported position")
+                }
+            }
+        }
+
+        private fun transformLength(length: Optional<NCToken>, default: Int = 5): Int {
+            return length.flatMap { x ->
+                x.partTokens.stream()
+                    .filter { it.id == "nlpcraft:num" }
+                    .findAny()
+                    .map { it.toInt() }
+            }.orElse(default)
+        }
+
+        private fun findPlayer(position: NCToken): String {
+            return position.partTokens.stream()
+                .filter { it.id == "mc:player" }
+                .findAny()
+                .orElseThrow { NCRejection("") }
+                .player()
+        }
     }
 }
\ No newline at end of file
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 b92c57c..2cc667c 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
@@ -65,7 +65,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
         }
 
         val itemRegistry = dumps["item"]!![item.value]!!
-        val player = player(target.partTokens[1])
+        val player = target.partTokens[1].player()
         val itemQuantity = quantity.map(NCToken::toInt).orElse(1)
 
         return NCResult.text("give $player $itemRegistry $itemQuantity")
@@ -76,7 +76,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
         ctx: NCIntentMatch,
         @NCIntentTerm("shape") shape: NCToken,
         @NCIntentTerm("block") block: NCToken,
-        @NCIntentTerm("len") length: NCToken,
+        @NCIntentTerm("len") length: Optional<NCToken>,
         @NCIntentTerm("position") position: NCToken,
     ): NCResult {
         return FIllMatchProcessor.process(ctx, shape, block, length, position)
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt
index 79fc784..ae52a10 100644
--- a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/Utils.kt
@@ -30,8 +30,8 @@ internal fun NCToken.toInt(): Int {
     return this.meta<Double>("nlpcraft:num:from").toInt()
 }
 
-internal fun player(target: NCToken): String {
-    return if (firstPersonWords.contains(target.normText())) "@p" else target.originalText ?: "@p"
+internal fun NCToken.player(): String {
+    return if (firstPersonWords.contains(this.normText())) "@p" else this.originalText ?: "@p"
 }
 
 internal data class Coordinate(val x: Int = 0, val y: Int = 0, val z: Int = 0) {
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 31762b1..99cee41 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -123,7 +123,7 @@ elements:
       - "wall"
   - id: fill:length
     synonyms:
-      - "{{size|length|diameter} {of|*}}"
+      - "{{size|length|diameter} {of|*} ^^[length](id == 'nlpcraft:num')^^}"
   - id: position:player
     groups:
       - fill:position
@@ -135,7 +135,7 @@ elements:
     groups:
       - fill:position
     synonyms:
-      - "{{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}|*} {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
+      - "{{^^[distance](id == 'nlpcraft:num')^^|*} {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
     "permutateSynonyms": false
 
 
@@ -148,7 +148,7 @@ intents:
   - "intent=giveIntent term(action)={id == 'give:action'} term(quantity)={id == 'nlpcraft:num'}?
   term(item)={id == 'mc:item'} term={id == 'give:block-word'}?"
   - "intent=fillIntent term={id == 'fill:action'} term(shape)={groups @@ 'fill:shape'} term(block)={id == 'mc:item'}
-  term={id == 'fill:length'}? term(len)={id == 'nlpcraft:num'} term(position)={groups @@ 'fill:position'}"
+  term(len)={id == 'fill:length'}? term(position)={groups @@ 'fill:position'}"
 
 # give me sand
 swearWordsAllowed: true

[incubator-nlpcraft] 03/27: 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 e210a73937df43dcbb92112bc96c8129df62f4e9
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] 18/27: Fix regex

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 96bbcc7a1d65477e0aad2cc1780fac3132920770
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Feb 10 17:54:05 2021 -0800

    Fix regex
---
 .../scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index 21eaaab..c82cb10 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -47,12 +47,13 @@ import scala.collection.{Map, Seq, Set, mutable}
 import scala.collection.mutable.{ArrayBuffer, ListBuffer}
 import scala.util.control.Exception._
 
+
 /**
   * Model deployment manager.
   */
 object NCDeployManager extends NCService with DecorateAsScala {
     private final val TOKENS_PROVIDERS_PREFIXES = Set("nlpcraft:", "google:", "stanford:", "opennlp:", "spacy:")
-    private final val ID_REGEX = "^[_a-zA-Z]+[a-zA-Z0-9:-_]*$"
+    private final val ID_REGEX = "^[_a-zA-Z]+[a-zA-Z0-9:\\-_]*$"
 
     private final val CLS_INTENT = classOf[NCIntent]
     private final val CLS_INTENT_REF = classOf[NCIntentRef]

[incubator-nlpcraft] 20/27: Add copyright

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 cbcfd4debb1f9ab78db381c93f89f0f122c0680f
Author: Ifropc <if...@apache.org>
AuthorDate: Thu Feb 11 00:24:19 2021 -0800

    Add copyright
---
 .../kotlin/org/apache/nlpcraft/example/ValueLoaders.kt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
index e664afb..c43951c 100644
--- a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
@@ -1,3 +1,21 @@
+/*
+ * 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 com.fasterxml.jackson.module.kotlin.jacksonObjectMapper

[incubator-nlpcraft] 07/27: 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 dff94ee5aa21831ad22df568edcf9cdc0c38f692
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] 02/27: 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 6b962c1b740ba7db040061a6a80151227a0985f5
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] 08/27: 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 5d903f0d0b2e94ec7209865c82695c676414607e
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] 24/27: NLPCRAFT-91: Add examples to MinecraftModel

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 9ddba5e5a6a4fe05878100de0f72f59722fff985
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Feb 22 18:38:52 2021 -0800

    NLPCRAFT-91: Add examples to MinecraftModel
---
 .../kotlin/org/apache/nlpcraft/example/MinecraftModel.kt  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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 2cc667c..68efd43 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
@@ -26,6 +26,7 @@ import java.util.*
 @Suppress("unused")
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     @NCIntentRef("weatherIntent")
+    @NCIntentSample("make it rain")
     fun onWeatherMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
@@ -35,6 +36,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     }
 
     @NCIntentRef("timeIntent")
+    @NCIntentSample("set time to evening")
     fun onTimeMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
@@ -54,6 +56,11 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     }
 
     @NCIntentRef("giveIntent")
+    @NCIntentSample(
+        "give me iron sword",
+        "give me 10 grass blocks",
+        "give PlayerName a jigsaw"
+    )
     fun onGiveMatch(
         ctx: NCIntentMatch,
         @NCIntentTerm("item") item: NCToken,
@@ -72,6 +79,14 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     }
 
     @NCIntentRef("fillIntent")
+    @NCIntentSample(
+        "make a box of sand in front of me",
+        "make a cube of gold near me",
+        "make a line of grass with length of 2 near me",
+
+        "create a rectangle of dirt in front of PlayerName",
+        "make a box of sand with the size of 2 10 meters in front of me"
+    )
     fun onFillMatch(
         ctx: NCIntentMatch,
         @NCIntentTerm("shape") shape: NCToken,

[incubator-nlpcraft] 17/27: NLPCRAFT-91: fill command draft

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 ca905a8112adb8cd74fdfe33f124ec6b31603f4e
Author: Ifropc <if...@apache.org>
AuthorDate: Mon Feb 8 19:27:52 2021 -0800

    NLPCRAFT-91: fill command draft
---
 .../org/apache/nlpcraft/example/MinecraftModel.kt  | 15 ++++-
 .../org/apache/nlpcraft/example/ValueLoaders.kt    |  2 +-
 .../src/main/resources/{blocks.json => block.json} |  0
 .../src/main/resources/minecraft.yaml              | 66 +++++++++++++++++++---
 4 files changed, 72 insertions(+), 11 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index 9e476d2..73456f6 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
@@ -23,9 +23,9 @@ import org.apache.nlpcraft.example.MinecraftObjectValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
 import java.util.*
 
+@Suppress("unused")
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     @NCIntentRef("weatherIntent")
-    @Suppress("unused")
     fun onWeatherMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
@@ -35,7 +35,6 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     }
 
     @NCIntentRef("timeIntent")
-    @Suppress("unused")
     fun onTimeMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
             throw NCRejection("Ambiguous request")
@@ -55,7 +54,6 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     }
 
     @NCIntentRef("giveIntent")
-    @Suppress("unused")
     fun onGiveMatch(
         ctx: NCIntentMatch,
         @NCIntentTerm("item") item: NCToken,
@@ -77,6 +75,17 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
         return NCResult.text("give $player $itemRegistry $itemQuantity")
     }
 
+    @NCIntentRef("fillIntent")
+    fun onFillMatch(
+        ctx: NCIntentMatch,
+        @NCIntentTerm("shape") shape: NCToken,
+        @NCIntentTerm("block") block: NCToken,
+        @NCIntentTerm("len") length: NCToken,
+        @NCIntentTerm("position") position: NCToken,
+    ): NCResult {
+        TODO()
+    }
+
     private fun NCToken.normText(): String {
         return this.meta("nlpcraft:nlp:normtext")
     }
diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
index 989371e..e664afb 100644
--- a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
+++ b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/ValueLoaders.kt
@@ -13,7 +13,7 @@ class MinecraftObjectValueLoader : NCValueLoader {
     }
 
     override fun load(owner: NCElement?): MutableSet<NCValue> {
-        val type = owner!!.metax<String>("minecraft:type")
+        val type = owner!!.metax<String>("mc:type")
 
         val inputStream = NCModelFileAdapter::class.java.classLoader.getResourceAsStream("${type}.json")
             ?: throw NCException("Minecraft object dump not found: ${type}.json")
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/blocks.json b/nlpcraft-examples/minecraft-model/src/main/resources/block.json
similarity index 100%
rename from nlpcraft-examples/minecraft-model/src/main/resources/blocks.json
rename to nlpcraft-examples/minecraft-model/src/main/resources/block.json
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index d56e05a..708f67d 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -20,7 +20,27 @@ name: Minecraft Model
 version: '1.0'
 description: Minecraft Model.
 
+macros:
+# Doesn't work with fill
+#  - name: "<PLAYER_NAME>"
+#    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
+  - name: "<PLAYER_NAME>"
+    macro: "{me|I|my}"
+
 elements:
+  # General synonyms
+  - id: mc:player
+    synonyms:
+      - "<PLAYER_NAME>"
+  - id: mc:item
+    metadata:
+      mc:type: item
+    valueLoader: org.apache.nlpcraft.example.MinecraftObjectValueLoader
+  - id: mc:block
+    metadata:
+      mc:type: block
+    valueLoader: org.apache.nlpcraft.example.MinecraftObjectValueLoader
+
   # Weather intent
   - id: rain
     description: Set rain weather
@@ -77,20 +97,52 @@ elements:
   - id: give:action
     synonyms:
       - "{give}"
-  - id: give:target
+
+  # Fill intent
+  - id: fill:action
     synonyms:
-      - "{me|//[a-zA-Z0-9]+//}"
-  - id: give:item
-    metadata:
-      minecraft:type: item
-    valueLoader: org.apache.nlpcraft.example.MinecraftObjectValueLoader
+      - "{fill|make|create}"
+  - id: cube
+    groups:
+      - fill:shape
+  - id: sphere
+    groups:
+      - fill:shape
+  - id: square
+    groups:
+      - fill:shape
+    synonyms:
+      - "{box|rectangle}"
+  - id: line
+    groups:
+      - fill:shape
+    synonyms:
+      - "wall"
+  - id: fill:length
+    synonyms:
+      - "{size of?|length of?|diameter of?}"
+  - id: position:player
+    groups:
+      - fill:position
+    synonyms:
+      - "{{at|near} <PLAYER_NAME> position?|where <PLAYER_NAME>}"
+  - id: position:front
+    groups:
+      - fill:position
+    synonyms:
+      - "{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}? in? front of? <PLAYER_NAME>}"
+
+
 
 
 # List of model intents.
 intents:
   - intent=weatherIntent term(arg)={groups @@ 'weather'}
   - intent=timeIntent term(arg)={groups @@ 'time'}
-  - intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'give:target'} term(quantity)={id == 'nlpcraft:num'}? term(item)={id == 'give:item'}
+  - "intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'mc:player'}
+  term(quantity)={id == 'nlpcraft:num'}? term(item)={id == 'mc:item'}"
+  - "intent=fillIntent term={id == 'fill:action'} term(shape)={groups @@ 'fill:shape'} term(block)={id == 'mc:block'}
+  term={id == 'fill:length'}? term(len)={id == 'nlpcraft:num'} term(position)={groups @@ 'fill:position'}"
 
 # give me sand
 swearWordsAllowed: true

[incubator-nlpcraft] 19/27: NLPCRAFT-91: Replace usage of macros with stand-alone element

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 19173f3b69ef439c8c8f2511fe61a955731c0a3d
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Feb 10 17:55:49 2021 -0800

    NLPCRAFT-91: Replace usage of macros with stand-alone element
---
 .../org/apache/nlpcraft/example/MinecraftModel.kt  | 11 ++++++---
 .../src/main/resources/minecraft.yaml              | 26 +++++++++++++---------
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt b/nlpcraft-examples/minecraft-model/src/main/kotlin/org/apache/nlpcraft/example/MinecraftModel.kt
index 73456f6..99a5ad2 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
@@ -25,6 +25,8 @@ import java.util.*
 
 @Suppress("unused")
 class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
+    private var firstPersonWords = setOf("me", "my", "i")
+
     @NCIntentRef("weatherIntent")
     fun onWeatherMatch(ctx: NCIntentMatch, @NCIntentTerm("arg") tok: NCToken): NCResult {
         if (ctx.isAmbiguous) {
@@ -57,7 +59,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     fun onGiveMatch(
         ctx: NCIntentMatch,
         @NCIntentTerm("item") item: NCToken,
-        @NCIntentTerm("target") target: NCToken,
+        @NCIntentTerm("action") target: NCToken,
         @NCIntentTerm("quantity") quantity: Optional<NCToken>
     ): NCResult {
         if (ctx.isAmbiguous) {
@@ -65,8 +67,7 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
         }
 
         val itemRegistry = dumps["item"]!![item.value]!!
-        val player = if (target.normText() == "me") "@p" else target.originalText ?: "@p"
-
+        val player = player(target.partTokens[1])
         val itemQuantity = quantity
             .flatMap { x -> x.metaOpt<Double>("nlpcraft:num:from") }
             .map { x -> x.toLong() }
@@ -89,4 +90,8 @@ class MinecraftModel : NCModelFileAdapter("minecraft.yaml") {
     private fun NCToken.normText(): String {
         return this.meta("nlpcraft:nlp:normtext")
     }
+
+    private fun player(target: NCToken): String {
+        return if (firstPersonWords.contains(target.normText())) "@p" else target.originalText ?: "@p"
+    }
 }
diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 708f67d..6d356bd 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -19,13 +19,13 @@ id: nlpcraft.minecraft.ex
 name: Minecraft Model
 version: '1.0'
 description: Minecraft Model.
+"enabledBuiltInTokens": [
+    "nlpcraft:num"
+]
 
 macros:
-# Doesn't work with fill
-#  - name: "<PLAYER_NAME>"
-#    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
   - name: "<PLAYER_NAME>"
-    macro: "{me|I|my}"
+    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
 
 elements:
   # General synonyms
@@ -96,7 +96,10 @@ elements:
   # Give intent
   - id: give:action
     synonyms:
-      - "{give}"
+      - "{give ^^[target](id == 'mc:player')^^}"
+  - id: give:block-word
+    synonyms:
+      - "{block|blocks}"
 
   # Fill intent
   - id: fill:action
@@ -120,17 +123,18 @@ elements:
       - "wall"
   - id: fill:length
     synonyms:
-      - "{size of?|length of?|diameter of?}"
+      - "{{size|length|diameter} {of|*}}"
   - id: position:player
     groups:
       - fill:position
     synonyms:
-      - "{{at|near} <PLAYER_NAME> position?|where <PLAYER_NAME>}"
+      - "{{at|near} ^^[player](id == 'mc:player')^^ {position|*}|where ^^[player](id == 'mc:player')^^}"
+
   - id: position:front
     groups:
       - fill:position
     synonyms:
-      - "{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}? in? front of? <PLAYER_NAME>}"
+      - "{{^^[distance](id == 'nlpcraft:num')^^ m|meter|meters|ft|feet}? {in|*} front {of|*} ^^[player](id == 'mc:player')^^}"
 
 
 
@@ -139,9 +143,9 @@ elements:
 intents:
   - intent=weatherIntent term(arg)={groups @@ 'weather'}
   - intent=timeIntent term(arg)={groups @@ 'time'}
-  - "intent=giveIntent term(action)={id == 'give:action'} term(target)={id == 'mc:player'}
-  term(quantity)={id == 'nlpcraft:num'}? term(item)={id == 'mc:item'}"
-  - "intent=fillIntent term={id == 'fill:action'} term(shape)={groups @@ 'fill:shape'} term(block)={id == 'mc:block'}
+  - "intent=giveIntent term(action)={id == 'give:action'} term(quantity)={id == 'nlpcraft:num'}?
+  term(item)={id == 'mc:item'} term={id == 'give:block-word'}?"
+  - "intent=fillIntent term={id == 'fill:action'} term(shape)={groups @@ 'fill:shape'} term(block)={id == 'mc:item'}
   term={id == 'fill:length'}? term(len)={id == 'nlpcraft:num'} term(position)={groups @@ 'fill:position'}"
 
 # give me sand

[incubator-nlpcraft] 01/27: 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 66fade481e9b8084c9eb1116f54809c8114c396f
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] 27/27: NLPCRAFT-91: Add basic test

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 bf11d2b007571c3e1ee2374d75dda6ff3690bdb3
Author: Ifropc <if...@apache.org>
AuthorDate: Sat Mar 6 10:28:58 2021 -0800

    NLPCRAFT-91: Add basic test
---
 nlpcraft-examples/minecraft-model/pom.xml          |  7 ++++
 .../nlpcraft/example/NCMinecraftModelSpec.kt       | 37 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/nlpcraft-examples/minecraft-model/pom.xml b/nlpcraft-examples/minecraft-model/pom.xml
index 8a221aa..ccb7793 100644
--- a/nlpcraft-examples/minecraft-model/pom.xml
+++ b/nlpcraft-examples/minecraft-model/pom.xml
@@ -52,6 +52,13 @@
             <artifactId>junit-jupiter-engine</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>nlpcraft</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/nlpcraft-examples/minecraft-model/src/test/kotlin/org/apache/nlpcraft/example/NCMinecraftModelSpec.kt b/nlpcraft-examples/minecraft-model/src/test/kotlin/org/apache/nlpcraft/example/NCMinecraftModelSpec.kt
new file mode 100644
index 0000000..a7fbc66
--- /dev/null
+++ b/nlpcraft-examples/minecraft-model/src/test/kotlin/org/apache/nlpcraft/example/NCMinecraftModelSpec.kt
@@ -0,0 +1,37 @@
+/*
+ * 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.apache.nlpcraft.NCTestContext
+import org.apache.nlpcraft.NCTestEnvironment
+import org.junit.jupiter.api.Test
+import kotlin.test.assertEquals
+
+
+@NCTestEnvironment(model = MinecraftModel::class, startClient = true)
+class NCMinecraftModelSpec : NCTestContext() {
+    @Test
+    fun test() {
+        val res = client.ask("make a box of sand with the size of 2 10 meters in front of me")
+        assertEquals(
+            "execute at @p positioned ~0 ~0 ~10 rotated 0 0 run fill ^-1 ^0 ^-1 ^0 ^0 ^0 minecraft:sand",
+            res.result.get()
+        )
+    }
+}
\ No newline at end of file

[incubator-nlpcraft] 26/27: NLPCRAFT-91: Uncomment macros

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 fae84d654937fbb140cc1838138a954ec9ce4afa
Author: Ifropc <if...@apache.org>
AuthorDate: Sat Mar 6 10:07:55 2021 -0800

    NLPCRAFT-91: Uncomment macros
---
 nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
index 9ad7c6a..e8adef9 100644
--- a/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
+++ b/nlpcraft-examples/minecraft-model/src/main/resources/minecraft.yaml
@@ -24,10 +24,10 @@ description: Minecraft Model.
 ]
 
 macros:
-#  - name: "<PLAYER_NAME>"
-#    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
   - name: "<PLAYER_NAME>"
-    macro: "{me|I|my}"
+    macro: "{me|I|my|//[a-zA-Z0-9]+//}"
+#  - name: "<PLAYER_NAME>"
+#    macro: "{me|I|my}"
 
 elements:
   # General synonyms