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 d15a701  WIP.
d15a701 is described below

commit d15a701925ab6abec396cb994fb6e78c9606427b
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Oct 11 14:34:34 2021 +0300

    WIP.
---
 .../src/test/java/org/apache/nlpcraft/NCSpec.java  |  2 +-
 .../src/test/java/org/apache/nlpcraft/ner1.json    | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/nlpcraft/src/test/java/org/apache/nlpcraft/NCSpec.java 
b/nlpcraft/src/test/java/org/apache/nlpcraft/NCSpec.java
index fc20dc7..cf2ad13 100644
--- a/nlpcraft/src/test/java/org/apache/nlpcraft/NCSpec.java
+++ b/nlpcraft/src/test/java/org/apache/nlpcraft/NCSpec.java
@@ -54,7 +54,7 @@ public class NCSpec {
     public void test() throws Exception {
         NCDefaultNerParser ner1 =
             new NCDefaultNerParserBuilder().
-                withElements(new File("JSON.json")).
+                withElements(new File("ner1.json")).
                 withMaxTotalSynonyms(30).
                 getNlpcraftNerParser();
 
diff --git a/nlpcraft/src/test/java/org/apache/nlpcraft/ner1.json 
b/nlpcraft/src/test/java/org/apache/nlpcraft/ner1.json
new file mode 100644
index 0000000..0e2267f
--- /dev/null
+++ b/nlpcraft/src/test/java/org/apache/nlpcraft/ner1.json
@@ -0,0 +1,28 @@
+{
+  "macros": [
+    {
+      "<MACRO1>": "A|B"
+    }
+  ],
+  "elements": [
+    {
+      "id": "wt:phen",
+      "description": "Weather phenomenon.",
+      "synonyms": [
+        "{high sea|severe weather|hail|heat wave|cold 
wave|derecho|supercell|avalanche|cyclone|wildfire|landslide|firestorm|dust 
storm|thunder snow|winter 
storm|cloudburst|shower|condensation|precipitation|drizzle|rainstorm|rain 
storm|rainfall|rain|storm|sun|sunshine|cloud|hot|cold|dry|wet|wind|hurricane|typhoon|sand-storm|sand
 storm|tornado|humid|fog|snow|smog|black 
ice|haze|thundershower|thundersnow|sleet|drought|wildfire|blizzard|avalanche|mist|thunderstorm}",
+        "{weather 
{condition|temp|temperature|data|_}|condition|temp|temperature}",
+        "<MACRO1> a"
+      ]
+    },
+    {
+      "id": "wt:hist",
+      "description": "History (past) indicator.",
+      "groups": [
+        "indicator"
+      ],
+      "synonyms": [
+        "{history|past|previous}"
+      ]
+    }
+  ]
+}
\ No newline at end of file

Reply via email to