Skip to content

Commit

Permalink
fix to mass_nouns and modals
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe committed Aug 11, 2020
1 parent 1862fd3 commit 2f2d382
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 29 deletions.
144 changes: 139 additions & 5 deletions issues/known-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,145 @@ const RiScript = require('../src/riscript');

describe('RiTa.KnownIssues', () => {

it('Failing to singularize correctly', () => {

let testPairs = [ // also in java
"grooves", "groove",
"bambinoes", "bambino",
"universes", "universe",
"toothbrushes", "toothbrush",
"clashes", "clash",
"credoes", "credo",
"verves", "verve",
"sudses", "sudse",
"addresses", "address",
"brownies", "browny",
"consensuses", "consensus",
"stuccoes", "stucco",
"flashes", "flash",
"obverses", "obverse",
"morasses", "morass",
"conclaves", "conclave",
"desperadoes", "desperado",
"pesoes", "peso",
"promises", "promise",
"tangoes", "tango",
"spouses", "spouse",
"acumens", "acumen",
"undresses", "undress",
"branches", "branch",
"lapses", "lapse",
"quizes", "quiz",
"spyglasses", "spyglass",
"overpasses", "overpass",
"hashes", "hash",
"cloneses", "clones",
"potashes", "potash",
"vetoes", "veto",
"biggies", "biggie",
"sleeves", "sleeve",
"microwaves", "microwave",
"hypotheses", "hypothesis",
"pretenses", "pretense",
"latches", "latch",
"espressoes", "espresso",
"pooches", "pooch",
"fetuses", "fetus",
"alumni", "alumnus",
"lighthouses", "lighthouse",
"weirdoes", "weirdo",
"onyxes", "onyx",
"genuses", "genus",
"zombies", "zombie",
"hearses", "hearse",
"trenches", "trench",
"paradoxes", "paradox",
"hippies", "hippie",
"tempoes", "tempo",
"yuppies", "yuppie",
"purses", "purse",
"hatches", "hatch",
"witches", "witch",
"latexes", "latex",
"sinuses", "sinus",
"ostinatoes", "ostinato",
"phrases", "phrase",
"gustoes", "gusto",
"gauchoes", "gaucho",
"arches", "arch",
"bitches", "bitch",
"duplexes", "duplex",
"hairdoes", "hairdo",
"missives", "missive",
"madhouses", "madhouse",
"winoes", "wino",
"washes", "wash",
"pauses", "pause",
"heroes", "hero",
"sketches", "sketch",
"conclaves", "conclave",
"meshes", "mesh",
"microeconomicses", "microeconomics",
"cornstarches", "cornstarch",
"amicuses", "amicus",
"brasses", "brass",
"marshes", "marsh",
"masses", "mass",
"esophaguses", "esophagus",
"overpasses", "overpass",
"impulses", "impulse",
"pelvises", "pelvis",
"electrodynamicses", "electrodynamics",
"fetishes", "fetish",
"manganeses", "manganese",
"abysses", "abyss",
"lighthouses", "lighthouse",
"gashes", "gash",
"pachinkoes", "pachinko",
"calculuses", "calculus",
"moxies", "moxie",
"thatches", "thatch",
"dynamoes", "dynamo",
"lurches", "lurch",
"vortexes", "vortex",
"crunches", "crunch",
"directives", "directive",
"calories", "calorie",
"kimonoes", "kimono",
"witches", "witch",
"moves", "move",
"expanses", "expanse",
"chaises", "chaise",
"metroes", "metro",
"briefcases", "briefcase"
]
];

let res1, res2, res3, dbug = 0;

for (let i = 0; i < testPairs.length; i += 2) {

dbug && console.log(testPairs[i] + '/' + testPairs[i + 1]);

res1 = RiTa.singularize(testPairs[i], { dbug: dbug });
res2 = RiTa.pluralize(testPairs[i + 1], { dbug: dbug });
res3 = RiTa.inflector.isPlural(testPairs[i], { dbug: dbug, fatal: false });

// singularize
eq(res1, testPairs[i + 1], 'FAIL: singularize(' + testPairs[i]
+ ') was ' + res1 + ', but expected ' + testPairs[i + 1] + '\n '
+ 'pluralize(' + testPairs[i + 1] + ') was ' + res2 + '\n\n');

// pluralize
eq(res2, testPairs[i], 'FAIL: pluralize(' + testPairs[i + 1]
+ ') was ' + res2 + ', but expected ' + testPairs[i] + '\n '
+ 'singularize(' + testPairs[i] + ') was ' + res1 + '\n\n');

// isPlural
ok(res3, 'FAIL: isPlural(' + testPairs[i] + ') was false\n\n');
}
});

it('Should use phones for articlize', () => {
expect(RiTa.articlize("honor")).eq('an honor');
});
Expand Down Expand Up @@ -56,11 +195,6 @@ describe('RiTa.KnownIssues', () => {
});
});

