You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2021/07/27 12:55:18 UTC
[incubator-nlpcraft] branch NLPCRAFT-376 updated (abcfa62 ->
307e975)
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a change to branch NLPCRAFT-376
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.
from abcfa62 WIP.
add b7626a8 WIP on NLPCRAFT-369.
add 4ef9410 WIP on NLPCRAFT-369
add ff7dcd3 WIP on NLPCRAFT-369.
add 4418fa7 WIP on NLPCRAFT-369.
add 58d85dc WIP on NLPCRAFT-369.
add f3c78d6 WIP.
add 5d4a62d WIP.
add fdbcc35 Quick fix on IDL syntax in tests for NLPCRAFT-369.
add 7c3b63e Test fix in NLPCRAFT-369
add ce544c1 WIP.
add 67caf82 Merge branch 'NLPCRAFT-369' of https://github.com/apache/incubator-nlpcraft into NLPCRAFT-369
add cb97e17 Quick fix in NLPCRAFT-369.
add a137c0c Merge branch 'master' into NLPCRAFT-369
add 68a3c3e Intents IDL `options` tests added.
add d674e13 WIP on NLPCRAFT-369.
add e478769 WIP on NLPCRAFT-369.
add 7551efb WIP on NLPCRAFT-369.
add 251364a WIP on NLPCRAFT-369.
new 307e975 Merge branch 'master' into NLPCRAFT-376
The 1 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:
hs_err_pid98656.log | 3856 ++++++++++++++++++++
.../apache/nlpcraft/examples/alarm/AlarmModel.java | 4 -
.../alarm/src/main/resources/alarm_samples.txt | 2 +-
.../nlpcraft/example/minecraft/MinecraftModel.kt | 17 +-
.../apache/nlpcraft/examples/time/TimeModel.java | 2 -
.../nlpcraft/examples/weather/WeatherModel.java | 4 -
.../org/apache/nlpcraft/common/NCService.scala | 17 +-
.../nlpcraft/common/config/NCConfigurable.scala | 2 +-
.../apache/nlpcraft/common/debug/NCLogHolder.scala | 5 +-
.../apache/nlpcraft/model/NCDialogFlowItem.java | 13 -
.../org/apache/nlpcraft/model/NCIntentMatch.java | 15 -
.../scala/org/apache/nlpcraft/model/NCToken.java | 9 +
.../apache/nlpcraft/model/intent/NCIdlIntent.scala | 9 +-
.../nlpcraft/model/intent/NCIdlIntentOptions.scala | 40 +
.../apache/nlpcraft/model/intent/NCIdlTerm.scala | 2 +-
.../model/intent/compiler/NCIdlCompiler.scala | 55 +-
.../nlpcraft/model/intent/compiler/antlr4/NCIdl.g4 | 8 +-
.../model/intent/compiler/antlr4/NCIdl.interp | 8 +-
.../model/intent/compiler/antlr4/NCIdl.tokens | 4 +-
.../intent/compiler/antlr4/NCIdlBaseListener.java | 18 +-
.../model/intent/compiler/antlr4/NCIdlLexer.interp | 8 +-
.../model/intent/compiler/antlr4/NCIdlLexer.java | 16 +-
.../model/intent/compiler/antlr4/NCIdlLexer.tokens | 4 +-
.../intent/compiler/antlr4/NCIdlListener.java | 22 +-
.../model/intent/compiler/antlr4/NCIdlParser.java | 240 +-
.../model/intent/solver/NCIntentSolver.scala | 1 -
.../model/intent/solver/NCIntentSolverEngine.scala | 170 +-
.../model/intent/solver/NCIntentSolverResult.scala | 6 +-
.../model/tools/test/NCTestClientBuilder.java | 22 +-
.../nlpcraft/probe/mgrs/cmd/NCCommandManager.scala | 35 +-
.../probe/mgrs/conversation/NCConversation.scala | 48 +-
.../mgrs/dialogflow/NCDialogFlowManager.scala | 58 +-
.../probe/mgrs/nlp/NCProbeEnrichmentManager.scala | 12 +-
.../server/ignite/NCIgniteCacheStore.scala | 2 +-
.../nlpcraft/server/probe/NCProbeManager.scala | 4 +-
.../nlpcraft/server/query/NCQueryManager.scala | 2 +-
.../nlpcraft/server/user/NCUserManager.scala | 2 +-
nlpcraft/src/test/resources/log4j2.xml | 2 +-
.../scala/org/apache/nlpcraft/NCTestContext.scala | 7 +-
.../nlpcraft/model/NCTrueIntentIdlSpec.scala | 2 +-
.../intent/idl/compiler/NCIdlCompilerSpec.scala | 71 +-
.../model/intent/idl/options/NCFreeWordsSpec.scala | 75 +
.../model/intent/idl/options/NCOrderedSpec.scala | 75 +
.../model/intent/idl/options/NCStmOnlySpec.scala | 130 +
.../model/intent/idl/options/NCSysTokensSpec.scala | 75 +
.../intent/idl/options/NCUserTokensSpec.scala | 75 +
.../model/properties/NCTokensPropertiesSpec.scala | 68 +-
.../mgrs/nlp/enrichers/NCEnricherBaseSpec.scala | 4 +-
48 files changed, 4909 insertions(+), 417 deletions(-)
create mode 100644 hs_err_pid98656.log
create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala
create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/options/NCFreeWordsSpec.scala
create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/options/NCOrderedSpec.scala
create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/options/NCStmOnlySpec.scala
create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/options/NCSysTokensSpec.scala
create mode 100644 nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/options/NCUserTokensSpec.scala
[incubator-nlpcraft] 01/01: Merge branch 'master' into NLPCRAFT-376
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-376
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 307e9758844624417eba790d4b560664449ebeb9
Merge: abcfa62 251364a
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Tue Jul 27 15:54:05 2021 +0300
Merge branch 'master' into NLPCRAFT-376
# Conflicts:
# nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala
hs_err_pid98656.log | 3856 ++++++++++++++++++++
.../apache/nlpcraft/examples/alarm/AlarmModel.java | 4 -
.../alarm/src/main/resources/alarm_samples.txt | 2 +-
.../nlpcraft/example/minecraft/MinecraftModel.kt | 17 +-
.../apache/nlpcraft/examples/time/TimeModel.java | 2 -
.../nlpcraft/examples/weather/WeatherModel.java | 4 -
.../org/apache/nlpcraft/common/NCService.scala | 17 +-
.../nlpcraft/common/config/NCConfigurable.scala | 2 +-
.../apache/nlpcraft/common/debug/NCLogHolder.scala | 5 +-
.../apache/nlpcraft/model/NCDialogFlowItem.java | 13 -
.../org/apache/nlpcraft/model/NCIntentMatch.java | 15 -
.../scala/org/apache/nlpcraft/model/NCToken.java | 9 +
.../apache/nlpcraft/model/intent/NCIdlIntent.scala | 9 +-
.../nlpcraft/model/intent/NCIdlIntentOptions.scala | 40 +
.../apache/nlpcraft/model/intent/NCIdlTerm.scala | 2 +-
.../model/intent/compiler/NCIdlCompiler.scala | 55 +-
.../nlpcraft/model/intent/compiler/antlr4/NCIdl.g4 | 8 +-
.../model/intent/compiler/antlr4/NCIdl.interp | 8 +-
.../model/intent/compiler/antlr4/NCIdl.tokens | 4 +-
.../intent/compiler/antlr4/NCIdlBaseListener.java | 18 +-
.../model/intent/compiler/antlr4/NCIdlLexer.interp | 8 +-
.../model/intent/compiler/antlr4/NCIdlLexer.java | 16 +-
.../model/intent/compiler/antlr4/NCIdlLexer.tokens | 4 +-
.../intent/compiler/antlr4/NCIdlListener.java | 22 +-
.../model/intent/compiler/antlr4/NCIdlParser.java | 240 +-
.../model/intent/solver/NCIntentSolver.scala | 1 -
.../model/intent/solver/NCIntentSolverEngine.scala | 170 +-
.../model/intent/solver/NCIntentSolverResult.scala | 6 +-
.../model/tools/test/NCTestClientBuilder.java | 22 +-
.../nlpcraft/probe/mgrs/cmd/NCCommandManager.scala | 35 +-
.../probe/mgrs/conversation/NCConversation.scala | 48 +-
.../mgrs/dialogflow/NCDialogFlowManager.scala | 58 +-
.../probe/mgrs/nlp/NCProbeEnrichmentManager.scala | 12 +-
.../server/ignite/NCIgniteCacheStore.scala | 2 +-
.../nlpcraft/server/probe/NCProbeManager.scala | 4 +-
.../nlpcraft/server/query/NCQueryManager.scala | 2 +-
.../nlpcraft/server/user/NCUserManager.scala | 2 +-
nlpcraft/src/test/resources/log4j2.xml | 2 +-
.../scala/org/apache/nlpcraft/NCTestContext.scala | 7 +-
.../nlpcraft/model/NCTrueIntentIdlSpec.scala | 2 +-
.../intent/idl/compiler/NCIdlCompilerSpec.scala | 71 +-
.../model/intent/idl/options/NCFreeWordsSpec.scala | 75 +
.../model/intent/idl/options/NCOrderedSpec.scala | 75 +
.../model/intent/idl/options/NCStmOnlySpec.scala | 130 +
.../model/intent/idl/options/NCSysTokensSpec.scala | 75 +
.../intent/idl/options/NCUserTokensSpec.scala | 75 +
.../model/properties/NCTokensPropertiesSpec.scala | 68 +-
.../mgrs/nlp/enrichers/NCEnricherBaseSpec.scala | 4 +-
48 files changed, 4909 insertions(+), 417 deletions(-)
diff --cc nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolver.scala
index 4031ca9,e16e8a5..bd6e734
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolver.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolver.scala
@@@ -95,26 -95,11 +95,25 @@@ class NCIntentSolver(intents: List[(NCI
for (res <- results if res != null) {
try {
i += 1
-
+
+ val allConvToks = ctx.getConversation.getTokens.asScala
+ val nonConvToks = res.groups.flatMap(_.tokens).filterNot(allConvToks.contains)
+
+ val intentToks =
+ res.groups.map(_.tokens).map(toks => {
+ toks.filter(allConvToks.contains).foreach(convTok =>
+ NCSentenceManager.fixMeta(convTok, nonConvToks, allConvToks)
+ )
+
+ toks
+ })
+
+ ctx.getConversation.getTokens
+
val intentMatch: NCIntentMatch = new NCMetadataAdapter with NCIntentMatch {
override val getContext: NCContext = ctx
- override val getIntentTokens: JList[JList[NCToken]] = res.groups.map(_.tokens.asJava).asJava
+ override val getIntentTokens: JList[JList[NCToken]] = intentToks.map(_.asJava).asJava
override val getVariant: NCVariant = new NCVariantImpl(res.variant.tokens)
- override val isAmbiguous: Boolean = !res.isExactMatch
override val getIntentId: String = res.intentId
override def getTermTokens(idx: Int): JList[NCToken] = res.groups(idx).tokens.asJava
override def getTermTokens(termId: String): JList[NCToken] = res.groups.find(_.termId === termId).flatMap(grp => Some(grp.tokens)).getOrElse(Nil).asJava