From a45865e106118d020aad4a2c9ac0108190300234 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Tue, 16 Jan 2024 16:22:04 -0500 Subject: [PATCH] one test failing --- scratch.js | 2 +- src/2-two/contraction-two/compute/apostrophe-s.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scratch.js b/scratch.js index 7beb8f73b..70daae0c4 100644 --- a/scratch.js +++ b/scratch.js @@ -4,7 +4,7 @@ import nlp from './src/three.js' // nlp.plugin(plg) // nlp.verbose('tagger') -let doc = nlp(`The project's behind schedule`).debug() +let doc = nlp(`The meeting's scheduled for 3 PM`).debug() // let doc = nlp(`The sun's setting`).debug() console.log(doc.docs[0]) // nlp(`He'd never let us`).debug() diff --git a/src/2-two/contraction-two/compute/apostrophe-s.js b/src/2-two/contraction-two/compute/apostrophe-s.js index 202a2bd58..c78ca91d5 100644 --- a/src/2-two/contraction-two/compute/apostrophe-s.js +++ b/src/2-two/contraction-two/compute/apostrophe-s.js @@ -52,6 +52,10 @@ const isOrHas = (terms, i) => { } // The meeting's scheduled vs The plane's landed if (t.tags.has('PastTense')) { + // meeting's scheduled for + if (terms[o + 1] && terms[o + 1].normal === 'for') { + return 'is' + } return 'has' } }