/* VERB REMOVAL
"arbitrate":["aa1-r b-ah t-r-ey-t","vb"],
"arbitrating":["aa1-r b-ah t-r-ey t-ih-ng","vbg"],
*/

function eql(output, expected, msg) { expect(output).eql(expected, msg); }
function ok(res, msg) { expect(res).eq(true, msg); }
function eq(a, b, msg) { expect(a).eq(b, msg); }
10 changes: 4 additions & 6 deletions src/inflector.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Util = require("./util");

const RE = Util.RE;
const MODALS = Util.MODALS;
const MASS_NOUNS = Util.MASS_NOUNS;
const DEFAULT_IS_PLURAL = /(ae|ia|s)$/;
const DEFAULT_SINGULAR_RULE = RE("^.*s$", 1);
const DEFAULT_PLURAL_RULE = RE("^((\\w+)(-\\w+)*)(\\s((\\w+)(-\\w+)*))*$", 0, "s");
Expand Down Expand Up @@ -104,9 +104,8 @@ class Inflector {
if (!word || !word.length) return '';

let check = word.toLowerCase();

if (MODALS.includes(check)) {
dbug && console.log(word + ' hit MODALS');
if (MASS_NOUNS.includes(check)) {
dbug && console.log(word + ' hit MASS_NOUNS');
return word;
}

Expand All @@ -119,7 +118,6 @@ class Inflector {
return rules[i].fire(word);
}
}

return word;
}

