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 737b805 WIP.
737b805 is described below
commit 737b8058657902e184b9315c6c36a47a51ebbd87
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Oct 13 09:48:25 2021 +0300
WIP.
---
.../main/scala/org/apache/nlpcraft/NCNlpcraft.java | 28 ---------------
.../nlpcraft/model/curation+confirmation.txt | 42 ++++++++++++++++++++++
.../nlpcraft/model/{readme.txt => interfaces.txt} | 0
3 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCNlpcraft.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCNlpcraft.java
index 2da6a1e..186cf64 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCNlpcraft.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCNlpcraft.java
@@ -48,32 +48,4 @@ public interface NCNlpcraft {
void clearDialog(String userId);
void clearDialog();
-
- // TODO: for discussion
- /**
- * Confirmation and curation - maximum direct, simple and straight way.
- * a) add to intents property `need_confirm` (boolean, default false)
- * b) add to models property `need_curation` (boolean, default false)
- * c) add to NCResult 3 fields:
- * - variants (sorted from best to worst, first is winner)
List<NCVariant>, mandatory.
- * - `need_confirm` (boolean, optional, omitted processed as false)
- * - `need_curation` (boolean, optional, omitted processed as false)
-
- * 1. Confirmation
- * - add 'need_confirm' = true flag to intents, which require
confirmations.
- * - set NCResult `need_confirm` = true if such intent fired.
- * - add new API method
- * `void confirm(String srvReqId, boolean confirm)`;
- *
- * 2. Curation.
- * - add 'need_curation' = true flag to model, which supports curation.
- * - set `need_curation` = true in NCResult if there isn't intent found.
- * - add new API method
- * - `String curateText(String srvReqId)`; - which returns fixes
request text
- * or
- * - `NCVariant curateVariant(String srvReqId)`; - which returns
created winner variant.
- *
- * Curated request cached most easiest way - by stems without stopwords.
- *
- */
}
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/curation+confirmation.txt
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/curation+confirmation.txt
new file mode 100644
index 0000000..156be4a
--- /dev/null
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/curation+confirmation.txt
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+Confirmation and curation - maximum simple and straight way.
+a) add to intents property `need_confirm` (boolean, default false)
+b) add to models property `need_curation` (boolean, default false)
+c) add to NCResult 3 fields:
+- variants (sorted from best to worst, first is winner) List<List<NCToken>>,
mandatory.
+- `need_confirm` (boolean, optional, omitted processed as false)
+- `need_curation` (boolean, optional, omitted processed as false)
+
+1. Confirmation
+- add 'need_confirm' = true flag to intents, which require confirmations.
+- set NCResult `need_confirm` = true if such intent fired.
+- add new API method
+ `void confirm(String reqId, boolean confirm)`;
+
+2. Curation.
+- add 'need_curation' = true flag to model, which supports curation.
+- set `need_curation` = true in NCResult if there isn't intent found.
+- add new API method
+ - `String curateText(String srvReqId)`; - which returns fixes request text
+ or
+ - `List<NCToken> curateVariant(String srvReqId)`; - which returns created
winner variant.
+
+Curated request cached easiest way - by stems without stopwords.
+
+
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/readme.txt
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/interfaces.txt
similarity index 100%
rename from nlpcraft/src/main/scala/org/apache/nlpcraft/model/readme.txt
rename to nlpcraft/src/main/scala/org/apache/nlpcraft/model/interfaces.txt