nlpcraft-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aradzin...@apache.org
Subject [incubator-nlpcraft] branch NLPCRAFT-371 updated: WIP on NLPCRAFT-371
Date Sat, 24 Jul 2021 02:19:37 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/NLPCRAFT-371 by this push:
     new 57f2469  WIP on NLPCRAFT-371
57f2469 is described below

commit 57f2469050fbfa34590a2108a3648d0cb78d1798
Author: Aaron Radzinski <aradzinski@datalingvo.com>
AuthorDate: Fri Jul 23 19:19:27 2021 -0700

    WIP on NLPCRAFT-371
---
 .../org/apache/nlpcraft/model/NCModelView.java     |   3 +-
 .../model/tools/cmdline/NCCliCommands.scala        |  19 +--
 .../model/tools/cmdline/NCCliRestSpec.scala        |  10 ++
 .../nlpcraft/probe/mgrs/cmd/NCCommandManager.scala |   7 +-
 .../probe/mgrs/deploy/NCDeployManager.scala        |   9 +-
 .../mgrs/nlp/enrichers/model/NCModelEnricher.scala |  18 +--
 .../opencensus/NCOpenCensusServerStats.scala       |   2 +-
 .../nlpcraft/server/probe/NCProbeManager.scala     |  34 +++---
 .../nlpcraft/server/rest/NCBasicRestApi.scala      | 135 +++++++++++----------
 .../server/sugsyn/NCSuggestSynonymManager.scala    |  36 +++---
 .../nlpcraft/server/rest/NCRestModelSpec.scala     |  12 +-
 openapi/nlpcraft_swagger.yml                       |  24 ++--
 12 files changed, 157 insertions(+), 152 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelView.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelView.java
