You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by if...@apache.org on 2021/02/27 05:14:18 UTC
[incubator-nlpcraft] 07/08: NLPCRAFT-91: Add examples to
MinecraftModel
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 11592bac2a08a0993861a8b0efb8a8465cc98607
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,