Skip to content

Commit

Permalink
[en] fix phrasal verbs with interposed 'it' or 'one' (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 authored Jul 6, 2024
1 parent 0670c09 commit 59eda1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/js/language/en/english-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const thirdPersonSgPresentSuffixInflections = [
];

const phrasalVerbParticles = ['aboard', 'about', 'above', 'across', 'ahead', 'alongside', 'apart', 'around', 'aside', 'astray', 'away', 'back', 'before', 'behind', 'below', 'beneath', 'besides', 'between', 'beyond', 'by', 'close', 'down', 'east', 'west', 'north', 'south', 'eastward', 'westward', 'northward', 'southward', 'forward', 'backward', 'backwards', 'forwards', 'home', 'in', 'inside', 'instead', 'near', 'off', 'on', 'opposite', 'out', 'outside', 'over', 'overhead', 'past', 'round', 'since', 'through', 'throughout', 'together', 'under', 'underneath', 'up', 'within', 'without'];
const phrasalVerbPrepositions = ['aback', 'about', 'above', 'across', 'after', 'against', 'ahead', 'along', 'among', 'apart', 'around', 'as', 'aside', 'at', 'away', 'back', 'before', 'behind', 'below', 'between', 'beyond', 'by', 'down', 'even', 'for', 'forth', 'forward', 'from', 'in', 'into', 'it', 'of', 'off', 'on', 'one', 'onto', 'open', 'out', 'over', 'past', 'round', 'through', 'to', 'together', 'toward', 'towards', 'under', 'up', 'upon', 'way', 'with', 'without'];
const phrasalVerbPrepositions = ['aback', 'about', 'above', 'across', 'after', 'against', 'ahead', 'along', 'among', 'apart', 'around', 'as', 'aside', 'at', 'away', 'back', 'before', 'behind', 'below', 'between', 'beyond', 'by', 'down', 'even', 'for', 'forth', 'forward', 'from', 'in', 'into', 'of', 'off', 'on', 'onto', 'open', 'out', 'over', 'past', 'round', 'through', 'to', 'together', 'toward', 'towards', 'under', 'up', 'upon', 'way', 'with', 'without'];

const particlesDisjunction = phrasalVerbParticles.join('|');
const phrasalVerbWordSet = new Set([...phrasalVerbParticles, ...phrasalVerbPrepositions]);
Expand Down
2 changes: 2 additions & 0 deletions test/language/english-transforms.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ const tests = [
valid: true,
tests: [
{term: 'look up', source: 'look something up', rule: 'v_phr', reasons: ['interposed object']},
{term: 'look up', source: 'look it up', rule: 'v_phr', reasons: ['interposed object']},
{term: 'look up', source: 'look one up', rule: 'v_phr', reasons: ['interposed object']},
{term: 'look up', source: 'looking up', rule: 'v_phr', reasons: ['ing']},
{term: 'look up', source: 'looked up', rule: 'v_phr', reasons: ['past']},
{term: 'look up', source: 'looks up', rule: 'v_phr', reasons: ['3rd pers. sing. pres']},
Expand Down

0 comments on commit 59eda1f

Please sign in to comment.