Skip to content

Commit

Permalink
feat: switch from using expand-contractions to @stdlib/nlp-expand-con…
Browse files Browse the repository at this point in the history
…tractions per stdlib-js/stdlib#497
  • Loading branch information
titanism committed Jun 13, 2022
1 parent ecb798c commit fa55e11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const NaiveBayes = require('@ladjs/naivebayes');
const RE2 = require('re2');
const arrayJoinConjunction = require('array-join-conjunction');
const bitcoinRegex = require('bitcoin-regex');
const contractions = require('expand-contractions');
const creditCardRegex = require('credit-card-regex');
const emailRegexSafe = require('email-regex-safe');
const emojiPatterns = require('emoji-patterns');
const escapeStringRegexp = require('escape-string-regexp');
const expandContractions = require('@stdlib/nlp-expand-contractions');
const fileExtension = require('file-extension');
const floatingPointRegex = require('floating-point-regex');
const franc = require('franc');
Expand Down Expand Up @@ -1264,7 +1264,7 @@ class SpamScanner {
//
// NOTE: we're doing this for all languages now, not just en
//
string = contractions.expand(string);
string = expandContractions(string);

//
// Future research:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"dependencies": {
"@ladjs/naivebayes": "^0.1.0",
"@stdlib/nlp-expand-contractions": "^0.0.8",
"array-join-conjunction": "^1.0.0",
"bitcoin-regex": "^2.0.0",
"chinese-tokenizer": "^2.4.0",
Expand All @@ -24,7 +25,6 @@
"email-regex-safe": "^1.0.2",
"emoji-patterns": "^14.0.1",
"escape-string-regexp": "4",
"expand-contractions": "^1.0.1",
"file-extension": "^4.0.5",
"file-type": "16",
"floating-point-regex": "^0.1.0",
Expand Down

0 comments on commit fa55e11

Please sign in to comment.