1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-10 15:19:18 +03:00

Merge branch 'latest-node-nlp' into develop

This commit is contained in:
Louistiti 2019-05-01 16:07:33 +08:00
commit 9d66fd7bf2
9 changed files with 174 additions and 140 deletions

View File

@ -2,13 +2,13 @@
"langs": {
"en-US": {
"short": "en",
"min_confidence": 0.6,
"min_confidence": 0.5,
"fallbacks": [
]
},
"fr-FR": {
"short": "fr",
"min_confidence": 0.6,
"min_confidence": 0.5,
"fallbacks": [
{
"words": ["merci"],

279
package-lock.json generated
View File

@ -973,6 +973,11 @@
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
},
"@novel-segment/util": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@novel-segment/util/-/util-1.0.1.tgz",
"integrity": "sha512-8TtEyQHtaF7eTXvzBivAJjvn7TtYcBXlEkgyvXN/rSMvC2lj7T1k02KzWZEDBA9PPzdJTy5KDlzU5iU4pcn7lQ=="
},
"@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@ -2731,9 +2736,9 @@
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"bluebird": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz",
"integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw=="
"version": "3.5.4",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz",
"integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw=="
},
"bn.js": {
"version": "4.11.8",
@ -2887,15 +2892,6 @@
}
}
},
"brain.js": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/brain.js/-/brain.js-1.6.0.tgz",
"integrity": "sha512-HMHK7ueavtlONnpa+qDDJNs4K5gegGxQkKir+TeBoXgyHjI84y4vUh44q9qOOv2LwtVlZf1h5gEp676OWnkCbA==",
"requires": {
"gpu.js": "^1.10.4",
"thaw.js": "^2.0.0"
}
},
"brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
@ -3690,6 +3686,11 @@
"integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=",
"dev": true
},
"chinese-parseint": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/chinese-parseint/-/chinese-parseint-1.1.0.tgz",
"integrity": "sha1-wDX/drTxJgfAyVUkIj+MxzQXXGk="
},
"chinese_convert": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/chinese_convert/-/chinese_convert-1.0.8.tgz",
@ -3762,14 +3763,15 @@
}
},
"cjk-conv": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/cjk-conv/-/cjk-conv-1.1.15.tgz",
"integrity": "sha512-NYD8VigwjY2x7BuD8U/93KgZVAzIfi5fsHZ41ILAk4LRtBrA8jx/3xbxqzdFfyklWT2u2CyF6Vva/OjBXcnO3g==",
"version": "1.1.37",
"resolved": "https://registry.npmjs.org/cjk-conv/-/cjk-conv-1.1.37.tgz",
"integrity": "sha512-owI2XvhLw1RULXeKx8lB/+s6rlXCjPUbLWzfWn6SaXz5DnuoYFRlpZxsltN6MpqzBOkzZQbh9Tq2ReS5i1La/w==",
"requires": {
"array-hyper-unique": "^1.0.7",
"chinese_convert": "1.0.8",
"deepmerge-plus": "^2.1.3",
"japanese": "^1.2.0",
"regexp-helper": "^1.0.8",
"uni-string": "^1.1.0"
}
},
@ -3862,11 +3864,6 @@
}
}
},
"collapse-white-space": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.4.tgz",
"integrity": "sha512-YfQ1tAUZm561vpYD+5eyWN8+UsceQbSrqqlc/6zDY2gtAE+uZLSdkkovhnGpmCThsvKBFakq4EdY/FF93E8XIw=="
},
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@ -4397,6 +4394,11 @@
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"deepmerge": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.2.0.tgz",
"integrity": "sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow=="
},
"deepmerge-plus": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/deepmerge-plus/-/deepmerge-plus-2.1.3.tgz",
@ -5986,14 +5988,6 @@
"map-cache": "^0.2.2"
}
},
"franc": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/franc/-/franc-4.0.0.tgz",
"integrity": "sha512-4991aLWY5sLg2fsyiOPflUjye5XBKyUO4V9O4FTBbQ7xKugvnmP9x3m3LlrpD7kq1BebMThNkEXnK52HaU3ZkQ==",
"requires": {
"trigram-utils": "^1.0.0"
}
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
@ -6054,7 +6048,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -6075,12 +6070,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -6095,17 +6092,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -6222,7 +6222,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -6234,6 +6235,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -6248,6 +6250,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -6255,12 +6258,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -6279,6 +6284,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -6359,7 +6365,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -6371,6 +6378,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -6456,7 +6464,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -6492,6 +6501,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -6511,6 +6521,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -6554,12 +6565,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@ -6947,14 +6960,6 @@
"url-parse-lax": "^1.0.0"
}
},
"gpu.js": {
"version": "1.10.4",
"resolved": "https://registry.npmjs.org/gpu.js/-/gpu.js-1.10.4.tgz",
"integrity": "sha512-qh5O1LXwwkhGOpEicR9SnQB7xduUDY5rKGPWj9yOFLNI90bX+mReooGQjnL3iZ08btBOT0zQGu9wKA+gGy2BhQ==",
"requires": {
"acorn": "^5.1.1"
}
},
"graceful-fs": {
"version": "4.1.15",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
@ -11078,11 +11083,6 @@
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
"dev": true
},
"n-gram": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/n-gram/-/n-gram-1.1.0.tgz",
"integrity": "sha512-S5dWZFQxmEVf7cfyxK9sVyvB0mmTxgL6z9Ww77q20oG8fidOgkwZqsgj7+4DkZVqxdE/Y+0KLU55yw08ssKqkA=="
},
"nan": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz",
@ -11181,19 +11181,16 @@
"dev": true
},
"node-nlp": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/node-nlp/-/node-nlp-2.4.2.tgz",
"integrity": "sha512-YnjxvPc8avlRxFj0kUkWCns+AIBwYX7vcNnwcsAA9iphuQzPBPpB0gwzRGplCZ4t2ZIruY6NTw450HkaMWpYLg==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/node-nlp/-/node-nlp-3.0.3.tgz",
"integrity": "sha512-p/2liYOr3/vgOhG0UypwE/Zr3f95xen5gdl8iwSYmDIT5dDeQwqSnRAbX/BW9K2fQAcbKs600kwlGrUcYD9RIQ==",
"requires": {
"@microsoft/recognizers-text-suite": "1.1.4",
"brain.js": "1.6.0",
"escodegen": "^1.11.0",
"escodegen": "^1.11.1",
"esprima": "^4.0.1",
"franc": "^4.0.0",
"handlebars": "^4.0.12",
"lodash": "^4.17.11",
"novel-segment": "^2.2.17",
"xlsx": "^0.14.1"
"handlebars": "^4.1.2",
"novel-segment": "^2.2.20",
"xlsx": "^0.14.2"
}
},
"node-notifier": {
@ -11320,13 +11317,14 @@
}
},
"novel-segment": {
"version": "2.2.17",
"resolved": "https://registry.npmjs.org/novel-segment/-/novel-segment-2.2.17.tgz",
"integrity": "sha512-MmCkNDM/Ik8It9kv9yulmIDJR3XgZ846sGSTe+LXx5ED0e20QFh4QjyjkFWHvMF3JkY4PVMLg49V7H8AaOjl9g==",
"version": "2.2.25",
"resolved": "https://registry.npmjs.org/novel-segment/-/novel-segment-2.2.25.tgz",
"integrity": "sha512-W8Cs+/UTAeDfURO23R/S3bhAuQ1KHDdR5kN6s5sPuYsdZ8o2rzyVadQFdQg0ecn2Oa1nfbP43yzAuWhbCHofeQ==",
"requires": {
"@novel-segment/util": "^1.0.1",
"array-hyper-unique": "^1.0.7",
"bluebird": "^3.5.3",
"cjk-conv": "^1.1.13",
"bluebird": "^3.5.4",
"cjk-conv": "^1.1.30",
"core-decorators": "^0.20.0",
"crlf-normalize": "^1.0.3",
"deepmerge-plus": "^2.1.3",
@ -11334,10 +11332,12 @@
"fs-extra": "^7.0.1",
"hex-lib": "^1.0.2",
"lodash.clonedeep": "^4.5.0",
"regexp-cjk": "^2.0.21",
"segment-dict": "^2.2.56",
"regexp-cjk": "^3.0.3",
"segment-dict": "^2.2.83",
"sort-object-keys2": "^1.1.0",
"ts-enum-util": "3.1.0",
"str-util": "^2.3.17",
"string-natural-compare": "^2.0.3",
"ts-enum-util": "4.0.0",
"uni-string": "^1.1.0"
},
"dependencies": {
@ -12530,34 +12530,32 @@
}
},
"regexp-cjk": {
"version": "2.0.21",
"resolved": "https://registry.npmjs.org/regexp-cjk/-/regexp-cjk-2.0.21.tgz",
"integrity": "sha512-LNrpCYV7SFZSC0Z+UXJClZe8ut+EO0NfSIxhEEo7bV/q0fiJ39kl06wg3obmxlUcXaB7etzed0FO0557pKpScg==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/regexp-cjk/-/regexp-cjk-3.0.3.tgz",
"integrity": "sha512-I5selUM2HhxE9V+/AUXw9MjOX190pt/KrTZkeXGJY5tuOf6PwWPv7L1pIRWNdDdAb40L87zvxqZzdx8cAIo5Kg==",
"requires": {
"array-hyper-unique": "^1.0.7",
"cjk-conv": "^1.1.13",
"regexp-helper": "^1.0.7",
"cjk-conv": "^1.1.28",
"regexp-helper": "^1.0.8",
"regexp-parser-event": "^1.0.2",
"regexp-parser-literal": "^1.0.2",
"regexp-range": "^1.0.7",
"regexp-support": "^1.0.23",
"regexpp2": "^1.1.2",
"uni-string": "^1.1.0"
"regexp-support": "^1.0.24"
}
},
"regexp-helper": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/regexp-helper/-/regexp-helper-1.0.7.tgz",
"integrity": "sha512-v022ogoms6miu2dvQ+PgJTmDhzRKdc79W2nKLGBK60bPkmrhYquebH1szriAEHVS++v2fFULjP5kYHvLpYUTTw==",
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/regexp-helper/-/regexp-helper-1.0.8.tgz",
"integrity": "sha512-4pumLQTWMxeom6ND3+NHRLa5E8D0BIkvw8PlPdB80PCxKX9rDWRmoJrpHXPltz/CbkxDzs43+xC63nsvOLrR5Q==",
"requires": {
"regexp-helper-core": "^1.0.5",
"regexp-support": "^1.0.23"
"regexp-helper-core": "^1.0.6",
"regexp-support": "^1.0.24"
}
},
"regexp-helper-core": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/regexp-helper-core/-/regexp-helper-core-1.0.5.tgz",
"integrity": "sha512-3wkMDbhS48xoZhOeTFeObNjLWTXWpvVm/q+vx4Lz9IAuzVA0D9rmzT+OYR/VsigGrxNOjTKiv6g1u90R/gswow=="
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/regexp-helper-core/-/regexp-helper-core-1.0.6.tgz",
"integrity": "sha512-ASRrYL3Ci0CvNaXrYCHRYv1PpbdMdUlUlHiYZEoEY/6qn/z/9ABM2mp1xvDV7uPSOo1JYAtdDhgSgub7PHiC/Q=="
},
"regexp-parser-event": {
"version": "1.0.2",
@ -12614,9 +12612,9 @@
}
},
"regexp-support": {
"version": "1.0.23",
"resolved": "https://registry.npmjs.org/regexp-support/-/regexp-support-1.0.23.tgz",
"integrity": "sha512-d8g7riW0bIVvMf0Xs23xts1lWirgjuwJ8PgpbR3iANTiz7e3hBQN3VcudJE8B/sm38EnZlZKwWiunfRdK6GSAg=="
"version": "1.0.24",
"resolved": "https://registry.npmjs.org/regexp-support/-/regexp-support-1.0.24.tgz",
"integrity": "sha512-YYTb3c8O2yWoUK9Bp3HvIP7dH/l7tKw9/8juYIZuDB+I61mB6cXfhd/yPtBd5a36A9G9WnqUN/clgfLKq9+vbw=="
},
"regexpp": {
"version": "2.0.1",
@ -13019,18 +13017,19 @@
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
},
"segment-dict": {
"version": "2.2.64",
"resolved": "https://registry.npmjs.org/segment-dict/-/segment-dict-2.2.64.tgz",
"integrity": "sha512-fbStUeVBb/Kpu9cnXViCFwiQZ5EJjKN6lfd1YoNRL9YpnDaSbiDOfhi1BS7PUH7CvXrz1WXg8DzWIUl7RKLSMA==",
"version": "2.2.88",
"resolved": "https://registry.npmjs.org/segment-dict/-/segment-dict-2.2.88.tgz",
"integrity": "sha512-Fx81kUlGXSCOSclm7iyj98yXJQfV29z66A7Y5iFde7BIMkNzYqUWTV7n07aXa80iUQwMyGX3QDh1Niv9/HBkkg==",
"requires": {
"bluebird": "^3.5.3",
"@novel-segment/util": "^1.0.1",
"bluebird": "^3.5.4",
"core-decorators": "^0.20.0",
"crlf-normalize": "^1.0.3",
"fast-glob": "^2.2.6",
"fs-extra": "^7.0.1",
"split2": "^3.1.0",
"split2": "^3.1.1",
"stream-pipe": "^1.0.1",
"through2": "^3.0.0",
"through2": "^3.0.1",
"uni-string": "^1.1.0",
"upath2": "^2.1.3"
},
@ -13052,6 +13051,14 @@
"requires": {
"graceful-fs": "^4.1.6"
}
},
"through2": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
"integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
"requires": {
"readable-stream": "2 || 3"
}
}
}
},
@ -13581,17 +13588,17 @@
}
},
"split2": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.1.0.tgz",
"integrity": "sha512-ePE1otNQVMnBRyqf3INbZvZwBPGsdBDThgrOWZ6z8zXGNVQNVCSEoOO9aBMTzDN1mXoNSZJ2kHSFH7AA5SPWww==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz",
"integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==",
"requires": {
"readable-stream": "^3.0.0"
},
"dependencies": {
"readable-stream": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz",
"integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -13665,6 +13672,39 @@
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
"dev": true
},
"str-util": {
"version": "2.3.17",
"resolved": "https://registry.npmjs.org/str-util/-/str-util-2.3.17.tgz",
"integrity": "sha512-MPlDEab1aee290LpqpE52GQAFzk7xbi9wMg4yQrxr2ayD6Ocy9XUU2L4UdWu9IMJJ0NoUZmtW3FJo9KTl4Y+VA==",
"requires": {
"chinese-parseint": "^1.1.0",
"cjk-conv": "^1.1.4",
"deepmerge": "^3.0.0",
"is-fullwidth-code-point": "^2.0.0",
"japanese": "^1.2.0",
"strip-ansi": "^5.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"stream-browserify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
@ -13763,6 +13803,11 @@
}
}
},
"string-natural-compare": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-2.0.3.tgz",
"integrity": "sha512-4Kcl12rNjc+6EKhY8QyDVuQTAlMWwRiNbsxnVwBUKFr7dYPQuXVrtNU4sEkjF9LHY0AY6uVbB3ktbkIH4LC+BQ=="
},
"string-template": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz",
@ -14196,11 +14241,6 @@
"object-path": "^0.9.0"
}
},
"thaw.js": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/thaw.js/-/thaw.js-2.0.0.tgz",
"integrity": "sha1-RSvF1+4s4bb5IDewW1BsvWVikdA="
},
"throat": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz",
@ -14369,21 +14409,6 @@
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz",
"integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc="
},
"trigram-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trigram-utils/-/trigram-utils-1.0.1.tgz",
"integrity": "sha512-9xJJ3zcPO/b60f9TF8svW9Q0HdpPebiTh2juIVSqcptwvxybOtek+YwbC+k1qf9TosNYyyC4JtSSFDGw+EE+gQ==",
"requires": {
"collapse-white-space": "^1.0.3",
"n-gram": "^1.0.0",
"trim": "0.0.1"
}
},
"trim": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
"integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0="
},
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
@ -14396,9 +14421,9 @@
"dev": true
},
"ts-enum-util": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/ts-enum-util/-/ts-enum-util-3.1.0.tgz",
"integrity": "sha512-X3rvaVckjES5KXheW8KdMiQmhWwGnNPpM5wDydz3mPhuym2qe7asWMlYHj0OOaHN7a2REgcT3JWpIAi7S8HoNA=="
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/ts-enum-util/-/ts-enum-util-4.0.0.tgz",
"integrity": "sha512-3z49qxV6AhPkbNC1HVcER/3sgn8T8ty9wSdLRzX761U2lQG0Hf4slSw/+UMy9Bd42umxHOTAwklHA4dovh7Bqg=="
},
"tslib": {
"version": "1.9.3",
@ -15098,9 +15123,9 @@
"dev": true
},
"xlsx": {
"version": "0.14.1",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.14.1.tgz",
"integrity": "sha512-7hjB5YuyJo1fuuzXQjwuxD8LSUzE4Rxu5ToC3fB5JSunZxGjLcgKg69bEFG9GYoxeVDx5GL0k1dUodlvaQNRQw==",
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.14.2.tgz",
"integrity": "sha512-6+4TkmU34s1p/qsl8omWSEOa7pOtWlw4SuRJH/FGRk3iF/gcvSWGgCI1L28NaSDx2tI82aeq2SPY+xeFQJD27A==",
"requires": {
"adler-32": "~1.2.0",
"cfb": "^1.1.0",

View File

@ -19,10 +19,10 @@
"scripts": {
"lint": "babel-node scripts/lint.js",
"test": "npm run test:json && npm run test:unit && npm run test:e2e",
"test:unit": "cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --projects test/unit/unit.jest.json",
"test:unit": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --projects test/unit/unit.jest.json && npm run train expressions",
"test:e2e": "npm run test:e2e:nlp-modules && npm run test:e2e:modules",
"test:e2e:modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --verbose --projects test/e2e/modules/e2e.modules.jest.json && npm run train expressions",
"test:e2e:nlp-modules": "cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --verbose --setupTestFrameworkScriptFile=./test/paths.setup.js test/e2e/nlp-modules.spec.js && npm run train expressions",
"test:e2e:nlp-modules": "npm run train expressions:en && cross-env PIPENV_PIPFILE=bridges/python/Pipfile jest --silent --verbose --setupTestFrameworkScriptFile=./test/paths.setup.js test/e2e/nlp-modules.spec.js && npm run train expressions",
"test:json": "jest --silent --projects test/json/json.jest.json",
"test:module": "babel-node scripts/test-module.js",
"setup:offline": "babel-node scripts/setup-offline/setup-offline.js",
@ -63,7 +63,7 @@
"fluent-ffmpeg": "^2.1.2",
"googleapis": "^25.0.0",
"moment-timezone": "^0.5.14",
"node-nlp": "^2.4.2",
"node-nlp": "^3.0.3",
"node-wav": "0.0.2",
"socket.io": "^2.0.2",
"superagent": "^3.5.2",

View File

@ -19,7 +19,7 @@ Ping domain names and give you the online state.
### Have I Been Pwned
Verify if a or several email addresses have been pwned.
Verify if one or several email addresses have been pwned (thanks to [Have I Been Pwned](https://haveibeenpwned.com/).
#### Usage

View File

@ -52,6 +52,10 @@
"blocked": [
"There was an issue acessing %website_name%'s service.",
"Unfortunate news, %website_name% isn't granting me access to its service."
],
"unavailable": [
"It looks like Cloudflare is defending %website_name%, please retry in a few moments.",
"Unfortunately, Cloudflare is temporarily blocking your access to %website_name%, please retry in a while."
]
}
}

View File

@ -39,7 +39,7 @@
"Essayer de vérifier le statut de pwnage."
],
"no-email": [
"Veuillez fournir une ou plusieurs adresses électroniques que vous devez vérifier.."
"Veuillez fournir une ou plusieurs adresses électroniques que vous devez vérifier..."
],
"errors": [
"Je pense que %website_name% est en panne pour le moment, veuillez réessayer plus tard.",
@ -49,6 +49,10 @@
"blocked": [
"Il y avait un problème d'accès au service de %website_name%.",
"Malheureusement, %website_name% ne me donne pas accès à son service."
],
"unavailable": [
"Il semblerait que Cloudflare protège %website_name%, veuillez réessayer dans un petit instant.",
"Malheureusement, Cloudflare a temporairement bloqué votre accès à %website_name%, merci de retenter dans un moment."
]
}
}

View File

@ -14,7 +14,7 @@
"Vérifies si amazon.com en ligne ou hors ligne"
],
"haveibeenpwned": [
"iifeoluwa.ao@gmail.com a-t-ele été pwned ?",
"iifeoluwa.ao@gmail.com a-t-elle été pwned ?",
"iifeoluwa.ao@gmail.com a-t-elle été compromise ?",
"iifeoluwa.ao@gmail.com a-t-elle été exposée à une brèche ?",
"iifeoluwa.ao@gmail.com est-elle toujours non compromise ?",

View File

@ -29,6 +29,8 @@ def haveibeenpwned(string, entities):
# Have I Been Pwned API returns a 403 when accessed by unauthorized/banned clients
if breached == 403:
return utils.output('end', 'blocked', utils.translate('blocked', { 'website_name': 'Have I Been Pwned' }))
elif breached == 503:
return utils.output('end', 'blocked', utils.translate('unavailable', { 'website_name': 'Have I Been Pwned' }))
elif not breached:
if isLastEmail:
return utils.output('end', 'no-pwnage', utils.translate('no-pwnage', data))

View File

@ -11,7 +11,6 @@ import Brain from '@/core/brain'
* This test will test the Leon's NLP (Natural Language Processing):
* 1. Browse every expression for each module
* 2. Check if it matches its respective module
* 3. Execute the module at least once
*
* Do not forget to train your expressions after this test (already included in e2e npm script)
*/
@ -37,14 +36,14 @@ describe('NLU modules', () => {
brain.talk = jest.fn()
beforeAll(async () => {
process.env.LEON_LANG = langKeys[i]
// Generate new classifier for the tested language
await execa.shell(`npm run train expressions:${lang.short}`)
// Load the new classifier
await nlu.loadModel(global.paths.classifier)
})
process.env.LEON_LANG = langKeys[i]
for (let j = 0; j < packages.length; j += 1) {
// eslint-disable-next-line no-loop-func
describe(`${packages[j]} package`, () => {