You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2023/03/05 20:29:09 UTC

[incubator-nlpcraft] branch master updated (45bb50da -> 2806f421)

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

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


    from 45bb50da Update doc.
     new 26be12c7 Update .gitignore
     new 5e365de0 Merge branch 'master' of https://github.com/apache/incubator-nlpcraft
     new 2806f421 WIP.

The 3 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:
 .../src/main/scala/org/apache/nlpcraft/NCGlobals.scala     |  1 +
 .../src/main/scala/org/apache/nlpcraft/NCPipeline.scala    | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)


[incubator-nlpcraft] 03/03: WIP.

Posted by ar...@apache.org.
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 2806f4213766a9a61fad3b06ce56bf610c4b5e8d
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Mar 5 12:29:01 2023 -0800

    WIP.
---
 .../src/main/scala/org/apache/nlpcraft/NCGlobals.scala     |  1 +
 .../src/main/scala/org/apache/nlpcraft/NCPipeline.scala    | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
index 9c6ecfa0..bc58ee44 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
@@ -49,6 +49,7 @@ extension[T](opt: Option[T])
     def ===(x: T): Boolean = opt.isDefined && opt.get == x
 
 extension[T](v: T)
+    @targetName("questionToOption")
     def `?`: Option[T] = Option(v)
 
 extension(v: Int)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
index 569979b1..e3c20d7b 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
@@ -24,16 +24,16 @@ package org.apache.nlpcraft
   * of the pipeline and produce the list of [[NCVariant variants]] at the end of the pipeline.
   * Schematically the pipeline looks like this:
   * <pre>
-  *                                      +----------+        +-----------+         +--------+
-  *   *=========*     +---------+    +---+-------+  |    +---+-------+   |     +---+-----+  |
-  *   :  Text   : ->  |  Token  | -> | Token     |  | -> | Token      |  | ->  | Entity  |  | ----.
-  *   :  Input  :     |  Parser |    | Enrichers |--+    | Validators |--+     | Parsers |--+      \
-  *   *=========*     +---------+    +-----------+       +------------+        +---------+          \
+  *                                    +----------+        +-----------+         +--------+
+  * *=========*     +---------+    +---+-------+  |    +---+-------+   |     +---+-----+  |
+  * #  Text   # ->  |  Token  | -> | Token     |  | -> | Token      |  | ->  | Entity  |  | ------.
+  * #  Input  #     |  Parser |    | Enrichers |--+    | Validators |--+     | Parsers |--+        \
+  * *=========*     +---------+    +-----------+       +------------+        +---------+            \
   *                                                                                                  }
   *                       +--------+        +--------+        +-----------+        +----------+     /
   * *============*    +---+-----+  |    +---+-----+  |    +---+--------+  |    +---+-------+  |    /
-  * :  Variants  : <- | Variant |  | <- | Entity  |  | <- | Entity     |  | <- | Entity    |  | <-'
-  * :  List      :    | Filters |--+    | Mappers |--+    | Validators |--+    | Enrichers |--+
+  * #  Variants  # <- | Variant |  | <- | Entity  |  | <- | Entity     |  | <- | Entity    |  | <-'
+  * #  List      #    | Filters |--+    | Mappers |--+    | Validators |--+    | Enrichers |--+
   * *============*    +----- ---+       +----- ---+       +------------+       +-----------+
   * </pre>
   *


[incubator-nlpcraft] 02/03: Merge branch 'master' of https://github.com/apache/incubator-nlpcraft

