You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by if...@apache.org on 2021/02/27 05:14:12 UTC
[incubator-nlpcraft] 01/08: Fix regex
This is an automated email from the ASF dual-hosted git repository.
ifropc pushed a commit to branch NLPCRAFT-91
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 88653a4656fececc3d131c3bff33e7702e1b09d0
Author: Ifropc <if...@apache.org>
AuthorDate: Wed Feb 10 17:54:05 2021 -0800
Fix regex
---
.../scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 a68e305..45cf1c5 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
@@ -47,12 +47,13 @@ import scala.collection.{Map, Seq, Set, mutable}
import scala.collection.mutable.{ArrayBuffer, ListBuffer}
import scala.util.control.Exception._
+
/**
* Model deployment manager.
*/
object NCDeployManager extends NCService with DecorateAsScala {
private final val TOKENS_PROVIDERS_PREFIXES = Set("nlpcraft:", "google:", "stanford:", "opennlp:", "spacy:")
- private final val ID_REGEX = "^[_a-zA-Z]+[a-zA-Z0-9:-_]*$"
+ private final val ID_REGEX = "^[_a-zA-Z]+[a-zA-Z0-9:\\-_]*$"
private final val CLS_INTENT = classOf[NCIntent]
private final val CLS_INTENT_REF = classOf[NCIntentRef]