This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-520
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-520 by this push:
new d3d78fa4 WIP
d3d78fa4 is described below
commit d3d78fa4b23ee62a66046f8014781e9088c4d8ad
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Jan 10 13:11:46 2023 -0800
WIP
---
.../apache/nlpcraft/nlp/parsers/NCSemanticElement.scala | 4 ++--
.../nlpcraft/nlp/parsers/NCSemanticEntityParser.scala | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticElement.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticElement.scala
index 24372675..e9e9dd7c 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticElement.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticElement.scala
@@ -39,9 +39,9 @@ import org.apache.nlpcraft.*
* by the same stem **argu**.
* Note that you can control stemmatization aggression level by choosing
preferable algorithm,
* look at the following article
[[https://www.baeldung.com/cs/porter-vs-lancaster-stemming-algorithms
Differences Between Porter and Lancaster Stemming Algorithms]].
- * Also note please that stemmatization approach can be less or more usefull
for different languages.
+ * Also note please that stemmatization approach can be less or more useful
for different languages.
*
- * Lemmetization.
+ * Lemmatization.
* If an element defined via synonym **go**, all following user input texts
are matched:
* *go*, *gone*, *goes*, *went*. So, it is enough to define just synonym
initial word's forms.
*
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParser.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParser.scala
index ad334245..ea40ca8b 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParser.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParser.scala
@@ -181,15 +181,15 @@ class NCSemanticEntityParser private (
) extends NCEntityParser with LazyLogging:
require(stemmer != null, "Stemmer cannot be null.")
require(parser != null, "Token parser cannot be null.")
- require(macros != null, "Macroses cannot be null.")
+ require(macros != null, "Macros cannot be null.")
require(elements != null && elements.nonEmpty || mdlResOpt.isDefined,
"Elements cannot be null or empty or model resource cannot be empty.")
/**
* Creates [[NCSemanticEntityParser]] instance.
*
- * @param stemmer [[NCStemmer]] implementation for synonyms language.
- * @param parser [[NCTokenParser]] implementation.
- * @param macros Macros map. Empty by default.
+ * @param stemmer [[NCStemmer]] implementation for synonyms language.
+ * @param parser [[NCTokenParser]] implementation.
+ * @param macros Macros map. Empty by default.
* @param elements [[NCSemanticElement]] list.
*/
def this(stemmer: NCStemmer, parser: NCTokenParser, macros: Map[String,
String], elements: List[NCSemanticElement]) =
@@ -199,8 +199,8 @@ class NCSemanticEntityParser private (
*
* Creates [[NCSemanticEntityParser]] instance.
*
- * @param stemmer [[NCStemmer]] implementation for synonyms language.
- * @param parser [[NCTokenParser]] implementation.
+ * @param stemmer [[NCStemmer]] implementation for synonyms language.
+ * @param parser [[NCTokenParser]] implementation.
* @param elements [[NCSemanticElement]] list.
*/
def this(stemmer: NCStemmer, parser: NCTokenParser, elements:
List[NCSemanticElement]) =
@@ -211,8 +211,8 @@ class NCSemanticEntityParser private (
* Creates [[NCSemanticEntityParser]] instance.
*
* @param stemmer [[NCStemmer]] implementation for synonyms language.
- * @param parser [[NCTokenParser]] implementation.
- * @param mdlRes Relative path, absolute path, classpath resource or URL
to YAML or JSON semantic model definition.
+ * @param parser [[NCTokenParser]] implementation.
+ * @param mdlRes Relative path, absolute path, classpath resource or URL
to YAML or JSON semantic model definition.
*/
def this(stemmer: NCStemmer, parser: NCTokenParser, mdlRes: String) =
this(stemmer, parser, Map.empty, List.empty, mdlRes.?)