You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/08/05 08:51:44 UTC
[incubator-nlpcraft] branch master updated: Lifecycle error fixed.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 31e905e Lifecycle error fixed.
31e905e is described below
commit 31e905ec5471f4a13624751da4f34fc1299ee8fb
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Wed Aug 5 11:51:28 2020 +0300
Lifecycle error fixed.
---
.../org/apache/nlpcraft/common/nlp/core/NCNlpCoreManager.scala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/core/NCNlpCoreManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/core/NCNlpCoreManager.scala
index 1037b72..5420a8f 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/core/NCNlpCoreManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/core/NCNlpCoreManager.scala
@@ -61,7 +61,12 @@ object NCNlpCoreManager extends NCService {
super.start()
}
- override def stop(parent: Span): Unit = startScopedSpan("stop", parent)(_ ⇒ super.stop())
+ override def stop(parent: Span): Unit = {
+ if (tokenizer != null)
+ tokenizer.stop(parent)
+
+ startScopedSpan("stop", parent)(_ ⇒ super.stop())
+ }
/**
* Stems given word or a sequence of words which will be tokenized before.