From 42082cc974cb83ebc763a00d358c88e4d67827d7 Mon Sep 17 00:00:00 2001 From: sbosse Date: Tue, 27 Aug 2024 00:16:06 +0200 Subject: [PATCH] Tue 27 Aug 00:14:56 CEST 2024 --- test/test-nlp3.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/test-nlp3.js diff --git a/test/test-nlp3.js b/test/test-nlp3.js new file mode 100644 index 0000000..019f4f0 --- /dev/null +++ b/test/test-nlp3.js @@ -0,0 +1,14 @@ +print(1,nlp('My location is unkown').has( ['location','my'])); +print(2,nlp('My location is unkown').has( ['location','your'])); +print(3,nlp('My location is unkown').has( '(location|my)')); +print(4,nlp('Your location?').has( '(#Pronoun|#Noun) location ' )); +print(5,nlp('Where do I live?').has( ['where * (#Pronoun|#Noun)'] )); +print(6,nlp('Where do I live?').has( ['where * (#Pronoun|#Noun)'] )); + +print(7,nlp('My position is unkown').hasSimilar( ['location'])); +print(8,nlp('My locatin is unkown').hasSimilar( ['location'])); + +print(9,nlp.similar('My position is unkown','My locatin is unkown',1)); +print(10,nlp.tokenize('My position is unkown').textList()); +print(11,nlp('I am going on a quick journey').adjectives().toAdverb().text()) +print(12,nlp('I am not avalable until 10.12.2020').dates().text())