You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/08/27 17:44:08 UTC

[incubator-nlpcraft] branch NLPCRAFT-108 updated: WIP on scripts.

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

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


The following commit(s) were added to refs/heads/NLPCRAFT-108 by this push:
     new 3c2ba76  WIP on scripts.
3c2ba76 is described below

commit 3c2ba763f8338e7553710b2e38e52b33237ca1ca
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Thu Aug 27 10:43:53 2020 -0700

    WIP on scripts.
---
 bin/nccurl.cmd                                     | 56 +++++++--------
 bin/nlpcraft.cmd                                   | 33 ++++-----
 .../src/main/python/ctxword/bin/start_server.cmd   | 42 ++++++------
 nlpcraft/src/main/python/ctxword/bin/suggest.cmd   | 80 +++++++++++-----------
 4 files changed, 106 insertions(+), 105 deletions(-)

diff --git a/bin/nccurl.cmd b/bin/nccurl.cmd
index 4ab3740..50bbd3a 100644
--- a/bin/nccurl.cmd
+++ b/bin/nccurl.cmd
@@ -1,33 +1,33 @@
-@echo OFF
+::
+:: 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.
+::
 
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
+:: Quick shortcut script for localhost testing with curl (w/o excessive command line).
+::
+:: Usage:
+:: - 1st parameter is REST URL unique suffix (i.e. /signin) w/o leading '/'
+:: - 2nd parameter is JSON payload string (note that double quotes in JSON must be escaped).
+::
+:: Example usage:
+::   >./nccurl.cmd signin "{\"email\": \"admin@admin.com\", \"passwd\": \"admin\"}"
+::   >./nccurl.cmd ask "{\"acsTok\": \"OgJanjDzk\", \"txt\": \"Hi!\", \"mdlId\": \"nlpcraft.helloworld.ex\"}"
+::   >./nccurl.cmd check "{\"acsTok\": \"OgJanjDzk\"}"
+::
 
-rem Quick shortcut script for localhost testing with curl (w/o excessive command line).
-rem
-rem Usage:
-rem - 1st parameter is REST URL unique suffix (i.e. /signin) w/o leading '/'
-rem - 2nd parameter is JSON payload string (note that double quotes in JSON must be escaped).
-rem
-rem Example usage:
-rem   >./nccurl.cmd signin "{\"email\": \"admin@admin.com\", \"passwd\": \"admin\"}"
-rem   >./nccurl.cmd ask "{\"acsTok\": \"OgJanjDzk\", \"txt\": \"Hi!\", \"mdlId\": \"nlpcraft.helloworld.ex\"}"
-rem   >./nccurl.cmd check "{\"acsTok\": \"OgJanjDzk\"}"
-rem
+@echo OFF
 
 where curl >nul 2>&1 || echo 'curl' not found && exit /b
 where python3 >nul 2>&1 || echo 'python3' not found && exit /b
diff --git a/bin/nlpcraft.cmd b/bin/nlpcraft.cmd
index 9d5991d..bf4e940 100644
--- a/bin/nlpcraft.cmd
+++ b/bin/nlpcraft.cmd
@@ -1,18 +1,19 @@
+::
+:: 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.
+::
+
 @echo OFF
 
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
\ No newline at end of file
diff --git a/nlpcraft/src/main/python/ctxword/bin/start_server.cmd b/nlpcraft/src/main/python/ctxword/bin/start_server.cmd
index b15c433..5bb937c 100644
--- a/nlpcraft/src/main/python/ctxword/bin/start_server.cmd
+++ b/nlpcraft/src/main/python/ctxword/bin/start_server.cmd
@@ -1,25 +1,25 @@
-@echo OFF
+::
+:: 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.
+::
+:: NOTE:
+:: ----
+:: This script may not be suitable for production usage. Please see official Flask documentation for
+:: more info on how to deploy Flask applications.
 
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
-rem NOTE:
-rem ----
-rem This script may not be suitable for production usage. Please see official Flask documentation for
-rem more info on how to deploy Flask applications.
+@echo OFF
 
 where python3 >nul 2>&1 || echo 'python3' not found && exit /b
 
diff --git a/nlpcraft/src/main/python/ctxword/bin/suggest.cmd b/nlpcraft/src/main/python/ctxword/bin/suggest.cmd
index cf267f8..fa81c0c 100644
--- a/nlpcraft/src/main/python/ctxword/bin/suggest.cmd
+++ b/nlpcraft/src/main/python/ctxword/bin/suggest.cmd
@@ -1,44 +1,44 @@
-@echo off
+::
+:: 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.
+::
+:: Simple Curl-based script for getting contextual related words suggestions for a single input sentence.
+:: Example:
+::     > bin\suggest.cmd "what is the chance of rain tomorrow?" 5
+::       % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
+::                                      Dload  Upload   Total   Spent    Left  Speed
+::     100   214  100   104  100   110    104    110  0:00:01 --:--:--  0:00:01   804
+::     [
+::         [
+::             "rain",
+::             "snow",
+::             "rainfall",
+::             "precipitation",
+::             "rains",
+::             "flooding",
+::             "storms",
+::             "raining",
+::             "sunshine",
+::             "showers"
+::         ]
+::     ]
+::
+:: NOTE: You need to have REST server running (see 'start_server.{cmd|ps1}' scripts in the same folder).
+::
 
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
-rem Simple Curl-based script for getting contextual related words suggestions for a single input sentence.
-rem Example:
-rem     > bin\suggest.cmd "what is the chance of rain tomorrow?" 5
-rem       % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
-rem                                      Dload  Upload   Total   Spent    Left  Speed
-rem     100   214  100   104  100   110    104    110  0:00:01 --:--:--  0:00:01   804
-rem     [
-rem         [
-rem             "rain",
-rem             "snow",
-rem             "rainfall",
-rem             "precipitation",
-rem             "rains",
-rem             "flooding",
-rem             "storms",
-rem             "raining",
-rem             "sunshine",
-rem             "showers"
-rem         ]
-rem     ]
-rem
-rem NOTE: You need to have REST server running (see 'start_server.{cmd|ps1}' scripts in the same folder).
-rem
+@echo off
 
 where curl >nul 2>&1 || echo 'curl' not found && exit /b
 where python3 >nul 2>&1 || echo 'python3' not found && exit /b