Posted by ar...@apache.org.
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 5e365de03bf8ea750bad520c471f1c08e6e0dc95
Merge: 26be12c7 45bb50da
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Mar 5 12:22:59 2023 -0800

    Merge branch 'master' of https://github.com/apache/incubator-nlpcraft

 LICENSE                                            |   23 -
 README.md                                          |    3 +-
 bin/MAVEN-RELEASE.md                               |  110 ++
 bin/prepare.sh                                     |  170 +++
 build.sbt                                          |   31 +-
 nlpcraft-examples/calculator/README.md             |    5 +-
 .../nlpcraft/examples/time/CalculatorModel.scala   |   32 +-
 nlpcraft-examples/lightswitch-fr/README.md         |    7 +-
 .../src/main/resources/lightswitch_model_fr.yaml   |    6 +-
 .../examples/lightswitch/LightSwitchFrModel.scala  |   12 +-
 .../entity/parser/NCFrSemanticEntityParser.scala   |   12 +-
 .../token/enricher/NCFrLemmaPosTokenEnricher.scala |    6 +-
 .../enricher/NCFrStopWordsTokenEnricher.scala      |    3 +
 .../nlp/token/parser/NCFrTokenParser.scala         |    3 +-
 nlpcraft-examples/lightswitch-ru/README.md         |    7 +-
 .../src/main/resources/lightswitch_model_ru.yaml   |    6 +-
 .../examples/lightswitch/LightSwitchRuModel.scala  |   10 +-
 .../entity/parser/NCRuSemanticEntityParser.scala   |   12 +-
 .../token/enricher/NCRuLemmaPosTokenEnricher.scala |    6 +-
 .../enricher/NCRuStopWordsTokenEnricher.scala      |    3 +
 .../nlp/token/parser/NCRuTokenParser.scala         |    3 +-
 nlpcraft-examples/lightswitch/README.md            |    3 +-
 .../src/main/resources/lightswitch_model.yaml      |    6 +-
 .../examples/lightswitch/LightSwitchModel.scala    |   12 +-
 nlpcraft-examples/pizzeria/README.md               |    8 +-
 .../src/main/resources/pizzeria_model.yaml         |   18 +-
 .../nlpcraft/examples/pizzeria/PizzeriaModel.scala |  107 +-
 .../nlpcraft/examples/pizzeria/PizzeriaOrder.scala |   42 +-
 .../components/PizzeriaModelPipeline.scala         |   47 +-
 .../pizzeria/components/PizzeriaOrderMapper.scala  |   43 +-
 .../components/PizzeriaOrderValidator.scala        |   13 +-
 .../examples/pizzeria/PizzeriaModelSpec.scala      |   11 +-
 nlpcraft-examples/time/README.md                   |    3 +-
 .../time/src/main/resources/time_model.yaml        |    2 +-
 .../apache/nlpcraft/examples/time/TimeModel.scala  |   14 +-
 .../time/utils/cities/CitiesDataProvider.scala     |    6 +-
 .../examples/time/utils/keycdn/GeoManager.scala    |   16 +-
 .../stanford/NCStanfordNLPEntityParser.scala       |   15 +-
 .../stanford/NCStanfordNLPTokenParser.scala        |    7 +-
 .../stanford/NCStanfordNLPEntityParserSpec.scala   |    5 +-
 .../stanford/NCStanfordNLPTokenParserSpec.scala    |    4 +-
 .../stanford => stanford/util}/NCTestConfig.scala  |    4 +-
 .../{stop_words.txt => en_stop_words.txt}          |    2 +-
 .../main/resources/stopwords/first_words.txt.gz    |  Bin 4024880 -> 0 bytes
 .../src/main/resources/stopwords/noun_words.txt.gz |  Bin 862 -> 0 bytes
 .../main/scala/org/apache/nlpcraft/NCEntity.scala  |   14 +-
 .../scala/org/apache/nlpcraft/NCEntityParser.scala |    6 +
 .../main/scala/org/apache/nlpcraft/NCModel.scala   |    1 -
 .../org/apache/nlpcraft/NCPipelineBuilder.scala    |   66 +-
 .../org/apache/nlpcraft/NCPropertyMapAdapter.scala |    2 +-
 .../main/scala/org/apache/nlpcraft/NCToken.scala   |    1 -
 .../internal/conversation/NCConversationData.scala |    4 +-
 .../internal/impl/NCModelPipelineManager.scala     |    4 +-
 .../intent/compiler/NCIDLCodeGenerator.scala       |   10 +-
 .../internal/intent/compiler/NCIDLCompiler.scala   |    8 +-
 .../internal/intent/compiler/antlr4/NCIDL.g4       |   10 +-
 .../intent/compiler/antlr4/NCIDLBaseListener.java  |    3 +-
 .../intent/compiler/antlr4/NCIDLLexer.interp       |    2 +-
 .../intent/compiler/antlr4/NCIDLLexer.java         | 1286 ++++++++++----------
 .../intent/compiler/antlr4/NCIDLListener.java      |    2 +-
 .../intent/compiler/antlr4/NCIDLParser.java        |   63 +-
 .../intent/matcher/NCIntentSolverManager.scala     |    4 +-
 .../apache/nlpcraft/internal/util/NCUtils.scala    |  391 +-----
 ...nricher.scala => NCBracketsTokenEnricher.scala} |   57 +-
 ...icher.scala => NCDictionaryTokenEnricher.scala} |   28 +-
 .../nlp/enrichers/NCEnQuotesTokenEnricher.scala    |   55 -
 .../nlp/enrichers/NCEnStopWordsTokenEnricher.scala |  206 ++--
 .../nlp/enrichers/NCOpenNLPTokenEnricher.scala     |   49 +-
 .../nlp/enrichers/NCQuotesTokenEnricher.scala      |   84 ++
 ...icher.scala => NCSwearWordsTokenEnricher.scala} |   26 +-
 .../{tools => impl}/NCEnStopWordGenerator.scala    |   46 +-
 .../nlpcraft/nlp/parsers/NCNLPEntityParser.scala   |   46 +-
 .../nlp/parsers/NCOpenNLPEntityParser.scala        |   53 +-
 .../nlp/parsers/NCOpenNLPTokenParser.scala         |   18 +-
 .../nlpcraft/nlp/parsers/NCSemanticElement.scala   |   88 +-
 .../nlp/parsers/NCSemanticEntityParser.scala       |  190 +--
 .../nlp/parsers/impl/NCSemanticSourceReader.scala  |    4 +-
 .../parsers/impl/NCSemanticSynonymsProcessor.scala |   71 +-
 .../NCEnStemmer.scala}                             |   27 +-
 .../NCStemmer.scala}                               |   24 +-
 .../src/test/resources/models/alarm_model.json     |    2 +-
 .../test/resources/models/lightswitch_model.yaml   |    6 +-
 .../conversation/NCConversationManagerSpec.scala   |    8 +-
 .../internal/conversation/NCConversationSpec.scala |    4 +-
 .../conversation/NCConversationSpec2.scala         |   85 ++
 .../internal/impl/NCModelCallbacksSpec.scala       |    8 +-
 .../nlpcraft/internal/impl/NCModelClientSpec.scala |    2 +-
 .../impl/scan/NCModelIntentsInvalidArgsSpec.scala  |    2 +-
 .../intent/compiler/functions/NCIDLFunctions.scala |   21 +-
 .../functions/NCIDLFunctionsEntitiesUsed.scala     |    6 +-
 .../compiler/functions/NCIDLFunctionsEntity.scala  |   48 +-
 .../compiler/functions/NCIDLFunctionsMeta.scala    |    1 +
 .../nlpcraft/internal/intent/compiler/test_ok.idl  |    2 +-
 .../nlpcraft/internal/util/NCUtilsSpec.scala       |   59 +
 .../apache/nlpcraft/nlp/NCEntityMapperSpec.scala   |   12 +-
 .../apache/nlpcraft/nlp/NCEntityParserSpec.scala   |    2 +-
 .../apache/nlpcraft/nlp/NCTokenEnricherSpec.scala  |    2 +-
 .../enrichers/NCBracketsTokenEnricherSpec.scala    |   22 +-
 .../enrichers/NCDictionaryTokenEnricherSpec.scala  |    6 +-
 .../nlp/enrichers/NCQuotesTokenEnricherSpec.scala  |   37 +-
 .../nlp/enrichers/NCStopWordsEnricherSpec.scala    |   88 +-
 .../enrichers/NCSwearWordsTokenEnricherSpec.scala  |   11 +-
 .../nlp/parsers/NCOpenNLPTokenParserSpec.scala     |    4 +-
 .../parsers/NCSemanticEntityParserJsonSpec.scala   |   10 +-
 .../parsers/NCSemanticEntityParserLemmaSpec.scala  |    9 +-
 .../nlp/parsers/NCSemanticEntityParserSpec.scala   |   18 +-
 .../parsers/NCSemanticEntityParserYamlSpec.scala   |    8 +-
 .../nlp/parsers/NCSemanticTestElement.scala        |   12 +-
 .../apache/nlpcraft/nlp/util/NCTestEntity.scala    |   17 +-
 .../org/apache/nlpcraft/nlp/util/NCTestUtils.scala |   27 +-
 pom.xml                                            |   77 +-
 project/plugins.sbt                                |    1 +
 112 files changed, 2461 insertions(+), 1963 deletions(-)


[incubator-nlpcraft] 01/03: Update .gitignore

Posted by ar...@apache.org.
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 26be12c729a2c123ae007980d84267dd8f919e32
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Mar 5 12:22:55 2023 -0800

    Update .gitignore
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index cb293c18..645d0e94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@
 .idea
 venv/
 target
+null
 out
 zips
 model.yaml