This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-415
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-415 by this push:
new 3ccf2b1 WIP.
3ccf2b1 is described below
commit 3ccf2b1ea11c3864c1270ec48f1c0b4c1c2c3903
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Aug 23 11:36:40 2021 +0300
WIP.
---
.../org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 4 +++-
.../nlpcraft/model/tools/cmdline/NCCliCommands.scala | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 473be49..1f08d4f 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -1796,6 +1796,7 @@ object NCCli extends NCCliBase {
throw MissingOptionalParameter(cmd, "mdlId")
}
val elmId = getParam(cmd, args, "elmId")
+ val pattern = getParamOrNull(args, "pattern")
httpRest(
cmd,
@@ -1804,7 +1805,8 @@ object NCCli extends NCCliBase {
|{
| "acsTok": ${jsonQuote(acsTok)},
| "mdlId": ${jsonQuote(mdlId)},
- | "elmId": ${jsonQuote(elmId)}
+ | "elmId": ${jsonQuote(elmId)},
+ | "pattern": ${jsonQuote(pattern)}
|}
|""".stripMargin
)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
index 18dc010..2032e3a 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
@@ -622,6 +622,14 @@ private [cmdline] object NCCliCommands {
desc =
s"ID of the model element to get expanded synonyms and
values for. " +
s"In REPL mode, hit ${rv(" Tab ")} to see
auto-suggestion for possible element IDs."
+ ),
+ // TODO:
+ Parameter(
+ id = "pattern",
+ names = Seq("--pattern", "-p"),
+ value = Some("pattern"), // TODO:
+ optional = true,
+ desc = s"512 length element and values synonyms patters."
)
),
examples = Seq(
@@ -631,6 +639,14 @@ private [cmdline] object NCCliCommands {
),
desc =
s"Issues ${y("'model/syns'")} REST call with given
model and element IDs."
+ ),
+ // TODO:
+ Example(
+ usage = Seq(
+ s"""> model-syns -m=my.model.id -e=my:elem -p=test"""
+ ),
+ desc =
+ s"Issues ${y("'model/syns'")} REST call with given
model and element IDs."
)
)
),