This is an automated email from the ASF dual-hosted git repository. aradzinski pushed a commit to branch NLPCRAFT-384 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit f6112d579ec6fec153abe880c8e30dd4bd2c05b1 Merge: 5d2ad16 d259d2d Author: Aaron Radzinski <[email protected]> AuthorDate: Sun Aug 29 14:16:19 2021 -0700 Merge branch 'master' into NLPCRAFT-384 README.md | 2 +- .../alarm/src/main/resources/alarm_intents.idl | 4 +- .../src/main/resources/lightswitch_model.yaml | 2 +- .../minecraft/src/main/resources/minecraft.yaml | 34 +- .../apache/nlpcraft/examples/phone/PhoneModel.java | 4 +- .../apache/nlpcraft/examples/sql/SqlModel.scala | 30 +- .../sql/src/main/resources/sql_model.yaml | 18 +- .../apache/nlpcraft/examples/time/TimeModel.java | 6 +- .../nlpcraft/examples/weather/WeatherModel.java | 8 +- .../nlpcraft/common/makro/NCMacroCompiler.scala | 43 +- .../nlpcraft/common/makro/antlr4/NCMacroDsl.g4 | 16 +- .../nlpcraft/common/makro/antlr4/NCMacroDsl.interp | 12 +- .../nlpcraft/common/makro/antlr4/NCMacroDsl.tokens | 18 +- .../makro/antlr4/NCMacroDslBaseListener.java | 24 + .../common/makro/antlr4/NCMacroDslLexer.interp | 15 +- .../common/makro/antlr4/NCMacroDslLexer.java | 71 +- .../common/makro/antlr4/NCMacroDslLexer.tokens | 18 +- .../common/makro/antlr4/NCMacroDslListener.java | 20 + .../common/makro/antlr4/NCMacroDslParser.java | 204 +++- .../scala/org/apache/nlpcraft/model/NCIntent.java | 2 +- .../org/apache/nlpcraft/model/NCIntentSample.java | 2 +- .../org/apache/nlpcraft/model/NCIntentTerm.java | 2 +- .../model/intent/compiler/NCIdlCompiler.scala | 11 +- .../model/intent/compiler/NCIdlCompilerBase.scala | 39 +- .../nlpcraft/model/intent/compiler/antlr4/NCIdl.g4 | 10 +- .../model/intent/compiler/antlr4/NCIdl.interp | 2 +- .../intent/compiler/antlr4/NCIdlBaseListener.java | 2 +- .../model/intent/compiler/antlr4/NCIdlLexer.interp | 2 +- .../model/intent/compiler/antlr4/NCIdlLexer.java | 1107 ++++++++++---------- .../intent/compiler/antlr4/NCIdlListener.java | 2 +- .../model/intent/compiler/antlr4/NCIdlParser.java | 410 ++++---- .../probe/mgrs/deploy/NCDeployManager.scala | 7 +- .../server/nlp/preproc/NCPreProcessManager.scala | 2 +- .../apache/nlpcraft/common/debug/NCLogSpec.scala | 2 +- .../nlpcraft/common/makro/NCMacroParserSpec.scala | 12 +- .../org/apache/nlpcraft/model/NCIdlSpec.scala | 6 +- .../org/apache/nlpcraft/model/NCIdlSpec2.scala | 10 +- .../nlpcraft/model/NCIntentPrioritiesSpec.scala | 4 +- .../apache/nlpcraft/model/NCIntentSampleSpec.scala | 4 +- .../abstract/NCAbstractTokensIntentsSpec.scala | 8 +- .../model/abstract/NCAbstractTokensModel.scala | 8 +- .../model/conversation/NCConversationSpec.scala | 2 +- .../conversation/NCConversationTimeoutSpec.scala | 2 +- .../nlpcraft/model/dialog/NCDialogSpec.scala | 22 +- .../nlpcraft/model/dialog/NCDialogSpec2.scala | 10 +- .../intent/idl/compiler/NCIdlCompilerSpec.scala | 18 +- .../idl/compiler/functions/NCIdlFunctions.scala | 2 + .../compiler/functions/NCIdlFunctionsCompany.scala | 18 +- .../compiler/functions/NCIdlFunctionsRequest.scala | 10 +- .../compiler/functions/NCIdlFunctionsStrings.scala | 2 + .../compiler/functions/NCIdlFunctionsToken.scala | 74 +- .../functions/NCIdlFunctionsTokensUsed.scala | 8 +- .../compiler/functions/NCIdlFunctionsUser.scala | 16 +- .../nlpcraft/model/intent/idl/compiler/test_ok.idl | 4 +- .../nlpcraft/model/intent/idl/idl_test_model.yaml | 6 +- .../model/intent/idl/options/NCFreeWordsSpec.scala | 8 +- .../model/intent/idl/options/NCOrderedSpec.scala | 8 +- .../model/intent/idl/options/NCStmOnlySpec.scala | 16 +- .../model/intent/idl/options/NCSysTokensSpec.scala | 8 +- .../intent/idl/options/NCUserTokensSpec.scala | 8 +- .../nlpcraft/model/meta/NCMetaResultSpec.scala | 2 +- .../apache/nlpcraft/model/meta/NCMetaSpec.scala | 2 +- .../model/properties/NCTokensPropertiesSpec.scala | 4 +- .../properties/NCTokensRestrictionsSpec.scala | 8 +- .../apache/nlpcraft/model/stm/NCStmTestModel.scala | 8 +- .../nlpcraft/model/stm/indexes/NCLimitSpec.scala | 14 +- .../model/stm/indexes/NCRelationSpec.scala | 16 +- .../nlpcraft/model/stm/indexes/NCSortSpec.scala | 24 +- .../model/synonyms/NCSuspSynonymsSpec.scala | 2 +- .../nlpcraft/model/synonyms/NCSynonymsSpec.scala | 10 +- .../model/synonyms/NCSynonymsValuesSpec.scala | 2 +- .../mgrs/deploy/NCModelNestedSamplesSpec.scala | 2 +- .../probe/mgrs/deploy/javatest/NCNestedClass.java | 2 +- .../probe/mgrs/deploy/javatest/NCNestedStatic.java | 2 +- .../mgrs/deploy/scalatest/NCNestedClass.scala | 2 +- .../mgrs/deploy/scalatest/NCNestedStatic.scala | 2 +- .../model/NCEnricherNestedModelSpec.scala | 10 +- .../model/NCEnricherNestedModelSpec2.scala | 6 +- .../model/NCEnricherNestedModelSpec3.scala | 4 +- .../model/NCEnricherNestedModelSpec41.scala | 4 +- .../model/NCEnricherNestedModelSpec5.scala | 4 +- .../nlp/enrichers/sort/NCEnricherSortSpec.scala | 2 +- .../nlpcraft/server/rest/RestTestModel.scala | 6 +- 83 files changed, 1467 insertions(+), 1116 deletions(-) diff --cc nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl index 109f60c,3c3934d..b4fdd7b --- a/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl +++ b/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl @@@ -15,19 -15,15 +15,19 @@@ * limitations under the License. */ +/* + * Read documentation: http://nlpcraft.apache.org/intent-matching.html + */ + // Fragments (mostly for demo purposes here). - fragment=buzz term~{tok_id() == 'x:alarm'} + fragment=buzz term~{# == 'x:alarm'} fragment=when term(nums)~{ // Demonstrating term variables. @type = meta_tok('nlpcraft:num:unittype') - @iseq = meta_tok('nlpcraft:num:isequalcondition') // Excludes conditional statements. + @isEq = meta_tok('nlpcraft:num:isequalcondition') // Excludes conditional statements. - tok_id() == 'nlpcraft:num' && @type == 'datetime' && @isEq == true + # == 'nlpcraft:num' && @type == 'datetime' && @iseq == true }[1,7] // Intents (using fragments).
