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

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

commit 4a3f316c4aa83cf5fea4740282c9ce9adddcc149
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Tue Apr 27 10:42:10 2021 +0300

    WIP.
---
 .../org/apache/nlpcraft/example/minecraft/FIllMatchProcessor.kt     | 2 +-
 .../kotlin/org/apache/nlpcraft/example/minecraft/MinecraftModel.kt  | 2 +-
 .../example/minecraft/{ValueLoaders.kt => MinecraftValueLoaders.kt} | 2 +-
 .../src/main/kotlin/org/apache/nlpcraft/example/minecraft/Utils.kt  | 6 +-----
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/FIllMatchProcessor.kt
 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/FIllMatchProcessor.kt
index f576a52..376d554 100644
--- 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/FIllMatchProcessor.kt
+++ 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/FIllMatchProcessor.kt
@@ -18,7 +18,7 @@
 
 package org.apache.nlpcraft.example.minecraft
 
-import 
org.apache.nlpcraft.example.minecraft.MinecraftObjectValueLoader.Companion.dumps
+import 
org.apache.nlpcraft.example.minecraft.MinecraftValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
 import java.util.*
 
diff --git 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftModel.kt
 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftModel.kt
index 58dfe74..fd1abe5 100644
--- 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftModel.kt
+++ 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftModel.kt
@@ -19,7 +19,7 @@
 package org.apache.nlpcraft.example.minecraft
 
 import org.apache.nlpcraft.common.NCException
-import 
org.apache.nlpcraft.example.minecraft.MinecraftObjectValueLoader.Companion.dumps
+import 
org.apache.nlpcraft.example.minecraft.MinecraftValueLoader.Companion.dumps
 import org.apache.nlpcraft.model.*
 import java.util.*
 
diff --git 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/ValueLoaders.kt
 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftValueLoaders.kt
similarity index 98%
rename from 
nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/ValueLoaders.kt
rename to 
nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftValueLoaders.kt
index 89b44e3..4191bfe 100644
--- 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/ValueLoaders.kt
+++ 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/MinecraftValueLoaders.kt
@@ -26,7 +26,7 @@ import org.apache.nlpcraft.model.NCModelFileAdapter
 import org.apache.nlpcraft.model.NCValue
 import org.apache.nlpcraft.model.NCValueLoader
 
-class MinecraftObjectValueLoader : NCValueLoader {
+class MinecraftValueLoader : NCValueLoader {
     private data class Dump(val version: String, val data: Map<String, String>)
 
     private class NCMinecraftValue(private var name: String, private var 
registry: String) : NCValue {
diff --git 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/Utils.kt
 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/Utils.kt
index 31fdf47..e469f74 100644
--- 
a/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/Utils.kt
+++ 
b/nlpcraft-examples/minecraft/src/main/kotlin/org/apache/nlpcraft/example/minecraft/Utils.kt
@@ -22,16 +22,12 @@ 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 NCToken.player(): String {
-    return if (firstPersonWords.contains(this.normText())) "@p" else 
this.originalText ?: "@p"
+    return if (firstPersonWords.contains(this.normalizedText)) "@p" else 
this.originalText ?: "@p"
 }
 
 internal data class Coordinate(val x: Int = 0, val y: Int = 0, val z: Int = 0) 
{

Reply via email to