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

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


The following commit(s) were added to refs/heads/NLPCRAFT-468 by this push:
     new 614b854  WIP.
614b854 is described below

commit 614b854077a81362da0f651c6ed2174986d172bf
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Oct 12 09:38:47 2021 +0300

    WIP.
---
 nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java     | 7 +++++++
 .../main/scala/org/apache/nlpcraft/model/nlp/NCNlpNerToken.java    | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
index ae1c246..3e1f816 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
@@ -17,7 +17,9 @@
 
 package org.apache.nlpcraft.model;
 
+import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Detected model element.
@@ -275,4 +277,9 @@ public interface NCToken {
 
     // TODO: maybe add it?
     List<Integer> getWordsIndexes();
+
+    // TODO:
+    default Map<String, Object> getMetadata() {
+        return Collections.emptyMap();
+    }
 }
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/nlp/NCNlpNerToken.java 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/nlp/NCNlpNerToken.java
index 4c92afa..2fc3950 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/nlp/NCNlpNerToken.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/nlp/NCNlpNerToken.java
@@ -24,6 +24,7 @@ import 
org.apache.nlpcraft.model.impl.ner.NCSynonymsNerElement;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 // NCNlpNerTokensParser parsing result.
 public interface NCNlpNerToken {
@@ -84,4 +85,9 @@ public interface NCNlpNerToken {
     default String getValue() {
         return null;
     }
+
+    // TODO:
+    default Map<String, Object> getMetadata() {
+        return Collections.emptyMap();
+    }
 }

Reply via email to