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 2023/03/05 20:29:12 UTC

[incubator-nlpcraft] 03/03: WIP.

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git

commit 2806f4213766a9a61fad3b06ce56bf610c4b5e8d
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Mar 5 12:29:01 2023 -0800

    WIP.
---
 .../src/main/scala/org/apache/nlpcraft/NCGlobals.scala     |  1 +
 .../src/main/scala/org/apache/nlpcraft/NCPipeline.scala    | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
index 9c6ecfa0..bc58ee44 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala
@@ -49,6 +49,7 @@ extension[T](opt: Option[T])
     def ===(x: T): Boolean = opt.isDefined && opt.get == x
 
 extension[T](v: T)
+    @targetName("questionToOption")
     def `?`: Option[T] = Option(v)
 
 extension(v: Int)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
index 569979b1..e3c20d7b 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.scala
@@ -24,16 +24,16 @@ package org.apache.nlpcraft
   * of the pipeline and produce the list of [[NCVariant variants]] at the end of the pipeline.
   * Schematically the pipeline looks like this:
   * <pre>
-  *                                      +----------+        +-----------+         +--------+
-  *   *=========*     +---------+    +---+-------+  |    +---+-------+   |     +---+-----+  |
-  *   :  Text   : ->  |  Token  | -> | Token     |  | -> | Token      |  | ->  | Entity  |  | ----.
-  *   :  Input  :     |  Parser |    | Enrichers |--+    | Validators |--+     | Parsers |--+      \
-  *   *=========*     +---------+    +-----------+       +------------+        +---------+          \
+  *                                    +----------+        +-----------+         +--------+
+  * *=========*     +---------+    +---+-------+  |    +---+-------+   |     +---+-----+  |
+  * #  Text   # ->  |  Token  | -> | Token     |  | -> | Token      |  | ->  | Entity  |  | ------.
+  * #  Input  #     |  Parser |    | Enrichers |--+    | Validators |--+     | Parsers |--+        \
+  * *=========*     +---------+    +-----------+       +------------+        +---------+            \
   *                                                                                                  }
   *                       +--------+        +--------+        +-----------+        +----------+     /
   * *============*    +---+-----+  |    +---+-----+  |    +---+--------+  |    +---+-------+  |    /
-  * :  Variants  : <- | Variant |  | <- | Entity  |  | <- | Entity     |  | <- | Entity    |  | <-'
-  * :  List      :    | Filters |--+    | Mappers |--+    | Validators |--+    | Enrichers |--+
+  * #  Variants  # <- | Variant |  | <- | Entity  |  | <- | Entity     |  | <- | Entity    |  | <-'
+  * #  List      #    | Filters |--+    | Mappers |--+    | Validators |--+    | Enrichers |--+
   * *============*    +----- ---+       +----- ---+       +------------+       +-----------+
   * </pre>
   *