This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch scala-2.13
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/scala-2.13 by this push:
new ac4c61f WIP.
ac4c61f is described below
commit ac4c61f1f1ede14ef4e9e5d110af70659e750582
Author: unknown <[email protected]>
AuthorDate: Tue May 18 14:29:47 2021 -0700
WIP.
---
.../main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala | 3 ++-
.../scala/org/apache/nlpcraft/common/nlp/NCNlpSentenceNote.scala | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
index ed031d1..c53fcfb 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/ascii/NCAsciiTable.scala
@@ -25,6 +25,7 @@ import org.apache.nlpcraft.common.ansi.NCAnsi._
import scala.collection.mutable
import scala.jdk.CollectionConverters.CollectionHasAsScala
+import scala.util.Using
/**
* `ASCII`-based table with minimal styling support.
@@ -670,7 +671,7 @@ class NCAsciiTable {
private def renderPrintStream(f: ⇒ PrintStream, file: String): Unit =
try
- managed(f) acquireAndGet { ps ⇒
+ Using.resource(f) { ps ⇒
ps.print(mkString)
}
catch {
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentenceNote.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentenceNote.scala
index 3e60c61..437773f 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentenceNote.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentenceNote.scala
@@ -20,10 +20,11 @@ package org.apache.nlpcraft.common.nlp
import org.apache.nlpcraft.common.U
import org.apache.nlpcraft.common.ascii._
-import scala.collection.JavaConverters._
-import scala.collection.{Seq, Set, mutable}
import scala.language.implicitConversions
import java.io.{Serializable ⇒ JSerializable}
+import scala.collection.mutable
+import scala.compat.java8.FunctionConverters.enrichAsJavaFunction
+import scala.jdk.CollectionConverters.CollectionHasAsScala
/**
* Sentence token note is a typed map of KV pairs.