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 2020/08/02 15:27:12 UTC
[incubator-nlpcraft] branch NLPCRAFT-70 updated (a6d22f6 -> 0349d26)
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a change to branch NLPCRAFT-70
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.
from a6d22f6 Merge branch 'master' into NLPCRAFT-70
add c7b02ae SQL example simplified.
add 40a8d09 Fix for release comments.
add dfbf457 Release date fix.
add 313bbc4 Tag fix.
add 5c800be Fixed 'numUnapprovedLicenses' to '== 0 for Apache RAT.
add eee470b Reading streams approach refactored.
add 82cfeb7 Fix for NLPCRAFT-97.
add ed741ed - Added @NCIntentSample annotation. - Test framework extended (model test based on intent examples) - IntentId field added into REST API request results (check, ask sync) - IntentId field added into log table (Note, that DB must be re-initialized)
new 724a0ce Merge branch 'master' into NLPCRAFT-70
new 0349d26 uncompiled places commented.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
LICENSE | 31 ++-
bindist/LICENSE | 93 ++-------
external/readme.txt | 10 +-
nlpcraft/pom.xml | 24 +--
nlpcraft/src/main/resources/sql/create_schema.sql | 1 +
.../org/apache/nlpcraft/common/util/NCUtils.scala | 169 ++++++----------
.../apache/nlpcraft/common/version/NCVersion.scala | 2 +-
.../scala/org/apache/nlpcraft/examples/README.md | 1 -
.../apache/nlpcraft/examples/alarm/AlarmModel.java | 21 +-
.../apache/nlpcraft/examples/alarm/AlarmTest.java | 63 ------
.../org/apache/nlpcraft/examples/alarm/README.md | 9 +-
.../nlpcraft/examples/alarm/alarm_model.json | 5 -
.../apache/nlpcraft/examples/echo/EchoTest.java | 62 ------
.../org/apache/nlpcraft/examples/echo/README.md | 11 +-
.../examples/helloworld/HelloWorldModel.java | 4 +-
.../apache/nlpcraft/examples/helloworld/README.md | 9 +-
.../examples/lightswitch/LightSwitchModel.scala | 15 +-
.../examples/lightswitch/LightSwitchTest.java | 71 -------
.../apache/nlpcraft/examples/lightswitch/README.md | 7 +-
.../examples/lightswitch/lightswitch_model.yaml | 5 -
.../apache/nlpcraft/examples/phone/PhoneModel.java | 19 +-
.../apache/nlpcraft/examples/phone/PhoneTest.java | 66 ------
.../org/apache/nlpcraft/examples/phone/README.md | 9 +-
.../nlpcraft/examples/phone/phone_model.json | 5 -
.../org/apache/nlpcraft/examples/sql/README.md | 6 +-
.../apache/nlpcraft/examples/sql/SqlModel.scala | 4 +-
.../nlpcraft/examples/sql/db/SqlBuilder.scala | 93 ++++++---
.../org/apache/nlpcraft/examples/time/README.md | 9 +-
.../apache/nlpcraft/examples/time/TimeModel.java | 43 ++--
.../apache/nlpcraft/examples/time/TimeTest.java | 72 -------
.../apache/nlpcraft/examples/time/time_model.yaml | 6 -
.../org/apache/nlpcraft/examples/weather/README.md | 11 +-
.../nlpcraft/examples/weather/WeatherModel.java | 26 ++-
.../examples/weather/WeatherResultWrapper.java | 55 -----
.../nlpcraft/examples/weather/WeatherTest.java | 109 ----------
.../nlpcraft/examples/weather/weather_model.json | 4 -
.../scala/org/apache/nlpcraft/model/NCIntent.java | 2 +-
.../org/apache/nlpcraft/model/NCIntentRef.java | 2 +-
.../{NCIntentExample.java => NCIntentSample.java} | 22 +-
.../org/apache/nlpcraft/model/NCIntentTerm.java | 2 +-
.../apache/nlpcraft/model/NCModelFileAdapter.java | 7 -
.../org/apache/nlpcraft/model/NCModelView.java | 24 ---
.../scala/org/apache/nlpcraft/model/NCResult.java | 19 ++
.../apache/nlpcraft/model/impl/NCModelImpl.scala | 3 +-
.../nlpcraft/model/impl/json/NCModelJson.java | 17 --
.../model/intent/impl/NCIntentSolver.scala | 3 +
.../sqlgen/impl/NCSqlModelGeneratorImpl.scala | 1 -
.../model/tools/test/NCTestAutoModelValidator.java | 139 +++++++++++++
.../model/tools/test/NCTestClientBuilder.java | 30 ++-
.../nlpcraft/model/tools/test/NCTestResult.java | 3 +
.../test/impl/NCTestAutoModelValidatorImpl.scala | 224 +++++++++++++++++++++
.../nlpcraft/probe/embedded/NCEmbeddedResult.java | 3 +
.../probe/mgrs/conn/NCConnectionManager.scala | 2 +-
.../nlpcraft/probe/mgrs/model/NCModelManager.scala | 9 +-
.../probe/mgrs/nlp/NCProbeEnrichmentManager.scala | 38 ++--
.../server/geo/tools/NCGeoNamesGenerator.scala | 2 +-
.../geo/tools/unstats/NCUnsdStatsService.scala | 4 +-
.../nlpcraft/server/mdo/NCQueryStateMdo.scala | 1 +
.../nlpcraft/server/probe/NCProbeManager.scala | 6 +-
.../server/proclog/NCProcessLogManager.scala | 12 +-
.../nlpcraft/server/query/NCQueryManager.scala | 17 +-
.../nlpcraft/server/rest/NCBasicRestApi.scala | 3 +-
.../apache/nlpcraft/server/sql/NCSqlManager.scala | 7 +-
nlpcraft/src/test/resources/log4j2.xml | 2 +-
.../nlpcraft/NCTestAutoModelValidatorSpec.scala} | 12 +-
.../nlpcraft/examples/sql/NCSqlExampleTest.scala} | 12 +-
.../nlpcraft/examples/sql/NCSqlModelSpec.scala | 1 -
.../model/conversation/ConversationTest.java} | 28 +--
openapi/nlpcraft_swagger.yml | 6 +
pom.xml | 36 ++--
sql/mysql/schema.sql | 1 +
sql/oracle/schema.sql | 1 +
sql/postgres/schema.sql | 1 +
73 files changed, 861 insertions(+), 991 deletions(-)
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/alarm/AlarmTest.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/echo/EchoTest.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchTest.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/phone/PhoneTest.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeTest.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherResultWrapper.java
delete mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherTest.java
rename nlpcraft/src/main/scala/org/apache/nlpcraft/model/{NCIntentExample.java => NCIntentSample.java} (65%)
create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/test/NCTestAutoModelValidator.java
create mode 100644 nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/test/impl/NCTestAutoModelValidatorImpl.scala
copy nlpcraft/src/{main/scala/org/apache/nlpcraft/model/package.scala => test/scala/org/apache/nlpcraft/NCTestAutoModelValidatorSpec.scala} (71%)
rename nlpcraft/src/{main/scala/org/apache/nlpcraft/examples/sql/SqlTest.scala => test/scala/org/apache/nlpcraft/examples/sql/NCSqlExampleTest.scala} (99%)
rename nlpcraft/src/{main/scala/org/apache/nlpcraft/examples/helloworld/HelloWorldTest.java => test/scala/org/apache/nlpcraft/model/conversation/ConversationTest.java} (72%)
[incubator-nlpcraft] 02/02: uncompiled places commented.
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-70
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 0349d263edef7f6acafa05b13db7b6ccc7c7cbec
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Sun Aug 2 18:27:03 2020 +0300
uncompiled places commented.
---
.../apache/nlpcraft/probe/mgrs/conn/NCConnectionManager.scala | 2 +-
.../org/apache/nlpcraft/probe/mgrs/model/NCModelManager.scala | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/conn/NCConnectionManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/conn/NCConnectionManager.scala
index a83569f..86100d7 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/conn/NCConnectionManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/conn/NCConnectionManager.scala
@@ -265,7 +265,7 @@ object NCConnectionManager extends NCService {
new util.HashMap[String, util.Map[String, util.Map[String, String]]](
ctxSyns.map(p ⇒ p._1 → p._2.map(p ⇒ p._1 → p._2.asJava).asJava).asJava
),
- new util.HashSet[String](mdl.getExamples),
+ new util.HashSet[String](), // TODO: examples for all intents - add here/
mdl.getMetadata
)
})
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/model/NCModelManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/model/NCModelManager.scala
index f98ac56..ad6dd89 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/model/NCModelManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/model/NCModelManager.scala
@@ -635,8 +635,9 @@ object NCModelManager extends NCService with DecorateAsScala {
val ctxElements = mdl.getElements.asScala.filter(_.isContextWordSupport)
if (ctxElements.nonEmpty) {
- val examples =
- mdl.getExamples.asScala.map(s ⇒ NCNlpCoreManager.tokenize(s).map(t ⇒ NCNlpCoreManager.stemWord(t.token)))
+ val examples: Map[String, String] = null // TODO:
+
+ // mdl.getExamples.asScala.map(s ⇒ NCNlpCoreManager.tokenize(s).map(t ⇒ NCNlpCoreManager.stemWord(t.token)))
ctxElements.foreach(e ⇒ {
val elemSyns = syns.filter(_.elementId == e.getId)
@@ -653,8 +654,8 @@ object NCModelManager extends NCService with DecorateAsScala {
s"unsupported: ${bad.mkString(",")}"
)
- if (!elemSyns.exists(s ⇒ examples.exists(_.contains(s.synonym.stems))))
- throw new NCE(s"Examples not found for context words element '${e.getId}'")
+// if (!elemSyns.exists(s ⇒ examples.exists(_.contains(s.synonym.stems))))
+// throw new NCE(s"Examples not found for context words element '${e.getId}'")
})
}
}
[incubator-nlpcraft] 01/02: Merge branch 'master' into NLPCRAFT-70
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-70
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 724a0ce2a5c902b453086bd9e1c8cda3e384f569
Merge: a6d22f6 ed741ed
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Sun Aug 2 18:18:19 2020 +0300
Merge branch 'master' into NLPCRAFT-70
# Conflicts:
# nlpcraft/pom.xml
LICENSE | 31 ++-
bindist/LICENSE | 93 ++-------
external/readme.txt | 10 +-
nlpcraft/pom.xml | 24 +--
nlpcraft/src/main/resources/sql/create_schema.sql | 1 +
.../org/apache/nlpcraft/common/util/NCUtils.scala | 169 ++++++----------
.../apache/nlpcraft/common/version/NCVersion.scala | 2 +-
.../scala/org/apache/nlpcraft/examples/README.md | 1 -
.../apache/nlpcraft/examples/alarm/AlarmModel.java | 21 +-
.../apache/nlpcraft/examples/alarm/AlarmTest.java | 63 ------
.../org/apache/nlpcraft/examples/alarm/README.md | 9 +-
.../nlpcraft/examples/alarm/alarm_model.json | 5 -
.../apache/nlpcraft/examples/echo/EchoTest.java | 62 ------
.../org/apache/nlpcraft/examples/echo/README.md | 11 +-
.../examples/helloworld/HelloWorldModel.java | 4 +-
.../apache/nlpcraft/examples/helloworld/README.md | 9 +-
.../examples/lightswitch/LightSwitchModel.scala | 15 +-
.../examples/lightswitch/LightSwitchTest.java | 71 -------
.../apache/nlpcraft/examples/lightswitch/README.md | 7 +-
.../examples/lightswitch/lightswitch_model.yaml | 5 -
.../apache/nlpcraft/examples/phone/PhoneModel.java | 19 +-
.../apache/nlpcraft/examples/phone/PhoneTest.java | 66 ------
.../org/apache/nlpcraft/examples/phone/README.md | 9 +-
.../nlpcraft/examples/phone/phone_model.json | 5 -
.../org/apache/nlpcraft/examples/sql/README.md | 6 +-
.../apache/nlpcraft/examples/sql/SqlModel.scala | 4 +-
.../nlpcraft/examples/sql/db/SqlBuilder.scala | 93 ++++++---
.../org/apache/nlpcraft/examples/time/README.md | 9 +-
.../apache/nlpcraft/examples/time/TimeModel.java | 43 ++--
.../apache/nlpcraft/examples/time/TimeTest.java | 72 -------
.../apache/nlpcraft/examples/time/time_model.yaml | 6 -
.../org/apache/nlpcraft/examples/weather/README.md | 11 +-
.../nlpcraft/examples/weather/WeatherModel.java | 26 ++-
.../nlpcraft/examples/weather/WeatherTest.java | 109 ----------
.../nlpcraft/examples/weather/weather_model.json | 4 -
.../scala/org/apache/nlpcraft/model/NCIntent.java | 2 +-
.../org/apache/nlpcraft/model/NCIntentRef.java | 2 +-
.../{NCIntentExample.java => NCIntentSample.java} | 22 +-
.../org/apache/nlpcraft/model/NCIntentTerm.java | 2 +-
.../apache/nlpcraft/model/NCModelFileAdapter.java | 7 -
.../org/apache/nlpcraft/model/NCModelView.java | 24 ---
.../scala/org/apache/nlpcraft/model/NCResult.java | 19 ++
.../apache/nlpcraft/model/impl/NCModelImpl.scala | 3 +-
.../nlpcraft/model/impl/json/NCModelJson.java | 17 --
.../model/intent/impl/NCIntentSolver.scala | 3 +
.../sqlgen/impl/NCSqlModelGeneratorImpl.scala | 1 -
.../model/tools/test/NCTestAutoModelValidator.java | 139 +++++++++++++
.../model/tools/test/NCTestClientBuilder.java | 30 ++-
.../nlpcraft/model/tools/test/NCTestResult.java | 3 +
.../test/impl/NCTestAutoModelValidatorImpl.scala | 224 +++++++++++++++++++++
.../nlpcraft/probe/embedded/NCEmbeddedResult.java | 3 +
.../probe/mgrs/nlp/NCProbeEnrichmentManager.scala | 38 ++--
.../server/geo/tools/NCGeoNamesGenerator.scala | 2 +-
.../geo/tools/unstats/NCUnsdStatsService.scala | 4 +-
.../nlpcraft/server/mdo/NCQueryStateMdo.scala | 1 +
.../nlpcraft/server/probe/NCProbeManager.scala | 6 +-
.../server/proclog/NCProcessLogManager.scala | 12 +-
.../nlpcraft/server/query/NCQueryManager.scala | 17 +-
.../nlpcraft/server/rest/NCBasicRestApi.scala | 3 +-
.../apache/nlpcraft/server/sql/NCSqlManager.scala | 7 +-
nlpcraft/src/test/resources/log4j2.xml | 2 +-
.../nlpcraft/NCTestAutoModelValidatorSpec.scala} | 44 +---
.../nlpcraft/examples/sql/NCSqlExampleTest.scala} | 12 +-
.../nlpcraft/examples/sql/NCSqlModelSpec.scala | 1 -
.../model/conversation/ConversationTest.java} | 28 +--
openapi/nlpcraft_swagger.yml | 6 +
pom.xml | 36 ++--
sql/mysql/schema.sql | 1 +
sql/oracle/schema.sql | 1 +
sql/postgres/schema.sql | 1 +
70 files changed, 858 insertions(+), 960 deletions(-)
diff --cc nlpcraft/pom.xml
index 346eb5d,6580082..abe5c1c
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@@ -240,10 -228,18 +228,22 @@@
<groupId>com.jakewharton.fliptables</groupId>
<artifactId>fliptables</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-tools</artifactId>
+ </dependency>
+
+ <!-- Test dependencies. -->
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.scalatest</groupId>
+ <artifactId>scalatest_${scala.base}</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>