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 2022/10/17 20:18:50 UTC
[incubator-nlpcraft] branch NLPCRAFT-518 updated (515df32c -> 6fd7e8f3)
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a change to branch NLPCRAFT-518
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
from 515df32c POM and SBT fixes.
add 7a080d24 Fix for NLPCRAFT-516
new 99c1b2e6 Merge branch 'master' into NLPCRAFT-518
new 6fd7e8f3 Update CalculatorModel.scala
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:
.../org/apache/nlpcraft/examples/time/CalculatorModel.scala | 11 +++++------
.../internal/intent/compiler/NCIDLCodeGenerator.scala | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
[incubator-nlpcraft] 02/02: Update CalculatorModel.scala
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-518
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 6fd7e8f3fcb70c2e9bc269b1d1c95e43fdc27d34
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Mon Oct 17 13:18:44 2022 -0700
Update CalculatorModel.scala
---
.../org/apache/nlpcraft/examples/time/CalculatorModel.scala | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/nlpcraft-examples/calculator/src/main/scala/org/apache/nlpcraft/examples/time/CalculatorModel.scala b/nlpcraft-examples/calculator/src/main/scala/org/apache/nlpcraft/examples/time/CalculatorModel.scala
index 49268abf..2d95c360 100644
--- a/nlpcraft-examples/calculator/src/main/scala/org/apache/nlpcraft/examples/time/CalculatorModel.scala
+++ b/nlpcraft-examples/calculator/src/main/scala/org/apache/nlpcraft/examples/time/CalculatorModel.scala
@@ -29,7 +29,6 @@ import java.util.Properties
*/
object CalculatorModel:
private val OPS: Map[String, (Int, Int) => Int] = Map("+" -> (_ + _), "-" -> (_ - _), "*" -> (_ * _), "/" -> (_ / _))
-
private val PIPELINE: NCPipeline =
val props = new Properties()
props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner")
@@ -58,9 +57,9 @@ class CalculatorModel extends NCModelAdapter(NCModelConfig("nlpcraft.calculator.
@NCIntent(
"intent=calc options={ 'ordered': true }" +
- " term(x)={# == 'stanford:number'} " +
- " term(op)={# == 'nlp:token' && has(list('+', '-', '*', '/'), meta_ent('nlp:token:text')) == true} " +
- " term(y)={# == 'stanford:number'}"
+ " term(x)={# == 'stanford:number'}" +
+ " term(op)={has(list('+', '-', '*', '/'), meta_ent('nlp:token:text')) == true}" +
+ " term(y)={# == 'stanford:number'}"
)
def onMatch(
ctx: NCContext,
@@ -72,8 +71,8 @@ class CalculatorModel extends NCModelAdapter(NCModelConfig("nlpcraft.calculator.
@NCIntent(
"intent=calcMem options={ 'ordered': true }" +
- " term(op)={# == 'nlp:token' && has(list('+', '-', '*', '/'), meta_ent('nlp:token:text')) == true} " +
- " term(y)={# == 'stanford:number'}"
+ " term(op)={has(list('+', '-', '*', '/'), meta_ent('nlp:token:text')) == true}" +
+ " term(y)={# == 'stanford:number'}"
)
def onMatchMem(
ctx: NCContext,
[incubator-nlpcraft] 01/02: Merge branch 'master' into NLPCRAFT-518
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-518
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 99c1b2e62f9ad5b23883930280a52a53ced7aefb
Merge: 515df32c 7a080d24
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Mon Oct 17 13:13:35 2022 -0700
Merge branch 'master' into NLPCRAFT-518
.../apache/nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)