From 4411d1a413cf04bfe97f5ba4dfa39afb1991eba0 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 11 May 2022 16:09:29 -0400 Subject: [PATCH] feat(sentiment): Improve scoring and analysis * Implement english-only scoring with wink https://github.com/winkjs/wink-sentiment (AFINN, emojis) * Implement english-only scoring with NLP.js https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md (AFINN, Senticon, Pattern) * Refactor language processing into standalone functions for future use * Add limited multi-langauge support * Can run sentiment with NLP.js on english, german, spanish, and french * Normalize all scores to range between -1 and +1 * Improve score accuracy by averaging all scores --- package-lock.json | 1865 ++++++++++++++++++++++++++- package.json | 2 + src/Common/Infrastructure/Atomic.ts | 39 +- src/Common/LangaugeProcessing.ts | 267 ++++ src/Common/Typings/support.d.ts | 20 + src/Rule/SentimentRule.ts | 178 +-- src/Schema/App.json | 4 +- src/Schema/Rule.json | 4 +- src/Schema/RuleSet.json | 4 +- src/util.ts | 8 + 10 files changed, 2208 insertions(+), 183 deletions(-) create mode 100644 src/Common/LangaugeProcessing.ts diff --git a/package-lock.json b/package-lock.json index e174d44..f94a23f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,6 +50,7 @@ "mustache": "^4.2.0", "nanoid": "^3.3.1", "node-fetch": "^2.6.1", + "node-nlp": "^4.24.0", "normalize-url": "^6.1.0", "object-hash": "^2.2.0", "p-event": "^4.2.0", @@ -75,6 +76,7 @@ "typescript": "^4.3.4", "vader-sentiment": "^1.1.3", "webhook-discord": "^3.7.7", + "wink-sentiment": "^5.0.2", "winston": "github:FoxxMD/winston#fbab8de969ecee578981c77846156c7f43b5f01e", "winston-daily-rotate-file": "^4.5.5", "winston-duplex": "^0.1.1", @@ -788,6 +790,638 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@microsoft/recognizers-text": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text/-/recognizers-text-1.3.0.tgz", + "integrity": "sha512-0gUhtS/0qSF6veB3Olu55IuJ0Skwg4u1IbJX9KFj1QeK8z6cw69/p637IPD2NgXLlXCy2HEqLvUW/mgbDp3rWg==", + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-choice": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-choice/-/recognizers-text-choice-1.3.0.tgz", + "integrity": "sha512-I2LQAJJ9TJthJYWZNzooJD6+5KUkr+H+m54XpjY+vKjR81DPVFUL/SWZVyv+cC7eePFwrDv3gUnkXYS+Lp0hmA==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "grapheme-splitter": "^1.0.2" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-data-types-timex-expression": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-data-types-timex-expression/-/recognizers-text-data-types-timex-expression-1.3.0.tgz", + "integrity": "sha512-REHUXmMUI1jL3b9v+aSdzKxLxRdejsfg9McYRxY3LW0Gu4UbwD7Q+K6mtSo40cwg8uh6fiV9GY8hDuKXHH6dVA==", + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-date-time": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-date-time/-/recognizers-text-date-time-1.3.0.tgz", + "integrity": "sha512-bgw4TS726maTg53M6SQRHQOzOH0za0zmBWnnGo0wQdbDfK+bgq5aeDSD4k/HhXvfkOD6zzRd3+tG3Dqyp/kFaQ==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "@microsoft/recognizers-text-number-with-unit": "~1.3.0", + "lodash.isequal": "^4.5.0", + "lodash.tonumber": "^4.0.3" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-number": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-number/-/recognizers-text-number-1.3.0.tgz", + "integrity": "sha512-KVFxvaXW9E7UkuF0EYCghvCn0u+N5L7bBXeP4IKB6fXkQd6GAZ9zNA2Acdm9lJzCRxcsBYFbRLcRMrPHwAa32w==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "bignumber.js": "^7.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.sortby": "^4.7.0", + "lodash.trimend": "^4.5.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-number-with-unit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-number-with-unit/-/recognizers-text-number-with-unit-1.3.0.tgz", + "integrity": "sha512-FxBD1ZQLvr4c+ssVyqUjblg+i21GbzIsDEHd5VWon5wg+2qrqixlmP1mXsXG+iGRV3qqeZCtTFdqkwJ3MWhovA==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.last": "^3.0.0", + "lodash.max": "^4.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-number/node_modules/bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "engines": { + "node": "*" + } + }, + "node_modules/@microsoft/recognizers-text-sequence": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-sequence/-/recognizers-text-sequence-1.3.0.tgz", + "integrity": "sha512-LXZ9AakClrdPVfEphCJFETjw6n8w/LwW1Yoj9ZKcGI9PGvH6RR+haS4GSZuHeMhEacmaa3NkzD+I44qYIvym8Q==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "grapheme-splitter": "^1.0.2" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-suite": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-suite/-/recognizers-text-suite-1.3.0.tgz", + "integrity": "sha512-uqG4vzy5N2CmBaeINny0bLdnGp0jDbT1moNoLC+Yim3G8kHOU9lpDfwA6VN6HTYaDM5854SNMEzLjJdS1TPFTw==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-choice": "~1.3.0", + "@microsoft/recognizers-text-data-types-timex-expression": "~1.3.0", + "@microsoft/recognizers-text-date-time": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "@microsoft/recognizers-text-number-with-unit": "~1.3.0", + "@microsoft/recognizers-text-sequence": "~1.3.0" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@nlpjs/builtin-duckling": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/builtin-duckling/-/builtin-duckling-4.23.4.tgz", + "integrity": "sha512-GYaXX0cDOFg7KTJT3nOEZvWiG31yacw2f5Wjq+VrATv1iNertbrqp3lJahGp+it3oj4len4GyDS/PhI5SqS+9g==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/builtin-microsoft": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/builtin-microsoft/-/builtin-microsoft-4.23.4.tgz", + "integrity": "sha512-Ihdd6HHPoFql1CGhcUvjxBKjTvDyDL9Zgi5xGJwCZ/w5LGhDTa4cAZG1GSaaR2RxOi5r1Q0H2GI+EAK3ZRz3eA==", + "dependencies": { + "@microsoft/recognizers-text-suite": "1.3.0", + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/core": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/core/-/core-4.23.4.tgz", + "integrity": "sha512-iIQHCqYcUYxOk2LRa2shgMdZ1jdvuLqU9OaR1raOI+Hl5RDCoIpmnEFUTFYcBjGWbrXJZwjoQBnLsNMe81ZTZg==" + }, + "node_modules/@nlpjs/core-loader": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/core-loader/-/core-loader-4.23.4.tgz", + "integrity": "sha512-s58cu+gI+kPRG6r2ayK+B4++OHdTHA6SFLLxQ42JzdmY6rsEa1yEjMzICc14+zuye1qWelp8oYf5AqmzlVNdug==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/request": "^4.22.7" + } + }, + "node_modules/@nlpjs/emoji": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/emoji/-/emoji-4.23.4.tgz", + "integrity": "sha512-n7mk0TbvsaAupom9cRdUv/WfKorhVJi4/6jMso8n35kYapA4nDSuba4oqmt4siqjlt0++a89Dcx21ZiBxHIRow==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/evaluator": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/evaluator/-/evaluator-4.22.7.tgz", + "integrity": "sha512-gujkMpCfdjuqn14gJklHe8NBqSIGGcNNg2BA/Ag50BT+VRsTCBeEib57Cf/SgG/JjTTBERaAQ3SxvxghLmMDpA==", + "dependencies": { + "escodegen": "^2.0.0", + "esprima": "^4.0.1" + } + }, + "node_modules/@nlpjs/lang-all": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-all/-/lang-all-4.24.0.tgz", + "integrity": "sha512-kD7WchbHoMozbMBER9sKqkPUjKiXtdHEtsRdX4z0BZ0J+Thr+deoxNQZXQvuFH61MhYCfIPi8vNSKFvFODu1Zg==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-ar": "^4.23.4", + "@nlpjs/lang-bn": "^4.23.4", + "@nlpjs/lang-ca": "^4.23.4", + "@nlpjs/lang-cs": "^4.23.4", + "@nlpjs/lang-da": "^4.23.4", + "@nlpjs/lang-de": "^4.23.4", + "@nlpjs/lang-el": "^4.23.4", + "@nlpjs/lang-en": "^4.23.4", + "@nlpjs/lang-es": "^4.23.4", + "@nlpjs/lang-eu": "^4.23.4", + "@nlpjs/lang-fa": "^4.23.4", + "@nlpjs/lang-fi": "^4.23.4", + "@nlpjs/lang-fr": "^4.23.4", + "@nlpjs/lang-ga": "^4.23.4", + "@nlpjs/lang-gl": "^4.23.4", + "@nlpjs/lang-hi": "^4.23.4", + "@nlpjs/lang-hu": "^4.23.4", + "@nlpjs/lang-hy": "^4.23.4", + "@nlpjs/lang-id": "^4.23.4", + "@nlpjs/lang-it": "^4.23.4", + "@nlpjs/lang-ja": "^4.24.0", + "@nlpjs/lang-ko": "^4.23.4", + "@nlpjs/lang-lt": "^4.23.4", + "@nlpjs/lang-ms": "^4.23.4", + "@nlpjs/lang-ne": "^4.23.4", + "@nlpjs/lang-nl": "^4.23.4", + "@nlpjs/lang-no": "^4.23.4", + "@nlpjs/lang-pl": "^4.23.4", + "@nlpjs/lang-pt": "^4.23.4", + "@nlpjs/lang-ro": "^4.23.4", + "@nlpjs/lang-ru": "^4.23.4", + "@nlpjs/lang-sl": "^4.23.4", + "@nlpjs/lang-sr": "^4.23.4", + "@nlpjs/lang-sv": "^4.23.4", + "@nlpjs/lang-ta": "^4.23.4", + "@nlpjs/lang-th": "^4.23.4", + "@nlpjs/lang-tl": "^4.23.4", + "@nlpjs/lang-tr": "^4.23.4", + "@nlpjs/lang-uk": "^4.23.4", + "@nlpjs/lang-zh": "^4.23.4", + "@nlpjs/language": "^4.22.7" + } + }, + "node_modules/@nlpjs/lang-ar": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ar/-/lang-ar-4.23.4.tgz", + "integrity": "sha512-x/pax8lXS3RPj4dsw0Q7JK9zefJHDtmweKBsT/C2sbySkm9ml2xD65CeHopl2jdy1X73r2fNgFflfEXr5zM3rQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-bn": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-bn/-/lang-bn-4.23.4.tgz", + "integrity": "sha512-EwNohVRyqJeSM1JQnVQIufLpAtBkNtqa1FipHai4O+fxUlud4ujR4HF6uXYaCn2I46LgyiDbYPHSjI2bp3h/lQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ca": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ca/-/lang-ca-4.23.4.tgz", + "integrity": "sha512-9+ljf2dqFurUjTR0XwOsmDoIvJhyD/1c2m7DVwoz5hTv3HFzv0tuJOsLtLb19qo5rWd+hAabte4e2vEImMiJxw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-cs": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-cs/-/lang-cs-4.23.4.tgz", + "integrity": "sha512-m1A0e45nTttgX7ZnaYw4z47Il9g3C52cd4KbOFsbc9iJvNp52qOTeS9SrTkdRr9i0tIRQYQoqj25r6Wlh59Adw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-da": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-da/-/lang-da-4.23.4.tgz", + "integrity": "sha512-U/lS/SvEmYWpmU431n/0Nn70ar/EKeuRIkBCVLBILpF4dUtCgmj0b7YVGZOlplputUIqKVqadvWkVUndZPDEtQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-de": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-de/-/lang-de-4.23.4.tgz", + "integrity": "sha512-qTdoVN+ZyLEALl/791LZG9fToLT4eCk1kg5DL/GGe0pmr7vzqQiVL7ac5uUGwyE1jI9ymr96Ipu6oWwWAEx3/w==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-el": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-el/-/lang-el-4.23.4.tgz", + "integrity": "sha512-oztT3iO/pZ2+zdDrSvcP7XpLWskiiW/EH56Uz0U2aLVHzFzUYgc4o1QNqcBnF0D0mJEYWSgA6gS1IufupNViug==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-en": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-en/-/lang-en-4.23.4.tgz", + "integrity": "sha512-sPSP8C1miTyrpRtS2I5mQekScVAY1U/514A4VgMtwQi8Be0dc1mnR2lY3RcdWC0DhcwUxq3fXSn7JYGufjzl6Q==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-en-min": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-en-min": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-en-min/-/lang-en-min-4.23.4.tgz", + "integrity": "sha512-jQ5LlrSLMtR00gYKNgz+FHw2Pt9EmNDeUC+5cl5lO17hfyGA05C1UnvsdA3Q6LJFEqnD8DDyR3PMloqIhDAA0w==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-es": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-es/-/lang-es-4.23.4.tgz", + "integrity": "sha512-5me9OOx2kA+W/984v5LJONzYIXgg2nUtEPAE0GtlpxL7Pukszd7OGqZmJWzDW2Cux2RhsgJ4BbwN/J6zJBPKEA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-eu": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-eu/-/lang-eu-4.23.4.tgz", + "integrity": "sha512-3dX0GNUZxP5wlaQe+ydFeWg1mwyteo4M/J3ZGYFTzrTM88SZ4kSAAZaaAd4HmMZDRBBk2/6TiZ+FHMHuSGx7FQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-fa": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fa/-/lang-fa-4.23.4.tgz", + "integrity": "sha512-a3GKaFccnkHpEK4P5vYFm/+C/G4NdF6hY7xJLKPemju5GRmyAogGSV+BZi2VoC9v2egFO9vZGxy5wftnUjUwJg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-fi": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fi/-/lang-fi-4.23.4.tgz", + "integrity": "sha512-r1e0f3zIHm3DYgnq0FAQ++xQWpKtvZzHue4DrS/EYmuyR44TYJdlA2fb6bYYVXQIy9GEofVu/3b9o03oi88PoQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-fr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fr/-/lang-fr-4.23.4.tgz", + "integrity": "sha512-0ctG8YtzwBD7Vs4BFM5Tuwp1daVPZrIGqA5UEAJv5c2qvQ6dledt7bOfBa0jL0JNQRkkdKNmZXRrlX4FsaGJvg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ga": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ga/-/lang-ga-4.23.4.tgz", + "integrity": "sha512-F9z3l2qXDp6VgCfBZHp2cA4Yg+2RaKU/Hh2RBXwmKWyCqKoIiOgEQBEL84cRiB9q86axLhmJyKz935fD2F6xXQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-gl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-gl/-/lang-gl-4.23.4.tgz", + "integrity": "sha512-VSI02tEix2k1Z/dSM+P/LEIDldqkj3OMbbsX2xyp0vENzA11MC/LVQMApg90M1+8AJ6N6S0lPyqU7jLRKGLu/Q==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-hi": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hi/-/lang-hi-4.23.4.tgz", + "integrity": "sha512-2/gu2nS7hXdPD1e5ADyybSNAuOCD9JjRO8RoxCqYyCHfUk/Qf+/FZQpTHGJRfivf7tuqtyCw7tNYa1faaQkRHA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-hu": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hu/-/lang-hu-4.23.4.tgz", + "integrity": "sha512-jRjR2i1Lurl6GQL/XUu8kIq+kV6Sp9NDOA2g/pBbZv55WdD7RwreJtxP1HcYo1+NZTyPESLknZwTq9sXAGblkg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-hy": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hy/-/lang-hy-4.23.4.tgz", + "integrity": "sha512-wrV4NhFJY+eFtzQWcc64FAOclM85nk9lq2Z5APaXiRwZ0Sr4jm18N84GQ+4TeVCRDnck3ORtEkg1rCIwEiqFWA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-id": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-id/-/lang-id-4.23.4.tgz", + "integrity": "sha512-KNY2C3mucG/7u8apWwzQAkjel4cMYHWtkRu2YCjdaGN0i6mior5u/3ihNdk8pfHISBW5ERgCbvG7buQEhAl4WA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-it": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-it/-/lang-it-4.23.4.tgz", + "integrity": "sha512-8x6TTPRCJwjNcXSHJUUCXVo2y0XTUp5+Cn9l5PdEkpfdZJ0lMtmnjrYoCnzwo5kBYIObcZ6UxgjIGcwXldVHtA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ja": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ja/-/lang-ja-4.24.0.tgz", + "integrity": "sha512-a7bdoUKc6xZGla4yYPvQtYDDiixUKlOFrz4jdIqVeRsu4skKk5wrvvokMbfsvuGmdND4VgX+k8Cxs7zz4W76LQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "kuromoji": "^0.1.2" + } + }, + "node_modules/@nlpjs/lang-ko": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ko/-/lang-ko-4.23.4.tgz", + "integrity": "sha512-V0sgfR/xxxWf8GUO4ChGci9Z86r2eDaNB0CIAVHPxvtef6nWJXLDivyvpGMHbzEq00lNiJ+8OhZ/yTFA54ytvQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-lt": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-lt/-/lang-lt-4.23.4.tgz", + "integrity": "sha512-P+YqL0Rj+b0V2jnxeRmue/OH/bCC9XktCny9azcW7yAUzNTbob50CAkfWSBZIfcImABW+UJPe9IHPtnCrERWKg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ms": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ms/-/lang-ms-4.23.4.tgz", + "integrity": "sha512-poBO98nVKnzwOw2Kjj63L9YO72+7wiOslYrqXPsob3kCVbHAj0Ld7YE3L7jeIWUXbbDbTvw8CFzAWijRSfcYSg==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-id": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ne": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ne/-/lang-ne-4.23.4.tgz", + "integrity": "sha512-rzJw54gYrNrDBbWLiSCjMx4hhsOj9qBn6fQnw1WEI/KBNpxZ1qkpgoEp3Nli0dMOorECfLlIVzh1l4SLCNNKkA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-nl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-nl/-/lang-nl-4.23.4.tgz", + "integrity": "sha512-DIvzWpqfC4GTBxKxYuLLEAH5SAx8kBNLthPM4RngbHy4uhVrqQC7Hk+Ob1uN2glmAhrfGw0kwipvRI6gGahsYQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-no": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-no/-/lang-no-4.23.4.tgz", + "integrity": "sha512-2S/wQOsADJcA6AbeCRFkBk6R4lzk0mySzgau+fIn9wft881OT48iUG9HRKW07M5Ywxr8JJXp0HxBe6fxzaK1Fw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-pl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-pl/-/lang-pl-4.23.4.tgz", + "integrity": "sha512-auXqk5gfNT5r8k/yUBN3yIpTTO17uP8jWpGLK+BuGdfWfhOmPBGWR66+1OPC9OzSQAb2QODlhhUohP4uOdM3ag==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-pt": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-pt/-/lang-pt-4.23.4.tgz", + "integrity": "sha512-vlBQ037mQGlsNm/BTt40DpzSk46C03wTjpswZ+HyvAN+p+HXiaKNTbQjVBCVLudn/gAlbrC/UWamiMHg85C3fA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ro": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ro/-/lang-ro-4.23.4.tgz", + "integrity": "sha512-g3uZShS3t0Cp+DWCqL+bhMF1p8n83jxnGrPPthJZ3Yp4Phy0O1k9w4rU2dSDTFo2yL3crNfxHI67dxMkBk4+0g==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ru": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ru/-/lang-ru-4.23.4.tgz", + "integrity": "sha512-Zr4i2EoimvtKCOyjD/5Ym+/TWcLXVJwYIcgXQGzXjQjaYigWvZvsQxpBeAXPkqMsR6npdvemJkKPMB+GZvO9gQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-sl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sl/-/lang-sl-4.23.4.tgz", + "integrity": "sha512-/YDbAl0toDDb/7lHI0o9U8sG3mPcUShCStsudqTkfoaxU1nDI8ydAgOa38K8F6h5Z7Gotar1jpEKs8oerDPDMg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-sr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sr/-/lang-sr-4.23.4.tgz", + "integrity": "sha512-5QxIutDSbDIzNVPSVOX/BeeBvSxQR7SrlRp2oi+7ycukBVDYSzUT42M0/q11kAALMBSzxq7PGTaQHHGlssv6bw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-sv": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sv/-/lang-sv-4.23.4.tgz", + "integrity": "sha512-hAJjpfAZ7Y03l20RIC2mxiI1mlrdzUVPCLI01DOkmZ8+3uCTnuNacqVuOtpjXYazdG33xJ3ky8GaXroTgWnoCw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-ta": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ta/-/lang-ta-4.23.4.tgz", + "integrity": "sha512-F45cO4PsO4/8/BDLskD98tchdLhkptV5p4qUXQ0p9Mqmx+gKxsMmpnwNp6my062w2sgtx5wDz27q2nFWnMeSSA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-th": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-th/-/lang-th-4.23.4.tgz", + "integrity": "sha512-tTmKWk0R74NUjflmFPlLBZhhKkMixf6LEdPpKCOELamyfACAwrTTeHZEnpspaozoHZxfImVEKmaUJxte8drlgQ==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-tl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-tl/-/lang-tl-4.23.4.tgz", + "integrity": "sha512-CzbkLb+y2zEZ/e9Ynh2mU0knvVzRhcUoBw2PfjIkHNB+5DdzTWPWEcluKOWVptywh7+lCgjRC6hHiLAEKIHpqg==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-tr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-tr/-/lang-tr-4.23.4.tgz", + "integrity": "sha512-W4s/HhDNxfzAUD7b3WX3FBEeR7hen6Eh+D7hs+ABZ/7pObAoXpPzILVaQJntOl8NF55yFJPH9AddWMmJdm8QEA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-uk": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-uk/-/lang-uk-4.23.4.tgz", + "integrity": "sha512-QFDVI0WHzkiGjNw+0Yy9TVA+g25Q/M52sylQI4natvuaItDO+JVYwL0i6aNgKXi4U2aj3BBreqcVGZKKPxMR6A==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/lang-zh": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-zh/-/lang-zh-4.23.4.tgz", + "integrity": "sha512-BnH1gpm5j7YOjcEHRfZDlrQbL1AaNWJMSuNEqFrCVWCE0ENoZb0xfqXRTTfPgCzc8rF+ysxIeQsCmAxeQUZiPA==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/language": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/language/-/language-4.22.7.tgz", + "integrity": "sha512-oz5PrPwsIharMGRKZbcIkDtOko5tvynK/s765Wu7fgRHaILXT0ZoqNR/kNeo9BQCsTLV0GvFJreQ/UFy1XGZew==" + }, + "node_modules/@nlpjs/language-min": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/language-min/-/language-min-4.22.7.tgz", + "integrity": "sha512-kmA9u6onlMP1sdBS8Q7yJcFPLhDgrT0q9jSovVAW+WjZN3UmkMNsrgV35q1LWnbonTKnvb/NjdaN4VnT/+nuQw==" + }, + "node_modules/@nlpjs/ner": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/ner/-/ner-4.23.4.tgz", + "integrity": "sha512-B09dHq9rVjg3OGU+ZyzReQnBFzLYrik+u+mQzHI84mFGp3lxDejCDmCfFr04KQmqFGUZZ+Z9bohvK8MZ09JUMg==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/similarity": "^4.22.7" + } + }, + "node_modules/@nlpjs/neural": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/neural/-/neural-4.22.7.tgz", + "integrity": "sha512-sMWbuaEX5n7fuC8B8o5ueKZewA5Fu4JerBNcUzv3N5F7+SV59RFbZmDFfE+gXoF4/wwmkuZCRMV1arEut0vjoA==" + }, + "node_modules/@nlpjs/nlg": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/nlg/-/nlg-4.23.4.tgz", + "integrity": "sha512-qbdWkLv/LEw17Om+wS1pTcvpCxowTzM2wSr+cUcaGr1xqAcBfEhrQScUDnuehRZ2LohQSIzw5dC6klNTEwtQYw==", + "dependencies": { + "@nlpjs/core": "^4.23.4" + } + }, + "node_modules/@nlpjs/nlp": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/nlp/-/nlp-4.23.5.tgz", + "integrity": "sha512-ZsIXpS++dyq4L7z3AXSSJa27MUE/nsjYWpl7W4+Ghaj0PXf1bhmQkRsaL/b60/KsA0U+FobAX8F+nIlBIQkGxw==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/ner": "^4.23.4", + "@nlpjs/nlg": "^4.23.4", + "@nlpjs/nlu": "^4.23.5", + "@nlpjs/sentiment": "^4.23.4", + "@nlpjs/slot": "^4.22.17" + } + }, + "node_modules/@nlpjs/nlu": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/nlu/-/nlu-4.23.5.tgz", + "integrity": "sha512-3LLdmcE/W5yhKNvbYc+3rN32Asmg2zP6Ae2Blse7/AuKhiUIzVL/exLgvfEqDW9MqTKej5UZpYypMGUeK0HP6g==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/neural": "^4.22.7", + "@nlpjs/similarity": "^4.22.7" + } + }, + "node_modules/@nlpjs/request": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/request/-/request-4.22.7.tgz", + "integrity": "sha512-NvJsB8YjqsMM7JVILNwzRELV/lCyh8bMgXadl1kvXwXKgtmlplgJ095hKKzjkooMl+jemUtM5l/kqvaXGUi09w==", + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0" + } + }, + "node_modules/@nlpjs/sentiment": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/sentiment/-/sentiment-4.23.4.tgz", + "integrity": "sha512-4m1nsGbnehWX17MmT5g37CwkVrPivB5vnq6SnvvSHQU5oueg1qLGGXl+xkz0/pqyjmU4o8gO1FPsrQZuLeWe0g==", + "dependencies": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/neural": "^4.22.7" + } + }, + "node_modules/@nlpjs/similarity": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/similarity/-/similarity-4.22.7.tgz", + "integrity": "sha512-iWbZz6Yf0sXIiFi2jtdpsCLkOQsXFxT1YME4GysMtJxKiN/Cu4AhXugEiixhacPIPQb8lfouR0dQtSnx+9kW2A==" + }, + "node_modules/@nlpjs/slot": { + "version": "4.22.17", + "resolved": "https://registry.npmjs.org/@nlpjs/slot/-/slot-4.22.17.tgz", + "integrity": "sha512-cNYcxf9DKB+fnRa2NxT5wbWq5j57R1WCTXLWI/1Cyycr227IP7GN7qaD4RbkzotBFFB8wm63UHod9frzmuiXxg==" + }, + "node_modules/@nlpjs/xtables": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/xtables/-/xtables-4.23.5.tgz", + "integrity": "sha512-6e5mrm3OU1BE67UVlY6p8oP8AKHfFKUW0ENn936LxdgUlNWuZbaxinU4h5Mnby7sYSDUHhgZMvkmavJVZMgbwg==", + "dependencies": { + "xlsx": "^0.18.0" + } + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -927,6 +1561,14 @@ "node": ">=10" } }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -1385,6 +2027,14 @@ "node": ">=0.4.0" } }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -1967,6 +2617,18 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", @@ -2142,6 +2804,14 @@ "node": ">=0.10.0" } }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -2406,6 +3076,17 @@ "buffer": "^5.1.0" } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2638,6 +3319,11 @@ "node": ">=6" } }, + "node_modules/doublearray": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/doublearray/-/doublearray-0.0.2.tgz", + "integrity": "sha1-Yxhv6NNEEydtNiH2qg7F954ifvk=" + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -2828,6 +3514,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -2840,6 +3547,22 @@ "node": ">=4" } }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -3012,6 +3735,11 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -3213,6 +3941,14 @@ "node": ">= 0.6" } }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -3534,6 +4270,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -3717,6 +4458,40 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -4412,6 +5187,24 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "node_modules/kuromoji": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/kuromoji/-/kuromoji-0.1.2.tgz", + "integrity": "sha512-V0dUf+C2LpcPEXhoHLMAop/bOht16Dyr+mDiIE39yX3vqau7p80De/koFqpiTcL1zzdZlc3xuHZ8u5gjYRfFaQ==", + "dependencies": { + "async": "^2.0.1", + "doublearray": "0.0.2", + "zlibjs": "^0.3.1" + } + }, + "node_modules/kuromoji/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dependencies": { + "lodash": "^4.17.14" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -4420,6 +5213,18 @@ "node": ">=6" } }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -4440,6 +5245,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -4456,6 +5266,11 @@ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", @@ -4476,6 +5291,16 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, + "node_modules/lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" + }, + "node_modules/lodash.max": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", + "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" + }, "node_modules/lodash.mergewith": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", @@ -4486,6 +5311,21 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, + "node_modules/lodash.tonumber": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/lodash.tonumber/-/lodash.tonumber-4.0.3.tgz", + "integrity": "sha1-C5azGzVnJ5Prf1pj7nkfG56QJdk=" + }, + "node_modules/lodash.trimend": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha1-EoBENyhrmMrYmWt5QU4RMAEUCC8=" + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -5047,6 +5887,28 @@ "node": ">= 6.13.0" } }, + "node_modules/node-nlp": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/node-nlp/-/node-nlp-4.24.0.tgz", + "integrity": "sha512-AvP9yEcGMa8inZU79KhBeohAmZsr0i90ExlKT6LU+HdUsz3F4HV/uxO0BMhQN7e1NIFSjCXBvF1DCJ9jIK5cBw==", + "dependencies": { + "@nlpjs/builtin-duckling": "^4.23.4", + "@nlpjs/builtin-microsoft": "^4.23.4", + "@nlpjs/core-loader": "^4.23.4", + "@nlpjs/emoji": "^4.23.4", + "@nlpjs/evaluator": "^4.22.7", + "@nlpjs/lang-all": "^4.24.0", + "@nlpjs/language": "^4.22.7", + "@nlpjs/neural": "^4.22.7", + "@nlpjs/nlg": "^4.23.4", + "@nlpjs/nlp": "^4.23.5", + "@nlpjs/nlu": "^4.23.5", + "@nlpjs/request": "^4.22.7", + "@nlpjs/sentiment": "^4.23.4", + "@nlpjs/similarity": "^4.22.7", + "@nlpjs/xtables": "^4.23.5" + } + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5403,6 +6265,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -6050,6 +6928,14 @@ "node": ">=10" } }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/pretty-print-json": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/pretty-print-json/-/pretty-print-json-1.2.4.tgz", @@ -6869,7 +7755,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -6930,6 +7816,17 @@ "node": ">= 0.6" } }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -7400,6 +8297,17 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -7974,6 +8882,27 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/wink-sentiment": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/wink-sentiment/-/wink-sentiment-5.0.2.tgz", + "integrity": "sha512-+9SGTjPSfuCIRcIR9utD38DHmVPUFeIa0XJv3C1Qn8tLIfxJ1/WDSnzmmdML6IK1B2WwLOOisgaaAx0H9jOlCQ==", + "dependencies": { + "wink-tokenizer": "^5.2.1" + } + }, + "node_modules/wink-tokenizer": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/wink-tokenizer/-/wink-tokenizer-5.3.0.tgz", + "integrity": "sha512-O/yAw0g3FmSgeeQuYAJJfP7fVPB4A6ay0018qASh79aWmIOyPYy4j4r9EQT8xBjicja6lCLvgRVAybmEBaATQA==", + "dependencies": { + "emoji-regex": "^9.0.0" + } + }, + "node_modules/wink-tokenizer/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, "node_modules/winston": { "version": "3.3.3", "resolved": "git+ssh://git@github.com/FoxxMD/winston.git#fbab8de969ecee578981c77846156c7f43b5f01e", @@ -8115,6 +9044,30 @@ "node": ">= 6" } }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", @@ -8209,6 +9162,26 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "dependencies": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/xml2js": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", @@ -8392,6 +9365,14 @@ "engines": { "node": ">=0.2.0" } + }, + "node_modules/zlibjs": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.1.tgz", + "integrity": "sha1-UBl+2yihxCymWcyLTmqd3W1ERVQ=", + "engines": { + "node": "*" + } } }, "dependencies": { @@ -8890,6 +9871,613 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@microsoft/recognizers-text": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text/-/recognizers-text-1.3.0.tgz", + "integrity": "sha512-0gUhtS/0qSF6veB3Olu55IuJ0Skwg4u1IbJX9KFj1QeK8z6cw69/p637IPD2NgXLlXCy2HEqLvUW/mgbDp3rWg==" + }, + "@microsoft/recognizers-text-choice": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-choice/-/recognizers-text-choice-1.3.0.tgz", + "integrity": "sha512-I2LQAJJ9TJthJYWZNzooJD6+5KUkr+H+m54XpjY+vKjR81DPVFUL/SWZVyv+cC7eePFwrDv3gUnkXYS+Lp0hmA==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "grapheme-splitter": "^1.0.2" + } + }, + "@microsoft/recognizers-text-data-types-timex-expression": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-data-types-timex-expression/-/recognizers-text-data-types-timex-expression-1.3.0.tgz", + "integrity": "sha512-REHUXmMUI1jL3b9v+aSdzKxLxRdejsfg9McYRxY3LW0Gu4UbwD7Q+K6mtSo40cwg8uh6fiV9GY8hDuKXHH6dVA==" + }, + "@microsoft/recognizers-text-date-time": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-date-time/-/recognizers-text-date-time-1.3.0.tgz", + "integrity": "sha512-bgw4TS726maTg53M6SQRHQOzOH0za0zmBWnnGo0wQdbDfK+bgq5aeDSD4k/HhXvfkOD6zzRd3+tG3Dqyp/kFaQ==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "@microsoft/recognizers-text-number-with-unit": "~1.3.0", + "lodash.isequal": "^4.5.0", + "lodash.tonumber": "^4.0.3" + } + }, + "@microsoft/recognizers-text-number": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-number/-/recognizers-text-number-1.3.0.tgz", + "integrity": "sha512-KVFxvaXW9E7UkuF0EYCghvCn0u+N5L7bBXeP4IKB6fXkQd6GAZ9zNA2Acdm9lJzCRxcsBYFbRLcRMrPHwAa32w==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "bignumber.js": "^7.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.sortby": "^4.7.0", + "lodash.trimend": "^4.5.1" + }, + "dependencies": { + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" + } + } + }, + "@microsoft/recognizers-text-number-with-unit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-number-with-unit/-/recognizers-text-number-with-unit-1.3.0.tgz", + "integrity": "sha512-FxBD1ZQLvr4c+ssVyqUjblg+i21GbzIsDEHd5VWon5wg+2qrqixlmP1mXsXG+iGRV3qqeZCtTFdqkwJ3MWhovA==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.last": "^3.0.0", + "lodash.max": "^4.0.1" + } + }, + "@microsoft/recognizers-text-sequence": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-sequence/-/recognizers-text-sequence-1.3.0.tgz", + "integrity": "sha512-LXZ9AakClrdPVfEphCJFETjw6n8w/LwW1Yoj9ZKcGI9PGvH6RR+haS4GSZuHeMhEacmaa3NkzD+I44qYIvym8Q==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "grapheme-splitter": "^1.0.2" + } + }, + "@microsoft/recognizers-text-suite": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-suite/-/recognizers-text-suite-1.3.0.tgz", + "integrity": "sha512-uqG4vzy5N2CmBaeINny0bLdnGp0jDbT1moNoLC+Yim3G8kHOU9lpDfwA6VN6HTYaDM5854SNMEzLjJdS1TPFTw==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-choice": "~1.3.0", + "@microsoft/recognizers-text-data-types-timex-expression": "~1.3.0", + "@microsoft/recognizers-text-date-time": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "@microsoft/recognizers-text-number-with-unit": "~1.3.0", + "@microsoft/recognizers-text-sequence": "~1.3.0" + } + }, + "@nlpjs/builtin-duckling": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/builtin-duckling/-/builtin-duckling-4.23.4.tgz", + "integrity": "sha512-GYaXX0cDOFg7KTJT3nOEZvWiG31yacw2f5Wjq+VrATv1iNertbrqp3lJahGp+it3oj4len4GyDS/PhI5SqS+9g==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/builtin-microsoft": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/builtin-microsoft/-/builtin-microsoft-4.23.4.tgz", + "integrity": "sha512-Ihdd6HHPoFql1CGhcUvjxBKjTvDyDL9Zgi5xGJwCZ/w5LGhDTa4cAZG1GSaaR2RxOi5r1Q0H2GI+EAK3ZRz3eA==", + "requires": { + "@microsoft/recognizers-text-suite": "1.3.0", + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/core": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/core/-/core-4.23.4.tgz", + "integrity": "sha512-iIQHCqYcUYxOk2LRa2shgMdZ1jdvuLqU9OaR1raOI+Hl5RDCoIpmnEFUTFYcBjGWbrXJZwjoQBnLsNMe81ZTZg==" + }, + "@nlpjs/core-loader": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/core-loader/-/core-loader-4.23.4.tgz", + "integrity": "sha512-s58cu+gI+kPRG6r2ayK+B4++OHdTHA6SFLLxQ42JzdmY6rsEa1yEjMzICc14+zuye1qWelp8oYf5AqmzlVNdug==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/request": "^4.22.7" + } + }, + "@nlpjs/emoji": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/emoji/-/emoji-4.23.4.tgz", + "integrity": "sha512-n7mk0TbvsaAupom9cRdUv/WfKorhVJi4/6jMso8n35kYapA4nDSuba4oqmt4siqjlt0++a89Dcx21ZiBxHIRow==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/evaluator": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/evaluator/-/evaluator-4.22.7.tgz", + "integrity": "sha512-gujkMpCfdjuqn14gJklHe8NBqSIGGcNNg2BA/Ag50BT+VRsTCBeEib57Cf/SgG/JjTTBERaAQ3SxvxghLmMDpA==", + "requires": { + "escodegen": "^2.0.0", + "esprima": "^4.0.1" + } + }, + "@nlpjs/lang-all": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-all/-/lang-all-4.24.0.tgz", + "integrity": "sha512-kD7WchbHoMozbMBER9sKqkPUjKiXtdHEtsRdX4z0BZ0J+Thr+deoxNQZXQvuFH61MhYCfIPi8vNSKFvFODu1Zg==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-ar": "^4.23.4", + "@nlpjs/lang-bn": "^4.23.4", + "@nlpjs/lang-ca": "^4.23.4", + "@nlpjs/lang-cs": "^4.23.4", + "@nlpjs/lang-da": "^4.23.4", + "@nlpjs/lang-de": "^4.23.4", + "@nlpjs/lang-el": "^4.23.4", + "@nlpjs/lang-en": "^4.23.4", + "@nlpjs/lang-es": "^4.23.4", + "@nlpjs/lang-eu": "^4.23.4", + "@nlpjs/lang-fa": "^4.23.4", + "@nlpjs/lang-fi": "^4.23.4", + "@nlpjs/lang-fr": "^4.23.4", + "@nlpjs/lang-ga": "^4.23.4", + "@nlpjs/lang-gl": "^4.23.4", + "@nlpjs/lang-hi": "^4.23.4", + "@nlpjs/lang-hu": "^4.23.4", + "@nlpjs/lang-hy": "^4.23.4", + "@nlpjs/lang-id": "^4.23.4", + "@nlpjs/lang-it": "^4.23.4", + "@nlpjs/lang-ja": "^4.24.0", + "@nlpjs/lang-ko": "^4.23.4", + "@nlpjs/lang-lt": "^4.23.4", + "@nlpjs/lang-ms": "^4.23.4", + "@nlpjs/lang-ne": "^4.23.4", + "@nlpjs/lang-nl": "^4.23.4", + "@nlpjs/lang-no": "^4.23.4", + "@nlpjs/lang-pl": "^4.23.4", + "@nlpjs/lang-pt": "^4.23.4", + "@nlpjs/lang-ro": "^4.23.4", + "@nlpjs/lang-ru": "^4.23.4", + "@nlpjs/lang-sl": "^4.23.4", + "@nlpjs/lang-sr": "^4.23.4", + "@nlpjs/lang-sv": "^4.23.4", + "@nlpjs/lang-ta": "^4.23.4", + "@nlpjs/lang-th": "^4.23.4", + "@nlpjs/lang-tl": "^4.23.4", + "@nlpjs/lang-tr": "^4.23.4", + "@nlpjs/lang-uk": "^4.23.4", + "@nlpjs/lang-zh": "^4.23.4", + "@nlpjs/language": "^4.22.7" + } + }, + "@nlpjs/lang-ar": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ar/-/lang-ar-4.23.4.tgz", + "integrity": "sha512-x/pax8lXS3RPj4dsw0Q7JK9zefJHDtmweKBsT/C2sbySkm9ml2xD65CeHopl2jdy1X73r2fNgFflfEXr5zM3rQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-bn": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-bn/-/lang-bn-4.23.4.tgz", + "integrity": "sha512-EwNohVRyqJeSM1JQnVQIufLpAtBkNtqa1FipHai4O+fxUlud4ujR4HF6uXYaCn2I46LgyiDbYPHSjI2bp3h/lQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ca": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ca/-/lang-ca-4.23.4.tgz", + "integrity": "sha512-9+ljf2dqFurUjTR0XwOsmDoIvJhyD/1c2m7DVwoz5hTv3HFzv0tuJOsLtLb19qo5rWd+hAabte4e2vEImMiJxw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-cs": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-cs/-/lang-cs-4.23.4.tgz", + "integrity": "sha512-m1A0e45nTttgX7ZnaYw4z47Il9g3C52cd4KbOFsbc9iJvNp52qOTeS9SrTkdRr9i0tIRQYQoqj25r6Wlh59Adw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-da": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-da/-/lang-da-4.23.4.tgz", + "integrity": "sha512-U/lS/SvEmYWpmU431n/0Nn70ar/EKeuRIkBCVLBILpF4dUtCgmj0b7YVGZOlplputUIqKVqadvWkVUndZPDEtQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-de": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-de/-/lang-de-4.23.4.tgz", + "integrity": "sha512-qTdoVN+ZyLEALl/791LZG9fToLT4eCk1kg5DL/GGe0pmr7vzqQiVL7ac5uUGwyE1jI9ymr96Ipu6oWwWAEx3/w==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-el": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-el/-/lang-el-4.23.4.tgz", + "integrity": "sha512-oztT3iO/pZ2+zdDrSvcP7XpLWskiiW/EH56Uz0U2aLVHzFzUYgc4o1QNqcBnF0D0mJEYWSgA6gS1IufupNViug==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-en": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-en/-/lang-en-4.23.4.tgz", + "integrity": "sha512-sPSP8C1miTyrpRtS2I5mQekScVAY1U/514A4VgMtwQi8Be0dc1mnR2lY3RcdWC0DhcwUxq3fXSn7JYGufjzl6Q==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-en-min": "^4.23.4" + } + }, + "@nlpjs/lang-en-min": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-en-min/-/lang-en-min-4.23.4.tgz", + "integrity": "sha512-jQ5LlrSLMtR00gYKNgz+FHw2Pt9EmNDeUC+5cl5lO17hfyGA05C1UnvsdA3Q6LJFEqnD8DDyR3PMloqIhDAA0w==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-es": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-es/-/lang-es-4.23.4.tgz", + "integrity": "sha512-5me9OOx2kA+W/984v5LJONzYIXgg2nUtEPAE0GtlpxL7Pukszd7OGqZmJWzDW2Cux2RhsgJ4BbwN/J6zJBPKEA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-eu": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-eu/-/lang-eu-4.23.4.tgz", + "integrity": "sha512-3dX0GNUZxP5wlaQe+ydFeWg1mwyteo4M/J3ZGYFTzrTM88SZ4kSAAZaaAd4HmMZDRBBk2/6TiZ+FHMHuSGx7FQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-fa": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fa/-/lang-fa-4.23.4.tgz", + "integrity": "sha512-a3GKaFccnkHpEK4P5vYFm/+C/G4NdF6hY7xJLKPemju5GRmyAogGSV+BZi2VoC9v2egFO9vZGxy5wftnUjUwJg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-fi": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fi/-/lang-fi-4.23.4.tgz", + "integrity": "sha512-r1e0f3zIHm3DYgnq0FAQ++xQWpKtvZzHue4DrS/EYmuyR44TYJdlA2fb6bYYVXQIy9GEofVu/3b9o03oi88PoQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-fr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-fr/-/lang-fr-4.23.4.tgz", + "integrity": "sha512-0ctG8YtzwBD7Vs4BFM5Tuwp1daVPZrIGqA5UEAJv5c2qvQ6dledt7bOfBa0jL0JNQRkkdKNmZXRrlX4FsaGJvg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ga": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ga/-/lang-ga-4.23.4.tgz", + "integrity": "sha512-F9z3l2qXDp6VgCfBZHp2cA4Yg+2RaKU/Hh2RBXwmKWyCqKoIiOgEQBEL84cRiB9q86axLhmJyKz935fD2F6xXQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-gl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-gl/-/lang-gl-4.23.4.tgz", + "integrity": "sha512-VSI02tEix2k1Z/dSM+P/LEIDldqkj3OMbbsX2xyp0vENzA11MC/LVQMApg90M1+8AJ6N6S0lPyqU7jLRKGLu/Q==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-hi": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hi/-/lang-hi-4.23.4.tgz", + "integrity": "sha512-2/gu2nS7hXdPD1e5ADyybSNAuOCD9JjRO8RoxCqYyCHfUk/Qf+/FZQpTHGJRfivf7tuqtyCw7tNYa1faaQkRHA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-hu": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hu/-/lang-hu-4.23.4.tgz", + "integrity": "sha512-jRjR2i1Lurl6GQL/XUu8kIq+kV6Sp9NDOA2g/pBbZv55WdD7RwreJtxP1HcYo1+NZTyPESLknZwTq9sXAGblkg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-hy": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-hy/-/lang-hy-4.23.4.tgz", + "integrity": "sha512-wrV4NhFJY+eFtzQWcc64FAOclM85nk9lq2Z5APaXiRwZ0Sr4jm18N84GQ+4TeVCRDnck3ORtEkg1rCIwEiqFWA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-id": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-id/-/lang-id-4.23.4.tgz", + "integrity": "sha512-KNY2C3mucG/7u8apWwzQAkjel4cMYHWtkRu2YCjdaGN0i6mior5u/3ihNdk8pfHISBW5ERgCbvG7buQEhAl4WA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-it": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-it/-/lang-it-4.23.4.tgz", + "integrity": "sha512-8x6TTPRCJwjNcXSHJUUCXVo2y0XTUp5+Cn9l5PdEkpfdZJ0lMtmnjrYoCnzwo5kBYIObcZ6UxgjIGcwXldVHtA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ja": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ja/-/lang-ja-4.24.0.tgz", + "integrity": "sha512-a7bdoUKc6xZGla4yYPvQtYDDiixUKlOFrz4jdIqVeRsu4skKk5wrvvokMbfsvuGmdND4VgX+k8Cxs7zz4W76LQ==", + "requires": { + "@nlpjs/core": "^4.23.4", + "kuromoji": "^0.1.2" + } + }, + "@nlpjs/lang-ko": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ko/-/lang-ko-4.23.4.tgz", + "integrity": "sha512-V0sgfR/xxxWf8GUO4ChGci9Z86r2eDaNB0CIAVHPxvtef6nWJXLDivyvpGMHbzEq00lNiJ+8OhZ/yTFA54ytvQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-lt": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-lt/-/lang-lt-4.23.4.tgz", + "integrity": "sha512-P+YqL0Rj+b0V2jnxeRmue/OH/bCC9XktCny9azcW7yAUzNTbob50CAkfWSBZIfcImABW+UJPe9IHPtnCrERWKg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ms": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ms/-/lang-ms-4.23.4.tgz", + "integrity": "sha512-poBO98nVKnzwOw2Kjj63L9YO72+7wiOslYrqXPsob3kCVbHAj0Ld7YE3L7jeIWUXbbDbTvw8CFzAWijRSfcYSg==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/lang-id": "^4.23.4" + } + }, + "@nlpjs/lang-ne": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ne/-/lang-ne-4.23.4.tgz", + "integrity": "sha512-rzJw54gYrNrDBbWLiSCjMx4hhsOj9qBn6fQnw1WEI/KBNpxZ1qkpgoEp3Nli0dMOorECfLlIVzh1l4SLCNNKkA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-nl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-nl/-/lang-nl-4.23.4.tgz", + "integrity": "sha512-DIvzWpqfC4GTBxKxYuLLEAH5SAx8kBNLthPM4RngbHy4uhVrqQC7Hk+Ob1uN2glmAhrfGw0kwipvRI6gGahsYQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-no": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-no/-/lang-no-4.23.4.tgz", + "integrity": "sha512-2S/wQOsADJcA6AbeCRFkBk6R4lzk0mySzgau+fIn9wft881OT48iUG9HRKW07M5Ywxr8JJXp0HxBe6fxzaK1Fw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-pl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-pl/-/lang-pl-4.23.4.tgz", + "integrity": "sha512-auXqk5gfNT5r8k/yUBN3yIpTTO17uP8jWpGLK+BuGdfWfhOmPBGWR66+1OPC9OzSQAb2QODlhhUohP4uOdM3ag==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-pt": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-pt/-/lang-pt-4.23.4.tgz", + "integrity": "sha512-vlBQ037mQGlsNm/BTt40DpzSk46C03wTjpswZ+HyvAN+p+HXiaKNTbQjVBCVLudn/gAlbrC/UWamiMHg85C3fA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ro": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ro/-/lang-ro-4.23.4.tgz", + "integrity": "sha512-g3uZShS3t0Cp+DWCqL+bhMF1p8n83jxnGrPPthJZ3Yp4Phy0O1k9w4rU2dSDTFo2yL3crNfxHI67dxMkBk4+0g==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ru": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ru/-/lang-ru-4.23.4.tgz", + "integrity": "sha512-Zr4i2EoimvtKCOyjD/5Ym+/TWcLXVJwYIcgXQGzXjQjaYigWvZvsQxpBeAXPkqMsR6npdvemJkKPMB+GZvO9gQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-sl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sl/-/lang-sl-4.23.4.tgz", + "integrity": "sha512-/YDbAl0toDDb/7lHI0o9U8sG3mPcUShCStsudqTkfoaxU1nDI8ydAgOa38K8F6h5Z7Gotar1jpEKs8oerDPDMg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-sr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sr/-/lang-sr-4.23.4.tgz", + "integrity": "sha512-5QxIutDSbDIzNVPSVOX/BeeBvSxQR7SrlRp2oi+7ycukBVDYSzUT42M0/q11kAALMBSzxq7PGTaQHHGlssv6bw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-sv": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-sv/-/lang-sv-4.23.4.tgz", + "integrity": "sha512-hAJjpfAZ7Y03l20RIC2mxiI1mlrdzUVPCLI01DOkmZ8+3uCTnuNacqVuOtpjXYazdG33xJ3ky8GaXroTgWnoCw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-ta": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-ta/-/lang-ta-4.23.4.tgz", + "integrity": "sha512-F45cO4PsO4/8/BDLskD98tchdLhkptV5p4qUXQ0p9Mqmx+gKxsMmpnwNp6my062w2sgtx5wDz27q2nFWnMeSSA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-th": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-th/-/lang-th-4.23.4.tgz", + "integrity": "sha512-tTmKWk0R74NUjflmFPlLBZhhKkMixf6LEdPpKCOELamyfACAwrTTeHZEnpspaozoHZxfImVEKmaUJxte8drlgQ==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-tl": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-tl/-/lang-tl-4.23.4.tgz", + "integrity": "sha512-CzbkLb+y2zEZ/e9Ynh2mU0knvVzRhcUoBw2PfjIkHNB+5DdzTWPWEcluKOWVptywh7+lCgjRC6hHiLAEKIHpqg==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-tr": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-tr/-/lang-tr-4.23.4.tgz", + "integrity": "sha512-W4s/HhDNxfzAUD7b3WX3FBEeR7hen6Eh+D7hs+ABZ/7pObAoXpPzILVaQJntOl8NF55yFJPH9AddWMmJdm8QEA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-uk": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-uk/-/lang-uk-4.23.4.tgz", + "integrity": "sha512-QFDVI0WHzkiGjNw+0Yy9TVA+g25Q/M52sylQI4natvuaItDO+JVYwL0i6aNgKXi4U2aj3BBreqcVGZKKPxMR6A==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/lang-zh": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/lang-zh/-/lang-zh-4.23.4.tgz", + "integrity": "sha512-BnH1gpm5j7YOjcEHRfZDlrQbL1AaNWJMSuNEqFrCVWCE0ENoZb0xfqXRTTfPgCzc8rF+ysxIeQsCmAxeQUZiPA==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/language": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/language/-/language-4.22.7.tgz", + "integrity": "sha512-oz5PrPwsIharMGRKZbcIkDtOko5tvynK/s765Wu7fgRHaILXT0ZoqNR/kNeo9BQCsTLV0GvFJreQ/UFy1XGZew==" + }, + "@nlpjs/language-min": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/language-min/-/language-min-4.22.7.tgz", + "integrity": "sha512-kmA9u6onlMP1sdBS8Q7yJcFPLhDgrT0q9jSovVAW+WjZN3UmkMNsrgV35q1LWnbonTKnvb/NjdaN4VnT/+nuQw==" + }, + "@nlpjs/ner": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/ner/-/ner-4.23.4.tgz", + "integrity": "sha512-B09dHq9rVjg3OGU+ZyzReQnBFzLYrik+u+mQzHI84mFGp3lxDejCDmCfFr04KQmqFGUZZ+Z9bohvK8MZ09JUMg==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/similarity": "^4.22.7" + } + }, + "@nlpjs/neural": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/neural/-/neural-4.22.7.tgz", + "integrity": "sha512-sMWbuaEX5n7fuC8B8o5ueKZewA5Fu4JerBNcUzv3N5F7+SV59RFbZmDFfE+gXoF4/wwmkuZCRMV1arEut0vjoA==" + }, + "@nlpjs/nlg": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/nlg/-/nlg-4.23.4.tgz", + "integrity": "sha512-qbdWkLv/LEw17Om+wS1pTcvpCxowTzM2wSr+cUcaGr1xqAcBfEhrQScUDnuehRZ2LohQSIzw5dC6klNTEwtQYw==", + "requires": { + "@nlpjs/core": "^4.23.4" + } + }, + "@nlpjs/nlp": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/nlp/-/nlp-4.23.5.tgz", + "integrity": "sha512-ZsIXpS++dyq4L7z3AXSSJa27MUE/nsjYWpl7W4+Ghaj0PXf1bhmQkRsaL/b60/KsA0U+FobAX8F+nIlBIQkGxw==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/ner": "^4.23.4", + "@nlpjs/nlg": "^4.23.4", + "@nlpjs/nlu": "^4.23.5", + "@nlpjs/sentiment": "^4.23.4", + "@nlpjs/slot": "^4.22.17" + } + }, + "@nlpjs/nlu": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/nlu/-/nlu-4.23.5.tgz", + "integrity": "sha512-3LLdmcE/W5yhKNvbYc+3rN32Asmg2zP6Ae2Blse7/AuKhiUIzVL/exLgvfEqDW9MqTKej5UZpYypMGUeK0HP6g==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/neural": "^4.22.7", + "@nlpjs/similarity": "^4.22.7" + } + }, + "@nlpjs/request": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/request/-/request-4.22.7.tgz", + "integrity": "sha512-NvJsB8YjqsMM7JVILNwzRELV/lCyh8bMgXadl1kvXwXKgtmlplgJ095hKKzjkooMl+jemUtM5l/kqvaXGUi09w==", + "requires": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0" + } + }, + "@nlpjs/sentiment": { + "version": "4.23.4", + "resolved": "https://registry.npmjs.org/@nlpjs/sentiment/-/sentiment-4.23.4.tgz", + "integrity": "sha512-4m1nsGbnehWX17MmT5g37CwkVrPivB5vnq6SnvvSHQU5oueg1qLGGXl+xkz0/pqyjmU4o8gO1FPsrQZuLeWe0g==", + "requires": { + "@nlpjs/core": "^4.23.4", + "@nlpjs/language-min": "^4.22.7", + "@nlpjs/neural": "^4.22.7" + } + }, + "@nlpjs/similarity": { + "version": "4.22.7", + "resolved": "https://registry.npmjs.org/@nlpjs/similarity/-/similarity-4.22.7.tgz", + "integrity": "sha512-iWbZz6Yf0sXIiFi2jtdpsCLkOQsXFxT1YME4GysMtJxKiN/Cu4AhXugEiixhacPIPQb8lfouR0dQtSnx+9kW2A==" + }, + "@nlpjs/slot": { + "version": "4.22.17", + "resolved": "https://registry.npmjs.org/@nlpjs/slot/-/slot-4.22.17.tgz", + "integrity": "sha512-cNYcxf9DKB+fnRa2NxT5wbWq5j57R1WCTXLWI/1Cyycr227IP7GN7qaD4RbkzotBFFB8wm63UHod9frzmuiXxg==" + }, + "@nlpjs/xtables": { + "version": "4.23.5", + "resolved": "https://registry.npmjs.org/@nlpjs/xtables/-/xtables-4.23.5.tgz", + "integrity": "sha512-6e5mrm3OU1BE67UVlY6p8oP8AKHfFKUW0ENn936LxdgUlNWuZbaxinU4h5Mnby7sYSDUHhgZMvkmavJVZMgbwg==", + "requires": { + "xlsx": "^0.18.0" + } + }, "@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -8944,6 +10532,11 @@ "defer-to-connect": "^2.0.0" } }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, "@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -9386,6 +10979,11 @@ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "devOptional": true }, + "adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==" + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -9820,6 +11418,15 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "requires": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + } + }, "chai": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", @@ -9949,6 +11556,11 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, + "codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==" + }, "color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -10171,6 +11783,11 @@ "buffer": "^5.1.0" } }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -10331,6 +11948,11 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" }, + "doublearray": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/doublearray/-/doublearray-0.0.2.tgz", + "integrity": "sha1-Yxhv6NNEEydtNiH2qg7F954ifvk=" + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -10470,11 +12092,33 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -10625,6 +12269,11 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, "fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -10778,6 +12427,11 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, + "frac": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==" + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -11012,6 +12666,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -11147,6 +12806,31 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -11678,11 +13362,40 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "kuromoji": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/kuromoji/-/kuromoji-0.1.2.tgz", + "integrity": "sha512-V0dUf+C2LpcPEXhoHLMAop/bOht16Dyr+mDiIE39yX3vqau7p80De/koFqpiTcL1zzdZlc3xuHZ8u5gjYRfFaQ==", + "requires": { + "async": "^2.0.1", + "doublearray": "0.0.2", + "zlibjs": "^0.3.1" + }, + "dependencies": { + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "requires": { + "lodash": "^4.17.14" + } + } + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -11697,6 +13410,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -11713,6 +13431,11 @@ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", @@ -11733,6 +13456,16 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, + "lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" + }, + "lodash.max": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", + "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" + }, "lodash.mergewith": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", @@ -11743,6 +13476,21 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, + "lodash.tonumber": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/lodash.tonumber/-/lodash.tonumber-4.0.3.tgz", + "integrity": "sha1-C5azGzVnJ5Prf1pj7nkfG56QJdk=" + }, + "lodash.trimend": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha1-EoBENyhrmMrYmWt5QU4RMAEUCC8=" + }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -12159,6 +13907,28 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" }, + "node-nlp": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/node-nlp/-/node-nlp-4.24.0.tgz", + "integrity": "sha512-AvP9yEcGMa8inZU79KhBeohAmZsr0i90ExlKT6LU+HdUsz3F4HV/uxO0BMhQN7e1NIFSjCXBvF1DCJ9jIK5cBw==", + "requires": { + "@nlpjs/builtin-duckling": "^4.23.4", + "@nlpjs/builtin-microsoft": "^4.23.4", + "@nlpjs/core-loader": "^4.23.4", + "@nlpjs/emoji": "^4.23.4", + "@nlpjs/evaluator": "^4.22.7", + "@nlpjs/lang-all": "^4.24.0", + "@nlpjs/language": "^4.22.7", + "@nlpjs/neural": "^4.22.7", + "@nlpjs/nlg": "^4.23.4", + "@nlpjs/nlp": "^4.23.5", + "@nlpjs/nlu": "^4.23.5", + "@nlpjs/request": "^4.22.7", + "@nlpjs/sentiment": "^4.23.4", + "@nlpjs/similarity": "^4.22.7", + "@nlpjs/xtables": "^4.23.5" + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -12433,6 +14203,19 @@ "is-wsl": "^2.1.1" } }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -12911,6 +14694,11 @@ "tunnel-agent": "^0.6.0" } }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, "pretty-print-json": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/pretty-print-json/-/pretty-print-json-1.2.4.tgz", @@ -13527,7 +15315,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "devOptional": true }, "source-map-support": { "version": "0.5.21", @@ -13576,6 +15364,14 @@ "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", "optional": true }, + "ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "requires": { + "frac": "~1.1.2" + } + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -13935,6 +15731,14 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -14304,6 +16108,29 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "wink-sentiment": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/wink-sentiment/-/wink-sentiment-5.0.2.tgz", + "integrity": "sha512-+9SGTjPSfuCIRcIR9utD38DHmVPUFeIa0XJv3C1Qn8tLIfxJ1/WDSnzmmdML6IK1B2WwLOOisgaaAx0H9jOlCQ==", + "requires": { + "wink-tokenizer": "^5.2.1" + } + }, + "wink-tokenizer": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/wink-tokenizer/-/wink-tokenizer-5.3.0.tgz", + "integrity": "sha512-O/yAw0g3FmSgeeQuYAJJfP7fVPB4A6ay0018qASh79aWmIOyPYy4j4r9EQT8xBjicja6lCLvgRVAybmEBaATQA==", + "requires": { + "emoji-regex": "^9.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + } + } + }, "winston": { "version": "git+ssh://git@github.com/FoxxMD/winston.git#fbab8de969ecee578981c77846156c7f43b5f01e", "integrity": "sha512-OnunfctuocKBmG0uzkBkVYGSW13VYmzglQPwj4ZFOBEtV2e2ECqe65eCaYRYHSvKynGc8T5hiaEWAVR2hVj+Yg==", @@ -14420,6 +16247,21 @@ } } }, + "wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==" + }, + "word": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==" + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, "workerpool": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", @@ -14500,6 +16342,20 @@ } } }, + "xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "requires": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + } + }, "xml2js": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", @@ -14626,6 +16482,11 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/zlib/-/zlib-1.0.5.tgz", "integrity": "sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=" + }, + "zlibjs": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.1.tgz", + "integrity": "sha1-UBl+2yihxCymWcyLTmqd3W1ERVQ=" } } } diff --git a/package.json b/package.json index c835a23..3650e2f 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "mustache": "^4.2.0", "nanoid": "^3.3.1", "node-fetch": "^2.6.1", + "node-nlp": "^4.24.0", "normalize-url": "^6.1.0", "object-hash": "^2.2.0", "p-event": "^4.2.0", @@ -92,6 +93,7 @@ "typescript": "^4.3.4", "vader-sentiment": "^1.1.3", "webhook-discord": "^3.7.7", + "wink-sentiment": "^5.0.2", "winston": "github:FoxxMD/winston#fbab8de969ecee578981c77846156c7f43b5f01e", "winston-daily-rotate-file": "^4.5.5", "winston-duplex": "^0.1.1", diff --git a/src/Common/Infrastructure/Atomic.ts b/src/Common/Infrastructure/Atomic.ts index 530acdd..2398ace 100644 --- a/src/Common/Infrastructure/Atomic.ts +++ b/src/Common/Infrastructure/Atomic.ts @@ -190,29 +190,40 @@ export type ActionTypes = /** * Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language * - * Sentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5: + * Sentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1: * - * * -0.5 => extremely negative - * * -0.2 => very negative - * * -0.5 => negative + * * -0.6 => extremely negative + * * -0.3 => very negative + * * -0.1 => negative * * 0 => neutral - * * 0.05 => positive - * * 0.2 => very positive - * * 0.5 => extremely positive + * * 0.1 => positive + * * 0.3 => very positive + * * 0.6 => extremely positive * * The below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge) * - * * `>= 0.05` = `is positive` - * * `<= 0.2` = `is very negative` - * * `< 0.05` = `is not positive` - * * `> -0.2` = `is not very negative` + * * `>= 0.1` = `is positive` + * * `<= 0.3` = `is very negative` + * * `< 0.1` = `is not positive` + * * `> -0.3` = `is not very negative` * * Special case: * - * * `is neutral` equates to `> -0.5 and < 0.5` - * * `is not neutral` equates to `< -0.5 or > 0.5` + * * `is neutral` equates to `> -0.1 and < 0.1` + * * `is not neutral` equates to `< -0.1 or > 0.1` * - * More about VADER Sentiment: https://github.com/cjhutto/vaderSentiment + * ContextMod uses a normalized, weighted average from these sentiment tools: + * + * * NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md + * * (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/ + * * (english only) wink-sentiment https://github.com/winkjs/wink-sentiment + * + * More about the sentiment algorithms used: + * * VADER https://github.com/cjhutto/vaderSentiment + * * AFINN http://corpustext.com/reference/sentiment_afinn.html + * * Senticon https://ieeexplore.ieee.org/document/8721408 + * * Pattern https://github.com/clips/pattern + * * wink https://github.com/winkjs/wink-sentiment * * @pattern ((>|>=|<|<=)\s*(-?\d?\.?\d+))|((not)?\s*(very|extremely)?\s*(positive|neutral|negative)) * @examples ["is negative", "> 0.2"] diff --git a/src/Common/LangaugeProcessing.ts b/src/Common/LangaugeProcessing.ts new file mode 100644 index 0000000..9542c57 --- /dev/null +++ b/src/Common/LangaugeProcessing.ts @@ -0,0 +1,267 @@ +import {Language, SentimentManager} from 'node-nlp'; +import {SentimentIntensityAnalyzer} from 'vader-sentiment'; +import wink from 'wink-sentiment'; +import {SnoowrapActivity} from "./Infrastructure/Reddit"; +import { + asGenericComparison, + GenericComparison, + parseGenericValueComparison, + RangedComparison +} from "./Infrastructure/Comparisons"; +import {asSubmission, between, comparisonTextOp} from "../util"; +import {CMError, MaybeSeriousErrorWithCause} from "../Utils/Errors"; +import InvalidRegexError from "../Utils/InvalidRegexError"; +import {StringOperator} from "./Infrastructure/Atomic"; + +export type SentimentAnalysisType = 'vader' | 'afinn' | 'senticon' | 'pattern' | 'wink'; + +export const sentimentQuantifier = { + 'extremely negative': -0.6, + 'very negative': -0.3, + 'negative': -0.1, + 'neutral': 0, + 'positive': 0.1, + 'very positive': 0.3, + 'extremely positive': 0.6, +} + +export const sentimentQuantifierRanges = [ + { + range: [Number.MIN_SAFE_INTEGER, -0.6], + quant: 'extremely negative' + }, + { + range: [-0.6, -0.3], + quant: 'very negative' + }, + { + range: [-0.3, -0.1], + quant: 'negative' + }, + { + range: [-0.1, 0.1], + quant: 'neutral' + }, + { + range: [0.1, 0.3], + quant: 'positive' + }, + { + range: [0.3, 0.6], + quant: 'very positive' + }, + { + range: [0.6, Number.MAX_SAFE_INTEGER], + quant: 'extremely positive' + } +] + +const scoreToSentimentText = (val: number) => { + for(const segment of sentimentQuantifierRanges) { + if(between(val, segment.range[0], segment.range[1], false)) { + return segment.quant; + } + } + throw new Error('should not hit this!'); +} + +export interface SentimentResult { + comparative: number + type: SentimentAnalysisType + sentiment: string + weight: number +} + +export interface ActivitySentiment { + results: SentimentResult[] + score: number + scoreWeighted: number + sentiment: string + sentimentWeighted: string + activity: SnoowrapActivity + language: string +} + +export interface ActivitySentimentTestResult extends ActivitySentiment { + passes: boolean + test: GenericComparison | RangedComparison +} + +export interface ActivitySentimentOptions { + testOn?: ('title' | 'body')[] +} + +export type SentimentCriteriaTest = GenericComparison | RangedComparison; + +export const availableSentimentLanguages = ['en', 'es', 'de', 'fr']; + +export const textComparison = /(?not)?\s*(?very|extremely)?\s*(?positive|neutral|negative)/i; + +export const parseTextToNumberComparison = (val: string): RangedComparison | GenericComparison => { + + let genericError: Error | undefined; + try { + return parseGenericValueComparison(val); + } catch (e) { + genericError = e as Error; + // now try text match + } + + const matches = val.match(textComparison); + if (matches === null) { + const textError = new InvalidRegexError(textComparison, val); + throw new CMError(`Sentiment value did not match a valid numeric comparison or valid text: \n ${genericError.message} \n ${textError.message}`); + } + const groups = matches.groups as any; + + const negate = groups.not !== undefined && groups.not !== ''; + + if(groups.sentiment === 'neutral') { + if(negate) { + return { + displayText: 'not neutral (not -0.49 to 0.49)', + range: [-1, 1], + not: true, + } + } + return { + displayText: 'is neutral (-0.49 to 0.49)', + range: [-1, 1], + not: false + } + } + + const compoundSentimentText = `${groups.modifier !== undefined && groups.modifier !== '' ? `${groups.modifier} ` : ''}${groups.sentiment}`.toLocaleLowerCase(); + // @ts-ignore + const numericVal = sentimentQuantifier[compoundSentimentText] as number; + if(numericVal === undefined) { + throw new CMError(`Sentiment given did not match any known phrases: '${compoundSentimentText}'`); + } + + let operator: StringOperator; + if(negate) { + operator = numericVal > 0 ? '<' : '>'; + } else { + operator = numericVal > 0 ? '>=' : '<='; + } + + return { + operator, + value: numericVal, + isPercent: false, + displayText: `is${negate ? ' not ': ' '}${compoundSentimentText} (${operator} ${numericVal})` + } +} + +const nlpAnalyzer = new SentimentManager(); +const langDetect = new Language(); + +export const getActivitySentiment = async (item: SnoowrapActivity, options?: ActivitySentimentOptions): Promise => { + + const { + testOn = ['body', 'title'] + } = options || {}; + + // determine what content we are testing + let contents: string[] = []; + if (asSubmission(item)) { + for (const l of testOn) { + switch (l) { + case 'title': + contents.push(item.title); + break; + case 'body': + if (item.is_self) { + contents.push(item.selftext); + } + break; + } + } + } else { + contents.push(item.body) + } + + const contentStr = contents.join(' '); + + const guess = langDetect.guessBest(contentStr); + + if (availableSentimentLanguages.includes(guess.alpha2)) { + const results: SentimentResult[] = []; + + const nlpResult = await nlpAnalyzer.process(guess.alpha2, contentStr); + + results.push({ + comparative: nlpResult.comparative, + type: nlpResult.type as SentimentAnalysisType, + sentiment: scoreToSentimentText(nlpResult.comparative), + weight: 1 + }); + + if (guess.alpha2 === 'en') { + const score = SentimentIntensityAnalyzer.polarity_scores(contentStr); + results.push({ + comparative: score.compound, + type: 'vader', + sentiment: scoreToSentimentText(score.compound), + // may want to weight higher in the future... + weight: 1 + }); + + const winkScore = wink(contentStr); + // normalizedScore is range of -5 to +5 -- convert to -1 to +1 + const winkAdjusted = (winkScore.normalizedScore * 2) / 10; + results.push({ + comparative: winkAdjusted, + type: 'wink', + sentiment: scoreToSentimentText(winkAdjusted), + weight: 1 + }) + } + + const score = results.reduce((acc, curr) => acc + curr.comparative, 0) / results.length; + const sentiment = scoreToSentimentText(score); + + const weightSum = results.reduce((acc, curr) => acc + curr.weight, 0); + const weightedScores = results.reduce((acc, curr) => acc + (curr.weight * curr.comparative), 0); + const weightedScore = weightedScores / weightSum; + const weightedSentiment = scoreToSentimentText(weightedScore); + + return { + results, + score, + sentiment, + scoreWeighted: weightedScore, + sentimentWeighted: weightedSentiment, + activity: item, + language: guess.language + } + + } else { + throw new MaybeSeriousErrorWithCause(`Cannot test sentiment for unsupported language ${guess.language}`); + } +} + +export const testActivitySentiment = async (item: SnoowrapActivity, criteria: SentimentCriteriaTest, options?: ActivitySentimentOptions): Promise => { + const sentimentResult = await getActivitySentiment(item, options); + + if (asGenericComparison(criteria)) { + return { + passes: comparisonTextOp(sentimentResult.scoreWeighted, criteria.operator, criteria.value), + test: criteria, + ...sentimentResult, + } + } else { + if (criteria.not) { + return { + passes: sentimentResult.scoreWeighted < criteria.range[0] || sentimentResult.scoreWeighted > criteria.range[1], + test: criteria, + ...sentimentResult, + } + } + return { + passes: sentimentResult.scoreWeighted >= criteria.range[0] || sentimentResult.scoreWeighted <= criteria.range[1], + test: criteria, + ...sentimentResult, + } + } +} diff --git a/src/Common/Typings/support.d.ts b/src/Common/Typings/support.d.ts index 2628577..07e85a1 100644 --- a/src/Common/Typings/support.d.ts +++ b/src/Common/Typings/support.d.ts @@ -32,3 +32,23 @@ declare module 'winston-null' { } } + +declare module 'node-nlp' { + export class Language { + guess(val: string, allowedList?: string[] | null, limit: number): {alpha3: string, alpha2: string, language: string, score: number}[]; + guessBest(val: string, allowedList?: string[] | null): {alpha3: string, alpha2: string, language: string, score: number}; + } + export class SentimentAnalyzer { + constructor(settings?: {language?: string}) + getSentiment(phrase: string): Promise<{score: number, comparative: score, vote: 'string', numWords: number, numHits: number, type: string, language: string}> + } + + export class SentimentManager { + process(locale: string, phrase: string): Promise<{score: number, comparative: score, vote: 'string', numWords: number, numHits: number, type: string, language: string}> + } +} + +declare module 'wink-sentiment' { + function sentiment(phrase: string): {score: number, normalizedScore: number, tokenizedPhrase: any[]}; + export default sentiment; +} diff --git a/src/Rule/SentimentRule.ts b/src/Rule/SentimentRule.ts index a9e6353..0848676 100644 --- a/src/Rule/SentimentRule.ts +++ b/src/Rule/SentimentRule.ts @@ -2,123 +2,26 @@ import {Rule, RuleJSONConfig, RuleOptions} from "./index"; import {Comment} from "snoowrap"; import Submission from "snoowrap/dist/objects/Submission"; import { - asSubmission, comparisonTextOp, formatNumber, - parseStringToRegex, triggeredIndicator, windowConfigToWindowCriteria } from "../util"; -import {Scores, SentimentIntensityAnalyzer} from 'vader-sentiment'; import dayjs from 'dayjs'; -import {CMError, SimpleError} from "../Utils/Errors"; -import InvalidRegexError from "../Utils/InvalidRegexError"; +import {map as mapAsync} from 'async'; import { - asGenericComparison, GenericComparison, - parseGenericValueComparison, parseGenericValueOrPercentComparison, + parseGenericValueOrPercentComparison, RangedComparison } from "../Common/Infrastructure/Comparisons"; import {ActivityWindowConfig, ActivityWindowCriteria} from "../Common/Infrastructure/ActivityWindow"; -import {StringOperator, VaderSentimentComparison} from "../Common/Infrastructure/Atomic"; +import {VaderSentimentComparison} from "../Common/Infrastructure/Atomic"; import {RuleResult} from "../Common/interfaces"; import {SnoowrapActivity} from "../Common/Infrastructure/Reddit"; - -export const sentimentQuantifier = { - 'extremely negative': -0.5, - 'very negative': -0.2, - 'negative': -0.05, - 'neutral': 0, - 'positive': 0.05, - 'very positive': 0.2, - 'extremely positive': 0.5, -} - -const sentimentQuantifierEntries = Object.entries(sentimentQuantifier); - -const scoreToSentimentText = (val: number) => { - for(let i = 0; i < sentimentQuantifierEntries.length; i++) { - // hit max score (extremely positive) - if(i + 1 === sentimentQuantifierEntries.length && val > sentimentQuantifierEntries[i][1]) { - return sentimentQuantifierEntries[i][0]; - } - - // if score is between (inclusive start) current and next - if(i + 1 <= sentimentQuantifierEntries.length && val >= sentimentQuantifierEntries[i][1] && val < sentimentQuantifierEntries[i + 1][1]) { - return sentimentQuantifierEntries[i][0]; - } - - // if neither of those is hit and i = 0 then min score (extremely negative) - if(i === 0 && val < sentimentQuantifierEntries[i][1]) { - return sentimentQuantifierEntries[i][0]; - } - } - throw new Error('should not hit this!'); -} - -interface ActivitySentimentResult { - passes: boolean, - scores: Scores, - sentiment: string - activity: SnoowrapActivity -} - -export const textComparison = /(?not)?\s*(?very|extremely)?\s*(?positive|neutral|negative)/i; - -export const parseTextToNumberComparison = (val: string): RangedComparison | GenericComparison => { - - let genericError: Error | undefined; - try { - return parseGenericValueComparison(val); - } catch (e) { - genericError = e as Error; - // now try text match - } - - const matches = val.match(textComparison); - if (matches === null) { - const textError = new InvalidRegexError(textComparison, val); - throw new CMError(`Sentiment value did not match a valid numeric comparison or valid text: \n ${genericError.message} \n ${textError.message}`); - } - const groups = matches.groups as any; - - const negate = groups.not !== undefined && groups.not !== ''; - - if(groups.sentiment === 'neutral') { - if(negate) { - return { - displayText: 'not neutral (not -0.49 to 0.49)', - range: [-0.49, 0.49], - not: true, - } - } - return { - displayText: 'is neutral (-0.49 to 0.49)', - range: [-0.49, 0.49], - not: false - } - } - - const compoundSentimentText = `${groups.modifier !== undefined && groups.modifier !== '' ? `${groups.modifier} ` : ''}${groups.sentiment}`.toLocaleLowerCase(); - // @ts-ignore - const numericVal = sentimentQuantifier[compoundSentimentText] as number; - if(numericVal === undefined) { - throw new CMError(`Sentiment given did not match any known phrases: '${compoundSentimentText}'`); - } - - let operator: StringOperator; - if(negate) { - operator = numericVal > 0 ? '<' : '>'; - } else { - operator = numericVal > 0 ? '>=' : '<='; - } - - return { - operator, - value: numericVal, - isPercent: false, - displayText: `is${negate ? ' not ': ' '}${compoundSentimentText} (${operator} ${numericVal})` - } -} +import { + ActivitySentimentTestResult, + parseTextToNumberComparison, + testActivitySentiment +} from "../Common/LangaugeProcessing"; export class SentimentRule extends Rule { @@ -166,10 +69,8 @@ export class SentimentRule extends Rule { protected async process(item: Submission | Comment): Promise<[boolean, RuleResult]> { - let criteriaResults = []; - - let ogResult = this.testActivity(item, this.sentiment); - let historicResults: ActivitySentimentResult[] | undefined; + let ogResult = await this.testActivity(item, this.sentiment); + let historicResults: ActivitySentimentTestResult[] | undefined; if(this.historical !== undefined && (!this.historical.mustMatchCurrent || ogResult.passes)) { const { @@ -178,7 +79,7 @@ export class SentimentRule extends Rule { } = this.historical; const history = await this.resources.getAuthorActivities(item.author, window); - historicResults = history.map(x => this.testActivity(x, sentiment)); + historicResults = await mapAsync(history, async (x: SnoowrapActivity) => await this.testActivity(x, sentiment)); // history.map(x => this.testActivity(x, sentiment)); } @@ -197,8 +98,8 @@ export class SentimentRule extends Rule { if(historicResults === undefined) { triggered = ogResult.passes; - averageScore = ogResult.scores.compound; - logSummary.push(`${triggeredIndicator(triggered)} Current Activity Sentiment '${ogResult.sentiment} (${ogResult.scores.compound})' ${triggered ? 'PASSED' : 'DID NOT PASS'} sentiment test '${sentimentTest}'`); + averageScore = ogResult.scoreWeighted; + logSummary.push(`${triggeredIndicator(triggered)} Current Activity Sentiment '${ogResult.sentiment} (${ogResult.scoreWeighted})' ${triggered ? 'PASSED' : 'DID NOT PASS'} sentiment test '${sentimentTest}'`); if(!triggered && this.historical !== undefined && this.historical.mustMatchCurrent) { logSummary.push(`Did not check Historical because 'mustMatchCurrent' is true`); } @@ -212,8 +113,8 @@ export class SentimentRule extends Rule { totalMatchingText = totalMatching.displayText; const allResults = historicResults const passed = allResults.filter(x => x.passes); - averageScore = passed.reduce((acc, curr) => acc + curr.scores.compound,0) / passed.length; - averageWindowScore = allResults.reduce((acc, curr) => acc + curr.scores.compound,0) / allResults.length; + averageScore = passed.reduce((acc, curr) => acc + curr.scoreWeighted,0) / passed.length; + averageWindowScore = allResults.reduce((acc, curr) => acc + curr.scoreWeighted,0) / allResults.length; const firstActivity = allResults[0].activity; const lastActivity = allResults[allResults.length - 1].activity; @@ -253,53 +154,8 @@ export class SentimentRule extends Rule { })]); } - protected testActivity(a: (Submission | Comment), criteria: GenericComparison | RangedComparison): ActivitySentimentResult { - // determine what content we are testing - let contents: string[] = []; - if (asSubmission(a)) { - for (const l of this.testOn) { - switch (l) { - case 'title': - contents.push(a.title); - break; - case 'body': - if (a.is_self) { - contents.push(a.selftext); - } - break; - } - } - } else { - contents.push(a.body) - } - - const contentStr = contents.join(' '); - const scores = SentimentIntensityAnalyzer.polarity_scores(contentStr); - const textSentimentScore = scoreToSentimentText(scores.compound); - - if (asGenericComparison(criteria)) { - return { - passes: comparisonTextOp(scores.compound, criteria.operator, criteria.value), - scores, - sentiment: textSentimentScore, - activity: a - } - } else { - if (criteria.not) { - return { - passes: scores.compound < criteria.range[0] || scores.compound > criteria.range[1], - scores, - sentiment: textSentimentScore, - activity: a - } - } - return { - passes: scores.compound >= criteria.range[0] || scores.compound <= criteria.range[1], - scores, - sentiment: textSentimentScore, - activity: a - } - } + protected async testActivity(a: (Submission | Comment), criteria: GenericComparison | RangedComparison): Promise { + return await testActivitySentiment(a, criteria, {testOn: this.testOn}); } } diff --git a/src/Schema/App.json b/src/Schema/App.json index 6bcf4f6..e46e544 100644 --- a/src/Schema/App.json +++ b/src/Schema/App.json @@ -2926,7 +2926,7 @@ "type": "boolean" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" @@ -5244,7 +5244,7 @@ "type": "string" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" diff --git a/src/Schema/Rule.json b/src/Schema/Rule.json index 23f4113..3e44c03 100644 --- a/src/Schema/Rule.json +++ b/src/Schema/Rule.json @@ -1309,7 +1309,7 @@ "type": "boolean" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" @@ -2855,7 +2855,7 @@ "type": "string" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" diff --git a/src/Schema/RuleSet.json b/src/Schema/RuleSet.json index 6f15ab3..1114e5f 100644 --- a/src/Schema/RuleSet.json +++ b/src/Schema/RuleSet.json @@ -1280,7 +1280,7 @@ "type": "boolean" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" @@ -2826,7 +2826,7 @@ "type": "string" }, "sentiment": { - "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -0.5 to 0.5:\n\n* -0.5 => extremely negative\n* -0.2 => very negative\n* -0.5 => negative\n* 0 => neutral\n* 0.05 => positive\n* 0.2 => very positive\n* 0.5 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.05` = `is positive`\n* `<= 0.2` = `is very negative`\n* `< 0.05` = `is not positive`\n* `> -0.2` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.5 and < 0.5`\n* `is not neutral` equates to `< -0.5 or > 0.5`\n\nMore about VADER Sentiment: https://github.com/cjhutto/vaderSentiment", + "description": "Test the calculated VADER sentiment (compound) score for an Activity using this comparison. Can be either a numerical or natural language\n\nSentiment values range from extremely negative to extremely positive in a numerical range of -1 to +1:\n\n* -0.6 => extremely negative\n* -0.3 => very negative\n* -0.1 => negative\n* 0 => neutral\n* 0.1 => positive\n* 0.3 => very positive\n* 0.6 => extremely positive\n\nThe below examples are all equivocal. You can use either set of values as the value for `sentiment` (numerical comparisons or natural langauge)\n\n* `>= 0.1` = `is positive`\n* `<= 0.3` = `is very negative`\n* `< 0.1` = `is not positive`\n* `> -0.3` = `is not very negative`\n\nSpecial case:\n\n* `is neutral` equates to `> -0.1 and < 0.1`\n* `is not neutral` equates to `< -0.1 or > 0.1`\n\nContextMod uses a normalized, weighted average from these sentiment tools:\n\n* NLP.js (english, french, german, and spanish) https://github.com/axa-group/nlp.js/blob/master/docs/v3/sentiment-analysis.md\n* (english only) vaderSentiment-js https://github.com/vaderSentiment/vaderSentiment-js/\n* (english only) wink-sentiment https://github.com/winkjs/wink-sentiment\n\nMore about the sentiment algorithms used:\n* VADER https://github.com/cjhutto/vaderSentiment\n* AFINN http://corpustext.com/reference/sentiment_afinn.html\n* Senticon https://ieeexplore.ieee.org/document/8721408\n* Pattern https://github.com/clips/pattern\n* wink https://github.com/winkjs/wink-sentiment", "examples": [ "is negative", "> 0.2" diff --git a/src/util.ts b/src/util.ts index 01a4b13..66e892e 100644 --- a/src/util.ts +++ b/src/util.ts @@ -2757,3 +2757,11 @@ export const filterByTimeRequirement = (satisfiedEndtime: Dayjs, listSlice: Snoo return [truncatedItems.length !== listSlice.length, truncatedItems] } + +export const between = (val: number, a: number, b: number, inclusive: boolean): boolean => { + var min = Math.min(a, b), + max = Math.max(a, b); + + return inclusive ? val >= min && val <= max : val > min && val < max; + +}