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())