Expand All @@ -140,7 +138,7 @@ class Inflector {

word = word.toLowerCase();

if (MODALS.includes(word)) return true;
if (MASS_NOUNS.includes(word)) return true;

let dict = RiTa.lexicon()._dict(fatal);
let sing = RiTa.singularize(word);
Expand Down
10 changes: 0 additions & 10 deletions src/rita_dict.js
Original file line number Diff line number Diff line change
Expand Up @@ -13738,11 +13738,7 @@ module && (module.exports = {
"olden":["ow1-l d-ah-n","jj"],
"older":["ow1-l d-er","jjr rbr jj"],
"oldest":["ow1-l d-ah-s-t","jjs"],
"oldie":["ow1-l d-iy","nn"],
"oldster":["ow1-l-d s-t-er","nn"],
"ole":["ow1-l","jj nn"],
"olefin":["ow1 l-ah f-ih-n","nn"],
"olestra":["ow l-eh1-s t-r-ah","nn"],
"olfactory":["ow-l f-ae1-k t-er iy","jj"],
"oligarch":["ow1 l-ih g-aa-r-k","nn"],
"oligopoly":["aa l-ih g-aa1 p-ah l-iy","nn"],
Expand Down Expand Up @@ -13808,7 +13804,6 @@ module && (module.exports = {
"operative":["aa1 p-er ah t-ih-v","jj nn"],
"operator":["aa1 p-er ey t-er","nn"],
"operetta":["aa p-er eh1 t-ah","nn"],
"ophthalmic":["aa-f th-ae1-l m-ih-k","jj"],
"ophthalmologist":["aa-p th-ah m-aa1 l-ah jh-ih-s-t","nn"],
"opine":["ow-p-ay1-n","vb"],
"opining":["ow p-ay1 n-ih-ng","vbg"],
Expand Down Expand Up @@ -16477,7 +16472,6 @@ module && (module.exports = {
"redesign":["r-iy d-ih-z ay1-n","nn vb"],
"redesigned":["r-iy d-ih-z ay1-n-d","vbn vbd jj"],
"redevelop":["r-iy d-ih-v eh1 l-ah-p","vb"],
"redfish":["r-eh1-d f-ih-sh","nn"],
"redhead":["r-eh1-d hh-eh-d","nn"],
"redheaded":["r-eh1-d hh-eh d-ih-d","jj"],
"redirect":["r-iy d-er eh1-k-t","vb"],
Expand Down Expand Up @@ -16509,11 +16503,8 @@ module && (module.exports = {
"reef":["r-iy1-f","nn"],
"reek":["r-iy1-k","vb vbp nn"],
"reel":["r-iy1-l","nn vbp vb"],
"reelect":["r-iy-ih-l-eh1-k-t","vb"],
"reelection":["r-iy ih l-eh1-k sh-ah-n","nn"],
"reemerge":["r-iy-ih-m-er1-jh","vb"],
"reestablish":["r-iy ih s-t-ae1 b-l-ih-sh","vb"],
"reevaluation":["r-iy ih v-ae-l y-uw ey1 sh-ah-n","nn"],
"reexamination":["r-iy ih-g z-ae m-ah n-ey1 sh-ah-n","nn"],
"reexamine":["r-iy eh-g z-ae1 m-ah-n","vb"],
"refer":["r-ah f-er1","vb vbp"],
Expand Down Expand Up @@ -22556,7 +22547,6 @@ module && (module.exports = {
"whatsoever":["w-ah-t s-ow eh1 v-er","rb wp"],
"wheat":["w-iy1-t","nn jj"],
"wheel":["w-iy1-l","nn vb vbp"],
"wheelbase":["w-iy1-l b-ey-s","nn"],
"wheelchair":["w-iy1-l ch-eh-r","nn"],
"wheeled":["w-iy1-l-d","vbd jj vbn"],
"wheeze":["w-iy1-z","vb nn"],
Expand Down
4 changes: 2 additions & 2 deletions src/stemmer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// a modified prt of the Pling stemmer as documented here: http://resources.mpi-inf.mpg.de/yago-naga/javatools/doc/javatools/parsers/PlingStemmer.html

const { MODALS } = require("./util");
const { MASS_NOUNS } = require("./util");

/* Words that end in '-se' in their plural forms (like 'nurse' etc.) */
const categorySE_SES = ['abuses', 'apocalypses', 'blouses', 'bruises', 'chaises', 'cheeses', 'chemises', 'clauses', 'corpses', 'courses', 'crazes', 'creases', 'cruises', 'curses', 'databases', 'dazes', 'dives', 'defenses', 'demises', 'discourses', 'diseases', 'doses', 'eclipses', 'enterprises', 'expenses', 'friezes', 'fuses', 'glimpses', 'guises', 'hearses', 'horses', 'houses', 'impasses', 'impulses', 'kamikazes', 'mazes', 'mousses', 'noises', 'nooses', 'noses', 'nurses', 'obverses', 'offenses', 'oozes', 'overdoses', 'phrases', 'posses', 'premises', 'pretenses', 'proteases', 'pulses', 'purposes', 'purses', 'racehorses', 'recluses', 'recourses', 'relapses', 'responses', 'roses', 'ruses', 'spouses', 'stripteases', 'subleases', 'sunrises', 'tortoises', 'trapezes', 'treatises', 'toes', 'universes', 'uses', 'vases', 'verses', 'vises', 'wheelbases', 'wheezes'];
Expand Down Expand Up @@ -109,7 +109,7 @@ class PlingStemmer {
if (categoryEX_ICES.includes(s)) return (this.cut(s, "ices") + "ex");

// Words that do not inflect in the plural
if (s.endsWith("ois") || s.endsWith("itis") || category00.includes(s) || categoryICS.includes(s) || MODALS.includes(s)) {
if (s.endsWith("ois") || s.endsWith("itis") || category00.includes(s) || categoryICS.includes(s) || MASS_NOUNS.includes(s)) {
return s;
}

Expand Down
4 changes: 2 additions & 2 deletions src/tagger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { MODALS } = require("./util");
const { MASS_NOUNS } = require("./util");

const ADJS = ['jj', 'jjr', 'jjs'];
const ADVS = ['rb', 'rbr', 'rbs', 'rp'];
Expand Down Expand Up @@ -222,7 +222,7 @@ class PosTagger {
// transform 7: if a word has been categorized as a
// common noun and it ends with "s", then set its type to plural common noun (NNS)
if (word.match(/^.*[^s]s$/)) {
if (!MODALS.includes(word)) {
if (!MASS_NOUNS.includes(word)) {
tag = "nns";
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ Util.Phones = {

Util.RE = function (a, b, c) { return new RE(a, b, c) };

Util.MODALS = ['abalone', 'asbestos', 'barracks', 'bathos', 'breeches', 'beef', 'britches', 'chaos', 'cognoscenti', 'clippers', 'corps', 'cosmos', 'crossroads', 'diabetes', 'ethos', 'gallows', /*'gas',*/ 'graffiti', 'herpes', 'innings', 'lens', 'means', 'measles', 'mews', 'mumps', 'news', 'pathos', 'pincers', 'pliers', 'proceedings', 'rabies', 'rhinoceros', 'sassafras', 'scissors', 'series', 'shears', 'species', 'tuna', 'acoustics', 'aesthetics', 'aquatics', 'basics', 'ceramics', 'classics', 'cosmetics', 'dialectics', 'deer', 'dynamics', 'ethics', 'harmonics', /*'happiness', 'hardness', 'shortness',*/ 'heroics', 'mechanics', 'metrics', 'ooze', 'optics', /*'people',*/ 'physics', 'polemics', 'pyrotechnics', 'quadratics', /*'quarters',*/ 'salespeople', 'statistics', 'tactics', 'tropics', 'bengalese', 'bengali', 'bonsai', 'booze', 'cellulose', 'mess', 'moose', 'burmese', 'chinese', 'colossus', 'congolese', 'discus', 'electrolysis', 'emphasis', 'expertise', 'flu', 'fructose', 'gauze', 'glucose', 'grease', 'guyanese', 'haze', 'incense', 'japanese', 'lebanese', 'malaise', 'mayonnaise', 'maltese', 'music', 'money', 'menopause', 'merchandise', 'olympics', 'overuse', 'paradise', 'poise', 'polymerase', 'portuguese', 'prose', 'recompense', 'remorse', 'repose', 'senegalese', 'siamese', 'singhalese', 'innings', 'sleaze', 'sioux', 'sudanese', 'suspense', 'swiss', 'taiwanese', 'vietnamese', 'unease', 'aircraft', 'anise', 'antifreeze', 'applause', 'archdiocese', 'apparatus', 'asparagus', 'barracks', 'bellows', 'bison', 'bluefish', 'bourgeois', 'bream', 'brill', 'butterfingers', 'cargo', 'carp', 'catfish', 'chassis', 'clothes', 'chub', 'cod', 'codfish', 'coley', 'contretemps', 'corps', 'crawfish', 'crayfish', 'crossroads', 'cuttlefish', 'deer', 'dice', 'dogfish', 'doings', 'dory', 'downstairs', 'eldest', 'earnings', 'economics', 'electronics', 'firstborn', 'fish', 'flatfish', 'flounder', 'fowl', 'fry', 'fries', 'works', 'goldfish', 'golf', 'grand', 'grief', 'haddock', 'hake', 'halibut', 'headquarters', 'herring', 'hertz', 'horsepower', 'goods', 'hovercraft', 'ironworks', 'kilohertz', 'ling', 'shrimp', 'swine', 'lungfish', 'mackerel', 'macaroni', 'means', 'megahertz', 'moorfowl', 'moorgame', 'mullet', 'nepalese', 'offspring', 'pants', 'patois', 'pekinese', 'perch', 'pickerel', 'pike', 'potpourri', 'precis', 'quid', 'rand', 'rendezvous', 'roach', 'salmon', 'samurai', 'series', 'seychelles', 'shad', 'sheep', 'shellfish', 'smelt', 'spaghetti', 'spacecraft', 'species', 'starfish', 'stockfish', 'sunfish', 'superficies', 'sweepstakes', 'smallpox', 'swordfish', 'tennis', 'tobacco', 'triceps', 'trout', 'tuna', 'tunafish', 'turbot', 'trousers', 'turf', 'dibs', 'undersigned', 'waterfowl', 'waterworks', 'waxworks', 'wildfowl', 'woodworm', 'yen', 'aries', 'pisces', 'forceps', 'jeans', 'mathematics', 'news', 'odds', 'politics', 'remains', 'goods', 'aids', 'wildlife', 'shall', 'would', 'may', 'might', 'ought', 'should', 'wildlife'];
Util.MASS_NOUNS = ['acne', 'admiration', 'advice', 'air', 'anger', 'anticipation', 'assistance', 'awareness', 'bacon', 'baggage', 'blood', 'bravery', 'chess', 'clay', 'clothing', 'coal', 'compliance', 'comprehension', 'confusion', 'consciousness', 'cream', 'darkness', 'diligence', 'dust', 'education', 'electrolysis', 'empathy', 'enthusiasm', 'envy', 'equality', 'equipment', 'evidence', 'feedback', 'fitness', 'flattery', 'foliage', 'fun', 'furniture', 'garbage', 'gold', 'gossip', 'grammar', 'gratitude', 'gravel', 'guilt', 'happiness', 'hardware', 'hate', 'hay', 'health', 'heat', 'help', 'hesitation', 'homework', 'honesty', 'honor/honour', 'hospitality', 'hostility', 'humanity', 'humility', 'ice', 'immortality', 'independence', 'information', 'integrity', 'intimidation', 'jargon', 'jealousy', 'jewelry', 'justice', 'knowledge', 'literacy', 'logic', 'luck', 'lumber', 'luggage', 'mail', 'management', 'merchandise', 'milk', 'morale', 'mud', 'music', 'nonsense', 'oppression', 'optimism', 'oxygen', 'participation', 'pay', 'peace', 'people', 'salespeople', 'perseverance', 'pessimism', 'pneumonia', 'poetry', 'police', 'pride', 'privacy', 'propaganda', 'public', 'punctuation', 'recovery', 'rice', 'rust', 'satisfaction', 'shame', 'sheep', 'slang', 'software', 'spaghetti', 'stamina', 'starvation', 'steam', 'steel', 'stuff', 'support', 'sweat', 'thunder', 'timber', 'toil', 'traffic', 'training', 'trash', 'understanding', 'valor', 'vehemence', 'violence', 'warmth', 'waste', 'weather', 'wheat', 'wisdom', 'work'];
Util.MASS_NOUNS = ['abalone', 'asbestos', 'barracks', 'bathos', 'breeches', 'beef', 'britches', 'chaos', 'cognoscenti', 'clippers', 'corps', 'cosmos', 'crossroads', 'diabetes', 'ethos', 'gallows', 'graffiti', 'herpes', 'innings', 'lens', 'means', 'measles', 'mews', 'mumps', 'news', 'pathos', 'pincers', 'pliers', 'proceedings', 'rabies', 'rhinoceros', 'sassafras', 'scissors', 'series', 'shears', 'species', 'tuna', 'acoustics', 'aesthetics', 'aquatics', 'basics', 'ceramics', 'classics', 'cosmetics', 'dialectics', 'deer', 'dynamics', 'ethics', 'harmonics', 'heroics', 'mechanics', 'metrics', 'ooze', 'optics', 'physics', 'polemics', 'pyrotechnics', 'statistics', 'tactics', 'tropics', 'bengalese', 'bengali', 'bonsai', 'booze', 'cellulose', 'mess', 'moose', 'burmese', 'chinese', 'colossus', 'congolese', 'discus', 'electrolysis', 'emphasis', 'expertise', 'flu', 'fructose', 'gauze', 'glucose', 'grease', 'guyanese', 'haze', 'incense', 'japanese', 'lebanese', 'malaise', 'mayonnaise', 'maltese', 'music', 'money', 'menopause', 'merchandise', 'olympics', 'overuse', 'paradise', 'poise', 'potash', 'portuguese', 'prose', 'recompense', 'remorse', 'repose', 'senegalese', 'siamese', 'singhalese', 'innings', 'sleaze', 'sioux', 'sudanese', 'suspense', 'swiss', 'taiwanese', 'vietnamese', 'unease', 'aircraft', 'anise', 'antifreeze', 'applause', 'archdiocese', 'apparatus', 'asparagus', 'barracks', 'bellows', 'bison', 'bluefish', 'bourgeois', 'bream', 'brill', 'butterfingers', 'cargo', 'carp', 'catfish', 'chassis', 'clothes', 'chub', 'cod', 'codfish', 'coley', 'contretemps', 'corps', 'crawfish', 'crayfish', 'crossroads', 'cuttlefish', 'deer', 'dice', 'dogfish', 'doings', 'dory', 'downstairs', 'eldest', 'earnings', 'economics', 'electronics', 'firstborn', 'fish', 'flatfish', 'flounder', 'fowl', 'fry', 'fries', 'works', 'goldfish', 'golf', 'grand', 'grief', 'haddock', 'hake', 'halibut', 'headquarters', 'herring', 'hertz', 'horsepower', 'goods', 'hovercraft', 'ironworks', 'kilohertz', 'ling', 'shrimp', 'swine', 'lungfish', 'mackerel', 'macaroni', 'means', 'megahertz', 'moorfowl', 'moorgame', 'mullet', 'nepalese', 'offspring', 'pants', 'patois', 'pekinese', 'perch', 'pickerel', 'pike', 'potpourri', 'precis', 'quid', 'rand', 'rendezvous', 'roach', 'salmon', 'samurai', 'series', 'seychelles', 'shad', 'sheep', 'shellfish', 'smelt', 'spaghetti', 'spacecraft', 'species', 'starfish', 'stockfish', 'sunfish', 'superficies', 'sweepstakes', 'smallpox', 'swordfish', 'tennis', 'tobacco', 'triceps', 'trout', 'tuna', 'tunafish', 'turbot', 'trousers', 'turf', 'dibs', 'undersigned', 'waterfowl', 'waterworks', 'waxworks', 'wildfowl', 'woodworm', 'yen', 'aries', 'pisces', 'forceps', 'jeans', 'mathematics', 'news', 'odds', 'politics', 'remains', 'goods', 'aids', 'wildlife', 'shall', 'would', 'may', 'might', 'ought', 'should', 'wildlife', 'acne', 'admiration', 'advice', 'air', 'anger', 'anticipation', 'assistance', 'awareness', 'bacon', 'baggage', 'blood', 'bravery', 'chess', 'clay', 'clothing', 'coal', 'compliance', 'comprehension', 'confusion', 'consciousness', 'cream', 'darkness', 'diligence', 'dust', 'education', 'electrolysis', 'empathy', 'enthusiasm', 'envy', 'equality', 'equipment', 'evidence', 'feedback', 'fitness', 'flattery', 'foliage', 'fun', 'furniture', 'garbage', 'gold', 'gossip', 'grammar', 'gratitude', 'gravel', 'guilt', 'happiness', 'hardware', 'hate', 'hay', 'health', 'heat', 'help', 'hesitation', 'homework', 'honesty', 'honor', 'honour', 'hospitality', 'hostility', 'humanity', 'humility', 'ice', 'immortality', 'independence', 'information', 'integrity', 'intimidation', 'jargon', 'jealousy', 'jewelry', 'justice', 'knowledge', 'literacy', 'logic', 'luck', 'lumber', 'luggage', 'mail', 'management', 'merchandise', 'milk', 'morale', 'mud', 'music', 'nonsense', 'oppression', 'optimism', 'oxygen', 'participation', 'pay', 'peace', 'perseverance', 'pessimism', 'pneumonia', 'poetry', 'police', 'pride', 'privacy', 'propaganda', 'public', 'punctuation', 'recovery', 'rice', 'rust', 'satisfaction', 'shame', 'sheep', 'slang', 'software', 'spaghetti', 'stamina', 'starvation', 'steam', 'steel', 'stuff', 'support', 'sweat', 'thunder', 'timber', 'toil', 'traffic', 'training', 'trash', 'valor', 'vehemence', 'violence', 'warmth', 'waste', 'weather', 'wheat', 'wisdom', 'work'];

module && (module.exports = Util);
4 changes: 2 additions & 2 deletions test/lexicon-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ describe('RiTa.Lexicon', function () {
.eql(["fantasize"]);

expect(RiTa.search('010', { type: 'stresses', limit: 5, pos: 'nns' }))
.eql(['abalone', 'abandonments', 'abatements', 'abbreviations', 'abdomens']);
.eql(['abandonments', 'abatements', 'abbreviations', 'abdomens', "abductions"]);

expect(RiTa.search('010', { type: 'stresses', limit: 5, pos: 'nns', numSyllables: 3 }))
.eql(['abatements', 'abdomens', "abductions", "abeyances", "abortions"]);
.eql(['abatements', 'abdomens', "abductions", "abeyances", "abortions" ]);

expect(RiTa.search('f-ah-n-t', { type: 'phones', pos: 'nns', limit: 3 }))
.eql(['elephants', 'infants', 'infantries']);
Expand Down

0 comments on commit 2f2d382

Please sign in to comment.