This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-41
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-41 by this push:
new ad52359 WIP.
ad52359 is described below
commit ad5235993c49515dc1bcc5cecd58d58a4e476a2f
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Aug 19 16:39:52 2020 +0300
WIP.
---
.../scala/org/apache/nlpcraft/server/model/NCEnhanceManager.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/model/NCEnhanceManager.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/model/NCEnhanceManager.scala
index a9561a0..7d0019a 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/model/NCEnhanceManager.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/model/NCEnhanceManager.scala
@@ -48,6 +48,7 @@ object NCEnhanceManager extends NCService {
private final val DFLT_LIMIT: Int = 20
private final val MAX_LIMIT: Int = 10000
private final val DFLT_MIN_SCORE: Double = 0
+ private final val BATCH_SIZE = 20
// For warnings.
private final val MIN_CNT_INTENT = 5
@@ -76,7 +77,6 @@ object NCEnhanceManager extends NCService {
private final val GSON = new Gson
private final val TYPE_RESP = new TypeToken[JList[JList[Suggestion]]]()
{}.getType
private final val SEPARATORS = Seq('?', ',', '.', '-', '!')
- private final val BATCH_SIZE = 20
private final val HANDLER: ResponseHandler[Seq[Seq[Suggestion]]] =
(resp: HttpResponse) ⇒ {
@@ -170,6 +170,8 @@ object NCEnhanceManager extends NCService {
mdl.macros.foreach { case (name, str) ⇒ parser.addMacro(name, str)
}
+ // Note that we don't use system tokenizer, because
ContextWordServer doesn't have this tokenizer.
+ // We just split examples words with spaces. Also we divide
SEPARATORS as separated words.
val examples =
mdl.
intentsSamples.