index c65737f..edd9561 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelView.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelView.java
@@ -159,8 +159,7 @@ public interface NCModelView extends NCMetadata {
     int MODEL_VERSION_MAXLEN = 16;
 
     /**
-     * TODO:
-     * Max model element length for {@link NCElement#getId()} method.
+     * Max length for {@link NCElement#getId()} method.
      */
     int MODEL_ELEMENT_ID_MAXLEN = 64;
 
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 0f86e13..675fa49 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
@@ -246,7 +246,7 @@ private [cmdline] object NCCliCommands {
             examples = Seq(
                 Example(
                     usage = Seq(
-                        s"$PROMPT $SCRIPT_NAME call -p=signin",
+                        s"> call -p=signin",
                         "  --email=admin@admin.com",
                         "  --passwd=admin"
                     ),
@@ -257,7 +257,7 @@ private [cmdline] object NCCliCommands {
                 ),
                 Example(
                     usage = Seq(
-                        s"$$ nlpcraft.sh call --path=ask/sync",
+                        s"> call --path=ask/sync",
                         "  --acsTok=qwerty123456",
                         "  --txt=\"User request\"",
                         "  --mdlId=my.model.id",
@@ -265,20 +265,7 @@ private [cmdline] object NCCliCommands {
                         "  --enableLog=false"
                     ),
                     desc =
-                        s"${bo("Unix/Linux:")} issues ${y("'ask/sync'")} REST call with given JSON payload provided as a set of parameters."
-                ),
-                Example(
-                    usage = Seq(
-                        s"> nlpcraft.cmd call --path=ask/sync",
-                        "  --acsTok=qwerty123456",
-                        "  --txt=\"User request\"",
-                        "  --mdlId=my.model.id",
-                        "  --data='{\\\"data1\\\": true, \\\"data2\\\": 123, \\\"data3\\\": \\\"some text\\\"}'",
-                        "  --enableLog=false"
-                    ),
-                    desc =
-                        s"${bo("Windows:")} issues ${y("'ask/sync'")} REST call with given JSON payload provided " +
-                        s"as a set of parameters. Note the necessary double quote escaping."
+                        s"Issues ${y("'ask/sync'")} REST call with given JSON payload provided as a set of parameters."
                 )
             )
         ),
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliRestSpec.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliRestSpec.scala
index 4c23223..e524e2c 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliRestSpec.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliRestSpec.scala
@@ -78,6 +78,16 @@ private [cmdline] object NCCliRestSpec {
             )
         ),
         RestSpec(
+            "model/syns",
+            "Gets model element synonyms",
+            "Tools",
+            params = Seq(
+                RestSpecParameter(name = "acsTok", kind = STRING),
+                RestSpecParameter(name = "mdlId", kind = STRING),
+                RestSpecParameter(name = "elmId", kind = STRING)
+            )
+        ),
+        RestSpec(
             "check",
             "Gets status and result of submitted requests",
             "Asking",
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
index 2c6acca..ef676af 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/cmd/NCCommandManager.scala
@@ -161,16 +161,17 @@ object NCCommandManager extends NCService {
                                 ),
                             span
                         )
+
                     case "S2P_MODEL_ELEMENT_INFO" =>
                         send0(
                             mkMsg = () => {
                                 val mdlId = msg.data[String]("mdlId")
-                                val elemId = msg.data[String]("elemId")
+                                val elmId = msg.data[String]("elmId")
 
                                 val elm = NCModelManager.
                                     getModel(mdlId).
-                                    model.getElements.asScala.find(_.getId == elemId).
-                                    getOrElse(throw new NCE(s"Element not found in model: $elemId"))
+                                    model.getElements.asScala.find(_.getId == elmId).
+                                    getOrElse(throw new NCE(s"Element not found in model: $elmId"))
 
                                 val vals: util.Map[String, JList[String]] =
                                     if (elm.getValues != null)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index 9ed5af3..028608a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -923,19 +923,18 @@ object NCDeployManager extends NCService {
         checkCollection("metadata", mdl.getMetadata)
         checkCollection("restrictedCombinations", mdl.getRestrictedCombinations)
 
-        // TODO:
-        mdl.getElements.asScala.foreach(e => checkMandatoryString(e.getId, s"elementId=${e.getId}", MODEL_ELEMENT_ID_MAXLEN))
+        mdl.getElements.asScala.foreach(e => checkMandatoryString(e.getId,"element.id", MODEL_ELEMENT_ID_MAXLEN))
 
         for ((elm, restrs: util.Set[String]) <- mdl.getRestrictedCombinations.asScala) {
             if (elm != "nlpcraft:limit" && elm != "nlpcraft:sort" && elm != "nlpcraft:relation")
-                throw new NCE(s"Unsupported restricting element ID [" +
+                throw new NCE(s"Unsupported restricting element [" +
                     s"mdlId=$mdlId, " +
-                    s"elemId=$elm" +
+                    s"elmId=$elm" +
                 s"]. Only 'nlpcraft:limit', 'nlpcraft:sort', and 'nlpcraft:relation' are allowed.")
             if (restrs.contains(elm))
                 throw new NCE(s"Element cannot be restricted to itself [" +
                     s"mdlId=$mdlId, " +
-                    s"elemId=$elm" +
+                    s"elmId=$elm" +
                 s"]")
         }
 
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCModelEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCModelEnricher.scala
index a2deee8..1f81711 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCModelEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCModelEnricher.scala
@@ -250,14 +250,14 @@ object NCModelEnricher extends NCProbeEnricher {
 
                 if (res != null)
                     res.asScala.foreach(e => {
-                        val elemId = e.getElementId
+                        val elmId = e.getElementId
                         val words = e.getWords
 
-                        if (elemId == null)
+                        if (elmId == null)
                             throw new NCE(s"Custom model parser cannot return 'null' element ID.")
 
                         if (words == null || words.isEmpty)
-                            throw new NCE(s"Custom model parser cannot return empty custom tokens [elementId=$elemId]")
+                            throw new NCE(s"Custom model parser cannot return empty custom tokens for element: $elmId")
 
                         val matchedToks = words.asScala.map(w =>
                             ns.find(t =>
@@ -266,10 +266,10 @@ object NCModelEnricher extends NCProbeEnricher {
                         )
 
                         // Checks element's tokens.
-                        if (!alreadyMarked(ns, elemId, matchedToks, matchedToks.map(_.index).sorted))
+                        if (!alreadyMarked(ns, elmId, matchedToks, matchedToks.map(_.index).sorted))
                             mark(
                                 ns,
-                                elem = mdl.elements.getOrElse(elemId, throw new NCE(s"Custom model parser returned unknown element ID: $elemId")),
+                                elem = mdl.elements.getOrElse(elmId, throw new NCE(s"Custom model parser returned unknown element: $elmId")),
                                 toks = matchedToks,
                                 direct = true,
                                 metaOpt = Some(e.getMetadata.asScala.toMap)
@@ -577,16 +577,16 @@ object NCModelEnricher extends NCProbeEnricher {
     // TODO: simplify, add tests, check model properties (sparse etc) for optimization.
     /**
       *
-      * @param elemId
+      * @param elmId
       * @param toks
       * @param sliceToksIdxsSorted
       */
-    private def alreadyMarked(ns: Sentence, elemId: String, toks: Seq[NlpToken], sliceToksIdxsSorted: Seq[Int]): Boolean = {
+    private def alreadyMarked(ns: Sentence, elmId: String, toks: Seq[NlpToken], sliceToksIdxsSorted: Seq[Int]): Boolean = {
         lazy val toksIdxsSorted = toks.map(_.index).sorted
 
-        sliceToksIdxsSorted.map(ns).forall(_.exists(n => n.noteType == elemId && n.sparsity == 0)) ||
+        sliceToksIdxsSorted.map(ns).forall(_.exists(n => n.noteType == elmId && n.sparsity == 0)) ||
         toks.exists(_.exists(n =>
-            n.noteType == elemId &&
+            n.noteType == elmId &&
             (
                 (n.sparsity == 0 &&
                     (sliceToksIdxsSorted.containsSlice(n.tokenIndexes) || n.tokenIndexes.containsSlice(toksIdxsSorted))
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala
index dde284a..e826dda 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala
@@ -28,7 +28,7 @@ trait NCOpenCensusServerStats extends NCOpenCensusStats {
     val M_HEALTH_MS: MeasureLong = MeasureLong.create("health_latency", "The latency of '/health' REST call", "ms")
     val M_ASK_LATENCY_MS: MeasureLong = MeasureLong.create("ask_latency", "The latency of '/ask' REST call", "ms")
     val M_CHECK_LATENCY_MS: MeasureLong = MeasureLong.create("check_latency", "The latency of '/check' REST call", "ms")
-    val M_MODEL_SUGSYN_LATENCY_MS: MeasureLong = MeasureLong.create("model_inspect_latency", "The latency of '/model/inspect' REST call", "ms")
+    val M_MODEL_SUGSYN_LATENCY_MS: MeasureLong = MeasureLong.create("model_inspect_latency", "The latency of '/model/sugsyn' REST call", "ms")
     val M_MODEL_SYNS_LATENCY_MS: MeasureLong = MeasureLong.create("model_synonyms_latency", "The latency of '/model/syns' REST call", "ms")
     val M_CANCEL_LATENCY_MS: MeasureLong = MeasureLong.create("cancel_latency", "The latency of '/cancel' REST call", "ms")
     val M_SIGNIN_LATENCY_MS: MeasureLong = MeasureLong.create("signin_latency", "The latency of '/signin' REST call", "ms")
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
index a6c4ce9..12db28b 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/probe/NCProbeManager.scala
@@ -158,7 +158,7 @@ object NCProbeManager extends NCService {
     @volatile private var pending: mutable.Map[ProbeKey, ProbeHolder] = _
 
     @volatile private var modelsInfo: ConcurrentHashMap[String, Promise[JavaMeta]] = _
-    @volatile private var modelElemsInfo: ConcurrentHashMap[String, Promise[JavaMeta]] = _
+    @volatile private var modelElmsInfo: ConcurrentHashMap[String, Promise[JavaMeta]] = _
 
     /**
      *
@@ -181,7 +181,7 @@ object NCProbeManager extends NCService {
         )
 
         modelsInfo = new ConcurrentHashMap[String, Promise[JavaMeta]]()
-        modelElemsInfo = new ConcurrentHashMap[String, Promise[JavaMeta]]()
+        modelElmsInfo = new ConcurrentHashMap[String, Promise[JavaMeta]]()
 
         dnSrv = startServer("Downlink", dnHost, dnPort, downLinkHandler)
         upSrv = startServer("Uplink", upHost, upPort, upLinkHandler)
@@ -219,7 +219,7 @@ object NCProbeManager extends NCService {
         U.stopThread(upSrv)
 
         modelsInfo = null
-        modelElemsInfo = null
+        modelElmsInfo = null
      
         ackStopped()
     }
@@ -626,20 +626,20 @@ object NCProbeManager extends NCService {
                                 mdlName,
                                 mdlVer,
                                 enabledBuiltInToks,
-                                elemIds
+                                elmIds
                             ) =>
                                 require(mdlId != null)
                                 require(mdlName != null)
                                 require(mdlVer != null)
                                 require(enabledBuiltInToks != null)
-                                require(elemIds != null)
+                                require(elmIds != null)
 
                                 NCProbeModelMdo(
                                     id = mdlId,
                                     name = mdlName,
                                     version = mdlVer,
                                     enabledBuiltInTokens = enabledBuiltInToks.asScala.toSet,
-                                    elementIds = elemIds.asScala.toSet
+                                    elementIds = elmIds.asScala.toSet
                                 )
                         }.toSet
 
@@ -725,8 +725,9 @@ object NCProbeManager extends NCService {
                         }
                     else
                         logger.warn(s"Message ignored: $probeMsg")
+
                 case "P2S_MODEL_ELEMENT_INFO" =>
-                    val p = modelElemsInfo.remove(probeMsg.data[String]("reqGuid"))
+                    val p = modelElmsInfo.remove(probeMsg.data[String]("reqGuid"))
 
                     if (p != null)
                         probeMsg.dataOpt[String]("resp") match {
@@ -785,6 +786,7 @@ object NCProbeManager extends NCService {
                                 NCErrorCodes.UNEXPECTED_ERROR
                             )
                     }
+
                 case _ =>
                     logger.error(s"Received unrecognized probe message (ignoring): $probeMsg")
             }
@@ -992,19 +994,19 @@ object NCProbeManager extends NCService {
       *
       * @param compId Company ID for authentication purpose.
       * @param mdlId Model ID.
-      * @param elemId Element ID.
+      * @param elmId Element ID.
       * @param parent Optional parent span.
       * @return
       */
-    def existsForModelElement(compId: Long, mdlId: String, elemId: String, parent: Span = null): Boolean =
+    def existsForModelElement(compId: Long, mdlId: String, elmId: String, parent: Span = null): Boolean =
         startScopedSpan(
-            "existsForModelElement", parent, "compId" -> compId, "mdlId" -> mdlId, "elemId" -> elemId
+            "existsForModelElement", parent, "compId" -> compId, "mdlId" -> mdlId, "elmId" -> elmId
         ) { _ =>
             val authTok = getCompany(compId).authToken
 
             probes.synchronized {
                 probes.filter(_._1.probeToken == authTok).values.
-                    exists(_.probe.models.exists(p => p.id == mdlId && p.elementIds.contains(elemId)))
+                    exists(_.probe.models.exists(p => p.id == mdlId && p.elementIds.contains(elmId)))
             }
         }
 
@@ -1099,16 +1101,16 @@ object NCProbeManager extends NCService {
     /**
       *
       * @param mdlId
-      * @param elemId
+      * @param elmId
       * @param parent
       * @return
       */
-    def getElementInfo(mdlId: String, elemId: String, parent: Span = null): Future[JavaMeta] =
-        startScopedSpan("getModelInfo", parent, "mdlId" -> mdlId, "elemId" -> elemId) { _ =>
+    def getElementInfo(mdlId: String, elmId: String, parent: Span = null): Future[JavaMeta] =
+        startScopedSpan("getModelInfo", parent, "mdlId" -> mdlId, "elmId" -> elmId) { _ =>
             processModelDataRequest(
                 mdlId,
-                NCProbeMessage("S2P_MODEL_ELEMENT_INFO", "mdlId" -> mdlId, "elemId" -> elemId),
-                modelElemsInfo,
+                NCProbeMessage("S2P_MODEL_ELEMENT_INFO", "mdlId" -> mdlId, "elmId" -> elmId),
+                modelElmsInfo,
                 parent
             )
         }
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
index 91d5d8e..cdbde7d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
@@ -88,7 +88,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
     case class InvalidExternalUserId(usrExtId: String) extends InvalidArguments(s"External user ID is invalid or unknown: $usrExtId")
     case class InvalidUserId(id: Long) extends InvalidArguments(s"User ID is invalid or unknown: $id")
     case class InvalidModelId(id: String) extends InvalidArguments(s"Unknown model ID: $id")
-    case class InvalidModelOrElementId(mdlId: String, elemId: String) extends InvalidArguments(s"Unknown model ID: $mdlId or element ID: $elemId")
+    case class InvalidModelOrElementId(mdlId: String, elmId: String) extends InvalidArguments(s"Unknown model element ID: $elmId")
 
     case class AskReqHolder(
         usrId: Long,
@@ -107,7 +107,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
     private final val STD_FIELD_LENGTHS = Map[String, Int](
         "srvReqId" -> 32,
         "mdlId" -> NCModelView.MODEL_ID_MAXLEN,
-        "elemId" -> NCModelView.MODEL_ELEMENT_ID_MAXLEN,
+        "elmId" -> NCModelView.MODEL_ELEMENT_ID_MAXLEN,
         "country" -> 32,
         "postalCode" -> 32,
 
@@ -471,7 +471,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def signin$(): Route = {
+    protected def $signin(): Route = {
         case class Req$Signin$(
             email: String,
             passwd: String
@@ -506,7 +506,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def health$(): Route = {
+    protected def $health(): Route = {
         case class Res$Health$(status: String)
 
         implicit val resFmt: RootJsonFormat[Res$Health$] = jsonFormat1(Res$Health$)
@@ -520,7 +520,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def signout$(): Route = {
+    protected def $signout(): Route = {
         case class Req$Signout$(
             acsTok: String
         )
@@ -634,7 +634,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def ask$(): Route =
+    protected def $ask(): Route =
         ask0(
             (h: AskReqHolder) => {
                 val newSrvReqId = NCQueryManager.asyncAsk(
@@ -665,7 +665,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def ask$Sync(): Route =
+    protected def $ask$Sync(): Route =
         ask0(
             (h: AskReqHolder) => {
                 val fut = NCQueryManager.futureAsk(
@@ -697,7 +697,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def cancel$(): Route = {
+    protected def $cancel(): Route = {
         case class Req$Cancel$(
             acsTok: String,
             usrId: Option[Long],
@@ -736,7 +736,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def check$(): Route = {
+    protected def $check(): Route = {
         case class Req$Check$(
             acsTok: String,
             usrId: Option[Long],
@@ -787,7 +787,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def sugsyn$(): Route = {
+    protected def $model$sugsyn(): Route = {
         case class Req$Model$Sugsyn(
             acsTok: String,
             mdlId: String,
@@ -826,29 +826,32 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def elementSynonyms$(): Route = {
-        case class Req$Model$Syn(
+    protected def $model$syns(): Route = {
+        case class Req$Model$Syns(
             acsTok: String,
             mdlId: String,
-            elemId: String
+            elmId: String
         )
 
-        implicit val reqFmt: RootJsonFormat[Req$Model$Syn] = jsonFormat3(Req$Model$Syn)
+        implicit val reqFmt: RootJsonFormat[Req$Model$Syns] = jsonFormat3(Req$Model$Syns)
 
-        entity(as[Req$Model$Syn]) { req =>
+        entity(as[Req$Model$Syns]) { req =>
             startScopedSpan(
                 "model$syns",
                 "acsTok" -> req.acsTok,
                 "mdlId" -> req.mdlId,
-                "elemId" -> req.elemId) { span =>
-                checkLength("acsTok" -> req.acsTok, "mdlId" -> req.mdlId, "elemId" -> req.elemId)
+                "elmId" -> req.elmId) { span =>
+                checkLength("acsTok" -> req.acsTok, "mdlId" -> req.mdlId, "elmId" -> req.elmId)
 
                 val admUsr = authenticateAsAdmin(req.acsTok)
+                val compId = admUsr.companyId
 
-                if (!NCProbeManager.existsForModelElement(admUsr.companyId, req.mdlId, req.elemId))
-                    throw InvalidModelOrElementId(req.mdlId, req.elemId)
+                if (!NCProbeManager.existsForModel(compId, req.mdlId))
+                    throw InvalidModelId(req.mdlId)
+                if (!NCProbeManager.existsForModelElement(compId, req.mdlId, req.elmId))
+                    throw InvalidModelOrElementId(req.mdlId, req.elmId)
 
-                val fut = NCProbeManager.getElementInfo(req.mdlId, req.elemId, span)
+                val fut = NCProbeManager.getElementInfo(req.mdlId, req.elmId, span)
 
                 successWithJs(
                     fut.collect {
@@ -873,7 +876,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def clear$Conversation(): Route = {
+    protected def $clear$Conversation(): Route = {
         case class Req$Clear$Conversation(
             acsTok: String,
             mdlId: String,
@@ -918,7 +921,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def clear$Dialog(): Route = {
+    protected def $clear$Dialog(): Route = {
         case class Req$Clear$Dialog(
             acsTok: String,
             mdlId: String,
@@ -963,7 +966,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def company$Add(): Route = {
+    protected def $company$Add(): Route = {
         case class Req$Company$Add(
             acsTok: String,
             // New company.
@@ -1043,7 +1046,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def company$Get(): Route = {
+    protected def $company$Get(): Route = {
         case class Req$Company$Get(
             acsTok: String
         )
@@ -1093,7 +1096,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def company$Update(): Route = {
+    protected def $company$Update(): Route = {
         case class Req$Company$Update(
             // Caller.
             acsTok: String,
@@ -1154,7 +1157,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def feedback$Add(): Route = {
+    protected def $feedback$Add(): Route = {
         case class Req$Feedback$Add(
             acsTok: String,
             usrId : Option[Long],
@@ -1207,7 +1210,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def feedback$Delete(): Route = {
+    protected def $feedback$Delete(): Route = {
         case class Req$Feedback$Delete(
             acsTok: String,
             // Feedback IDs to delete (optional).
@@ -1264,7 +1267,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def feedback$All(): Route = {
+    protected def $feedback$All(): Route = {
         case class Req$Feedback$All(
             acsTok: String,
             usrId: Option[Long],
@@ -1334,7 +1337,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def company$Token$Reset(): Route = {
+    protected def $company$Token$Reset(): Route = {
         case class Req$Company$Token$Reset(
             // Caller.
             acsTok: String
@@ -1366,7 +1369,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def company$Delete(): Route = {
+    protected def $company$Delete(): Route = {
         case class Req$Company$Delete(
             // Caller.
             acsTok: String
@@ -1397,7 +1400,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Add(): Route = {
+    protected def $user$Add(): Route = {
         case class Req$User$Add(
             // Caller.
             acsTok: String,
@@ -1459,7 +1462,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Update(): Route = {
+    protected def $user$Update(): Route = {
         case class Req$User$Update(
             // Caller.
             acsTok: String,
@@ -1510,7 +1513,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Delete(): Route = {
+    protected def $user$Delete(): Route = {
         case class Req$User$Delete(
             acsTok: String,
             id: Option[Long],
@@ -1575,7 +1578,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Admin(): Route = {
+    protected def $user$Admin(): Route = {
         case class Req$User$Admin(
             acsTok: String,
             id: Option[Long],
@@ -1618,7 +1621,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Password$Reset(): Route = {
+    protected def $user$Passwd$Reset(): Route = {
         case class Req$User$Password$Reset(
             // Caller.
             acsTok: String,
@@ -1653,7 +1656,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$All(): Route = {
+    protected def $user$All(): Route = {
         case class Req$User$All(
             // Caller.
             acsTok: String
@@ -1708,7 +1711,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def user$Get(): Route = {
+    protected def $user$Get(): Route = {
         case class Req$User$Get(
             // Caller.
             acsTok: String,
@@ -1763,7 +1766,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
       *
       * @return
       */
-    protected def probe$All(): Route = {
+    protected def $probe$All(): Route = {
         case class Req$Probe$All(
             acsTok: String
         )
@@ -1997,39 +2000,39 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
                 corsHandler (
                     get {
                         withRequestTimeoutResponse(_ => timeoutResp) {
-                            path(API / "health") { health$() } // Also duplicated for POST.
+                            path(API / "health") { $health() } // Also duplicated for POST.
                         }
                     } ~
                         post {
                             encodeResponseWith(Coders.NoCoding, Coders.Gzip) {
                                 withRequestTimeoutResponse(_ => timeoutResp) {
-                                    path(API / "health") { health$() } // Duplicate for POST.
-                                    path(API / "signin") { withMetric(M_SIGNIN_LATENCY_MS, signin$) } ~
-                                    path(API / "signout") { withMetric(M_SIGNOUT_LATENCY_MS, signout$) } ~
-                                    path(API / "cancel") { withMetric(M_CANCEL_LATENCY_MS, cancel$) } ~
-                                    path(API / "check") { withMetric(M_CHECK_LATENCY_MS, check$) } ~
-                                    path(API / "clear"/ "conversation") { withMetric(M_CLEAR_CONV_LATENCY_MS, clear$Conversation) } ~
-                                    path(API / "clear"/ "dialog") { withMetric(M_CLEAR_DIALOG_LATENCY_MS, clear$Dialog) } ~
-                                    path(API / "company"/ "add") { withMetric(M_COMPANY_ADD_LATENCY_MS, company$Add) } ~
-                                    path(API / "company"/ "get") { withMetric(M_COMPANY_GET_LATENCY_MS, company$Get) } ~
-                                    path(API / "company" / "update") { withMetric(M_COMPANY_UPDATE_LATENCY_MS, company$Update) } ~
-                                    path(API / "company" / "token" / "reset") { withMetric(M_COMPANY_TOKEN_LATENCY_MS, company$Token$Reset) } ~
-                                    path(API / "company" / "delete") { withMetric(M_COMPANY_DELETE_LATENCY_MS, company$Delete) } ~
-                                    path(API / "user" / "get") { withMetric(M_USER_GET_LATENCY_MS, user$Get) } ~
-                                    path(API / "user" / "add") { withMetric(M_USER_ADD_LATENCY_MS, user$Add) } ~
-                                    path(API / "user" / "update") { withMetric(M_USER_UPDATE_LATENCY_MS, user$Update) } ~
-                                    path(API / "user" / "delete") { withMetric(M_USER_DELETE_LATENCY_MS, user$Delete) } ~
-                                    path(API / "user" / "admin") { withMetric(M_USER_ADMIN_LATENCY_MS, user$Admin) } ~
-                                    path(API / "user" / "passwd" / "reset") { withMetric(M_USER_PASSWD_RESET_LATENCY_MS, user$Password$Reset) } ~
-                                    path(API / "user" / "all") { withMetric(M_USER_ALL_LATENCY_MS, user$All) } ~
-                                    path(API / "feedback"/ "add") { withMetric(M_FEEDBACK_ADD_LATENCY_MS, feedback$Add) } ~
-                                    path(API / "feedback"/ "all") { withMetric(M_FEEDBACK_GET_LATENCY_MS, feedback$All) } ~
-                                    path(API / "feedback" / "delete") { withMetric(M_FEEDBACK_DELETE_LATENCY_MS, feedback$Delete) } ~
-                                    path(API / "probe" / "all") { withMetric(M_PROBE_ALL_LATENCY_MS, probe$All) } ~
-                                    path(API / "model" / "sugsyn") { withMetric(M_MODEL_SUGSYN_LATENCY_MS, sugsyn$) } ~
-                                    path(API / "model" / "syns") { withMetric(M_MODEL_SYNS_LATENCY_MS, elementSynonyms$) } ~
-                                    path(API / "ask") { withMetric(M_ASK_LATENCY_MS, ask$) } ~
-                                    path(API / "ask" / "sync") { withMetric(M_ASK_SYNC_LATENCY_MS, ask$Sync) }
+                                    path(API / "health") { $health() } // Duplicate for POST.
+                                    path(API / "signin") { withMetric(M_SIGNIN_LATENCY_MS, $signin) } ~
+                                    path(API / "signout") { withMetric(M_SIGNOUT_LATENCY_MS, $signout) } ~
+                                    path(API / "cancel") { withMetric(M_CANCEL_LATENCY_MS, $cancel) } ~
+                                    path(API / "check") { withMetric(M_CHECK_LATENCY_MS, $check) } ~
+                                    path(API / "clear"/ "conversation") { withMetric(M_CLEAR_CONV_LATENCY_MS, $clear$Conversation) } ~
+                                    path(API / "clear"/ "dialog") { withMetric(M_CLEAR_DIALOG_LATENCY_MS, $clear$Dialog) } ~
+                                    path(API / "company"/ "add") { withMetric(M_COMPANY_ADD_LATENCY_MS, $company$Add) } ~
+                                    path(API / "company"/ "get") { withMetric(M_COMPANY_GET_LATENCY_MS, $company$Get) } ~
+                                    path(API / "company" / "update") { withMetric(M_COMPANY_UPDATE_LATENCY_MS, $company$Update) } ~
+                                    path(API / "company" / "token" / "reset") { withMetric(M_COMPANY_TOKEN_LATENCY_MS, $company$Token$Reset) } ~
+                                    path(API / "company" / "delete") { withMetric(M_COMPANY_DELETE_LATENCY_MS, $company$Delete) } ~
+                                    path(API / "user" / "get") { withMetric(M_USER_GET_LATENCY_MS, $user$Get) } ~
+                                    path(API / "user" / "add") { withMetric(M_USER_ADD_LATENCY_MS, $user$Add) } ~
+                                    path(API / "user" / "update") { withMetric(M_USER_UPDATE_LATENCY_MS, $user$Update) } ~
+                                    path(API / "user" / "delete") { withMetric(M_USER_DELETE_LATENCY_MS, $user$Delete) } ~
+                                    path(API / "user" / "admin") { withMetric(M_USER_ADMIN_LATENCY_MS, $user$Admin) } ~
+                                    path(API / "user" / "passwd" / "reset") { withMetric(M_USER_PASSWD_RESET_LATENCY_MS, $user$Passwd$Reset) } ~
+                                    path(API / "user" / "all") { withMetric(M_USER_ALL_LATENCY_MS, $user$All) } ~
+                                    path(API / "feedback"/ "add") { withMetric(M_FEEDBACK_ADD_LATENCY_MS, $feedback$Add) } ~
+                                    path(API / "feedback"/ "all") { withMetric(M_FEEDBACK_GET_LATENCY_MS, $feedback$All) } ~
+                                    path(API / "feedback" / "delete") { withMetric(M_FEEDBACK_DELETE_LATENCY_MS, $feedback$Delete) } ~
+                                    path(API / "probe" / "all") { withMetric(M_PROBE_ALL_LATENCY_MS, $probe$All) } ~
+                                    path(API / "model" / "sugsyn") { withMetric(M_MODEL_SUGSYN_LATENCY_MS, $model$sugsyn) } ~
+                                    path(API / "model" / "syns") { withMetric(M_MODEL_SYNS_LATENCY_MS, $model$syns) } ~
+                                    path(API / "ask") { withMetric(M_ASK_LATENCY_MS, $ask) } ~
+                                    path(API / "ask" / "sync") { withMetric(M_ASK_SYNC_LATENCY_MS, $ask$Sync) }
                                 }
                             }
                         }
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
index 76af8a0..fae55d0 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
@@ -218,13 +218,13 @@ object NCSuggestSynonymManager extends NCService {
                                 }).
                                 toMap
 
-                            val elemSyns =
-                                mdlSyns.map { case (elemId, syns) => elemId -> syns.flatMap(parser.expand) }.
+                            val elmSyns =
+                                mdlSyns.map { case (elmId, syns) => elmId -> syns.flatMap(parser.expand) }.
                                     map { case (id, seq) => id -> seq.map(txt => split(txt).map(p => Word(p, toStemWord(p)))) }
 
                             val allReqs =
-                                elemSyns.map {
-                                    case (elemId, syns) =>
+                                elmSyns.map {
+                                    case (elmId, syns) =>
                                         // Current implementation supports suggestions only for single words synonyms.
                                         val normSyns: Seq[Seq[Word]] = syns.filter(_.size == 1)
                                         val synsStems = normSyns.map(_.map(_.stem))
@@ -248,7 +248,7 @@ object NCSuggestSynonymManager extends NCService {
                                                                 }
                                                         }.mkString(" "),
                                                         ex = exWords.mkString(" "),
-                                                        elmId = elemId,
+                                                        elmId = elmId,
                                                         index = idx
                                                     )
                                                 }
@@ -257,20 +257,20 @@ object NCSuggestSynonymManager extends NCService {
                                                     yield mkRequestData(idx, synStems, i)).distinct
                                             }
 
-                                        elemId -> reqs.toSet
+                                        elmId -> reqs.toSet
                                 }.filter(_._2.nonEmpty)
 
-                            val noExElems =
+                            val noExElms =
                                 mdlSyns.
-                                    filter { case (elemId, syns) => syns.nonEmpty && !allReqs.contains(elemId) }.
-                                    map { case (elemId, _) => elemId }
+                                    filter { case (elmId, syns) => syns.nonEmpty && !allReqs.contains(elmId) }.
+                                    map { case (elmId, _) => elmId }
 
-                            if (noExElems.nonEmpty)
+                            if (noExElms.nonEmpty)
                                 warns += s"Elements do not have *single word* synonyms in their @NCIntentSample or @NCIntentSampleRef annotations - " +
-                                    s"no suggestion can be made: ${noExElems.mkString(", ")}"
+                                    s"no suggestion can be made: ${noExElms.mkString(", ")}"
 
                             val allReqsCnt = allReqs.map(_._2.size).sum
-                            val allSynsCnt = elemSyns.map(_._2.size).sum
+                            val allSynsCnt = elmSyns.map(_._2.size).sum
 
                             logger.trace(s"Request is going to execute on 'ctxword' server [" +
                                 s"exs=${exs.size}, " +
@@ -289,7 +289,7 @@ object NCSuggestSynonymManager extends NCService {
                                 val cli = HttpClients.createDefault
                                 val err = new AtomicReference[Throwable]()
 
-                                for ((elemId, reqs) <- allReqs; batch <- reqs.sliding(BATCH_SIZE, BATCH_SIZE).map(_.toSeq)) {
+                                for ((elmId, reqs) <- allReqs; batch <- reqs.sliding(BATCH_SIZE, BATCH_SIZE).map(_.toSeq)) {
                                     U.asFuture(
                                         _ => {
                                             val post = new HttpPost(url)
@@ -322,7 +322,7 @@ object NCSuggestSynonymManager extends NCService {
                                             logger.debug(s"Executed: $i requests...")
 
                                             allSgsts.
-                                                computeIfAbsent(elemId, (_: String) => new CopyOnWriteArrayList[Suggestion]()).
+                                                computeIfAbsent(elmId, (_: String) => new CopyOnWriteArrayList[Suggestion]()).
                                                 addAll(resps.flatten.asJava)
 
                                             if (i == allReqsCnt)
@@ -342,13 +342,13 @@ object NCSuggestSynonymManager extends NCService {
                                 if (err.get() != null)
                                     throw new NCE("Error while working with 'ctxword' server.", err.get())
 
-                                val allSynsStems = elemSyns.flatMap(_._2).toSeq.flatten.map(_.stem).toSet
+                                val allSynsStems = elmSyns.flatMap(_._2).toSeq.flatten.map(_.stem).toSet
 
                                 val nonEmptySgsts = allSgsts.asScala.map(p => p._1 -> p._2.asScala).filter(_._2.nonEmpty)
 
                                 val res = mutable.HashMap.empty[String, mutable.ArrayBuffer[SuggestionResult]]
 
-                                nonEmptySgsts.foreach { case (elemId, elemSgsts) =>
+                                nonEmptySgsts.foreach { case (elmId, elemSgsts) =>
                                     elemSgsts.
                                         map(sgst => (sgst, toStem(sgst.word))).
                                         groupBy { case (_, stem) => stem }.
@@ -366,12 +366,12 @@ object NCSuggestSynonymManager extends NCService {
                                         zipWithIndex.
                                         foreach { case ((word, _, sumFactor), _) =>
                                             val seq =
-                                                res.get(elemId) match {
+                                                res.get(elmId) match {
                                                     case Some(seq) => seq
                                                     case None =>
                                                         val buf = mutable.ArrayBuffer.empty[SuggestionResult]
 
-                                                        res += elemId -> buf
+                                                        res += elmId -> buf
 
                                                         buf
                                                 }
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestModelSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestModelSpec.scala
index a00fc11..7543f3a 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestModelSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/rest/NCRestModelSpec.scala
@@ -63,7 +63,7 @@ class NCRestModelSpec extends NCRestSpec {
     @Test
     def testSyns(): Unit = {
         // Note that checked values are valid for current configuration of `RestTestModel` model.
-        post("model/syns", "mdlId" -> "rest.test.model", "elemId" -> "x")(
+        post("model/syns", "mdlId" -> "rest.test.model", "elmId" -> "x")(
             ("$.status", (status: String) => assertEquals("API_OK", status)),
             ("$.synonyms", (syns: ResponseList) => {
                 println("synonyms="+syns)
@@ -76,7 +76,7 @@ class NCRestModelSpec extends NCRestSpec {
                 assertTrue(vals.isEmpty)
             })
         )
-        post("model/syns", "mdlId" -> "rest.test.model", "elemId" -> "valElem")(
+        post("model/syns", "mdlId" -> "rest.test.model", "elmId" -> "valElem")(
             ("$.status", (status: String) => assertEquals("API_OK", status)),
             ("$.synonyms", (syns: ResponseList) => {
                 println("synonyms="+syns)
@@ -90,10 +90,10 @@ class NCRestModelSpec extends NCRestSpec {
             })
         )
 
-        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "UNKNOWN", "elemId" -> "UNKNOWN")
-        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "rest.test.model", "elemId" -> "UNKNOWN")
-        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> ("A" * 33), "elemId" -> "UNKNOWN")
-        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "rest.test.model", "elemId" -> ("A" * 65))
+        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "UNKNOWN", "elmId" -> "UNKNOWN")
+        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "rest.test.model", "elmId" -> "UNKNOWN")
+        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> ("A" * 33), "elmId" -> "UNKNOWN")
+        postError("model/syns", 400, "NC_INVALID_FIELD", "mdlId" -> "rest.test.model", "elmId" -> ("A" * 65))
         postError("model/syns", 400, "NC_ERROR", "mdlId" -> "rest.test.model")
     }
 }
diff --git a/openapi/nlpcraft_swagger.yml b/openapi/nlpcraft_swagger.yml
index 51bfee8..2a5723b 100644
--- a/openapi/nlpcraft_swagger.yml
+++ b/openapi/nlpcraft_swagger.yml
@@ -238,9 +238,9 @@ paths:
     post:
       tags:
         - Tools
-      summary: Gets model element synonyms.
+      summary: Gets model element synonyms and values.
       description: >-
-        Gets model element synonyms.
+        Gets model element synonyms and values.
         Administrative privileges required.
       operationId: syns
       parameters:
@@ -253,7 +253,7 @@ paths:
             required:
               - acsTok
               - mdlId
-              - elemId
+              - elmId
             properties:
               acsTok:
                 type: string
@@ -262,11 +262,11 @@ paths:
               mdlId:
                 type: string
                 maxLength: 32
-                description: ID of the model to run synonym suggestion on.
-              elemId:
+                description: ID of the model to run get elements synonyms and values.
+              elmId:
                 type: string
                 maxLength: 64
-                description: ID of the model element to getting synonyms.
+                description: ID of the model element to get its synonyms and values.
       responses:
         '200':
           description: Successful operation.
@@ -284,10 +284,14 @@ paths:
                   - API_OK
               synonyms:
                 type: object
-                description: Synonyms list.
+                description: List of individual synomyms.
               values:
                 type: object
-                description: Values map (value name to vaule synonyms list). Empty if element doesn't contain values.
+                description: >-
+                  Map of element values, if any.
+                  Map key is the value name.
+                  Map value is a list of synonyms for that value.
+                  Empty if element doesn't have values.
         '400':
           description: Failed operation.
           schema:
@@ -298,8 +302,8 @@ paths:
         - Asking
       summary: Gets status and result of submitted requests.
       description: >-
-          Gets the status and result (OK or failure) of the previously submitted requests.
-          Request statuses returned sorted by their registration time, starting from newest.
+        Gets the status and result (OK or failure) of the previously submitted requests.
+        Request statuses returned sorted by their registration time, starting from newest.
       operationId: check
       parameters:
         - in: body

Mime
View raw message