diff --git a/lib/lexicon/misc/expressions.js b/lib/lexicon/misc/expressions.js index c52374aec..970a1bd92 100644 --- a/lib/lexicon/misc/expressions.js +++ b/lib/lexicon/misc/expressions.js @@ -61,6 +61,7 @@ export default [ 'hurray', 'huzzah', 'jeez', + 'lah', 'lmao', 'lmfao', 'lol', diff --git a/lib/lexicon/verbs/phrasals.js b/lib/lexicon/verbs/phrasals.js index 1cde855af..2b10deba4 100644 --- a/lib/lexicon/verbs/phrasals.js +++ b/lib/lexicon/verbs/phrasals.js @@ -620,7 +620,6 @@ export default [ 'settle in', 'settle out', 'settle up', - 'settle for', 'shack up', 'shade in', 'shake down', diff --git a/lib/switches/adj-past.js b/lib/switches/adj-past.js index 5b1f6cdc7..aebde1874 100644 --- a/lib/switches/adj-past.js +++ b/lib/switches/adj-past.js @@ -104,6 +104,7 @@ export default { 'simulated', 'specialized', 'specified', + 'settled', 'steamed', 'stereotyped', 'striped', diff --git a/lib/switches/clues/adjective.js b/lib/switches/clues/adjective.js index 6c39b9de2..8503f5601 100644 --- a/lib/switches/clues/adjective.js +++ b/lib/switches/clues/adjective.js @@ -44,5 +44,6 @@ export default { afterWords: { too: jj, //insulting too also: jj, //insulting too + or: jj, //insulting or }, } diff --git a/lib/switches/clues/gerund.js b/lib/switches/clues/gerund.js index 9d4461b34..a4553de69 100644 --- a/lib/switches/clues/gerund.js +++ b/lib/switches/clues/gerund.js @@ -42,6 +42,8 @@ export default { hate: g, hates: g, hated: g, + was: g,//was working + is: g, }, afterWords: { you: g, //telling you diff --git a/lib/switches/clues/noun.js b/lib/switches/clues/noun.js index f2cca4b0c..77237daea 100644 --- a/lib/switches/clues/noun.js +++ b/lib/switches/clues/noun.js @@ -23,7 +23,7 @@ export default { ownTags: { ProperNoun: nn }, beforeWords: { with: nn,//with cakes - was: nn, //was time + was: nn, //was time -- was working is: nn, // of: nn, //of power for: nn, //for rats diff --git a/lib/switches/clues/past.js b/lib/switches/clues/past.js index 5b3bb1161..bc9f995c1 100644 --- a/lib/switches/clues/past.js +++ b/lib/switches/clues/past.js @@ -25,5 +25,8 @@ export default { in: pst, //crowded in up: pst, //heated up down: pst, //hammered down + for: pst, //settled for + the: pst, //settled the + with: pst, //obsessed with }, } diff --git a/lib/switches/clues/verb.js b/lib/switches/clues/verb.js index 1d4a5455d..0aa75f555 100644 --- a/lib/switches/clues/verb.js +++ b/lib/switches/clues/verb.js @@ -24,6 +24,15 @@ export default { to: vb, //to date please: vb, //please check will: vb, //will check + have: vb, + had: vb, + would: vb, + could: vb, + should: vb, + do: vb, + does: vb, + can: vb, + must: vb, }, afterWords: { the: vb, //echo the @@ -36,5 +45,6 @@ export default { a: vb, //covers a an: vb, //covers an from: vb, //ranges from + // for: vb, //settled for }, } diff --git a/scratch.js b/scratch.js index c90a79611..7b11e2e4e 100644 --- a/scratch.js +++ b/scratch.js @@ -44,17 +44,15 @@ let txt // txt= 'Thursday works for me.' // txt= 'She is going to be a kinesiologist, sports injury therapist.' // txt= 'Does that work?' -// txt= 'Bob Bowen' -// txt= 'Drew Fossum' +txt = 'Bob Bowen' // txt= 'Drew Fossum' +// txt = 'Drew Fossum' // txt= 'bob k' // txt= "You're right, Sue." // txt= 'Day One Interviews Day Two Interviews' // txt= 'Sue and Jeff --' -// txt= 'Are you playing golf?' // txt= 'Has Liz finished with gathering the documents?' // txt= 'Increases longevity.' -txt = 'Dr. Fortier was one of 15 people to receive the Carnegie Medal on Monday.' // txt= 'The Superdome stadium is without power, and toilets are overflowing.' // txt= 'You are requesting a legitimate service and you are paying for it !!' // txt= 'Visit message boards and post this article as a new message by highlighting the text of this letter and selecting paste from the edit menu.' @@ -76,9 +74,7 @@ txt = 'Dr. Fortier was one of 15 people to receive the Carnegie Medal on Monday. // txt= 'I had a conversation with the woman running this place in April 2010.' // txt= 'Great Cookies, Cakes, and Customer Service' // txt= 'May, 2009.' -// txt= 'I put the coffee thing in hot water and settled for a cup of weak coffee.' -txt = 'yo we should' let doc = nlp(txt).debug() // bug 1 diff --git a/src/2-two/postTagger/model/verbs/verb-noun.js b/src/2-two/postTagger/model/verbs/verb-noun.js index 82e4f0a01..8e4d964bd 100644 --- a/src/2-two/postTagger/model/verbs/verb-noun.js +++ b/src/2-two/postTagger/model/verbs/verb-noun.js @@ -161,6 +161,8 @@ export default [ { match: '(do|did|will) [#Singular] #Noun', group: 0, tag: 'PresentTense', reason: 'do-serve-fish' }, // tastes good { match: '[(tastes|smells)] #Adverb? #Adjective', group: 0, tag: 'PresentTense', reason: 'tastes-good' }, + // are you plauing golf + { match: '^are #Pronoun [#Noun]', group: 0, ifNo: ['here', 'there'], tag: 'Verb', reason: 'are-you-x' }, // ignoring commute { match: '#Copula #Gerund [#PresentTense] !by?', diff --git a/src/2-two/preTagger/compute/3rd-pass/04-switchChange.js b/src/2-two/preTagger/compute/3rd-pass/04-switchChange.js index f2530b4bf..2469c18f4 100644 --- a/src/2-two/preTagger/compute/3rd-pass/04-switchChange.js +++ b/src/2-two/preTagger/compute/3rd-pass/04-switchChange.js @@ -76,8 +76,8 @@ const swtichLexicon = function (terms, i, model) { let parents = model.two.tagSet[tag].parents fastTag(term, parents, `3-switch-infer from ${tag}`) } + break //one hint is good-enough } - break //one hint is good-enough } } } diff --git a/src/2-two/preTagger/model/lexicon/_data.js b/src/2-two/preTagger/model/lexicon/_data.js index 7b770a9eb..018ed6f7f 100644 --- a/src/2-two/preTagger/model/lexicon/_data.js +++ b/src/2-two/preTagger/model/lexicon/_data.js @@ -7,7 +7,7 @@ export default { "Condition": "true¦lest,unless", "PastTense": "true¦be2came,d1had,lied,mea0sa1taken,we0;nt;id;en,gan", "Gerund": "true¦accord0be0develop0go0result0stain0;ing", - "Expression": "true¦a0Qb0Mco0Ld0He0Ffuck,g09hUjeez,lRmQnOoLpIshHtGuDvoi0Sw6y0;a4e3i1u0;ck,p;kYp0;ee,pee;ah,p,s;!a,h6y;ah5elcome,h2o1t0;af,f;rd up,w;e1o0;a,ops;e,w;oo;gh,h0;! 0h,m;huh,oh;sk,ut tut;eesh,hh,it;ff,h1l0ow,sst;ease,z;ew,ooey;h1i,o0uch,w,y;h,o,ps;!h;ah,o0;!pe;eh,mm;m1ol0;!s;ao,fao;aBe9i7mm,o2u0;h,mph,rra0zzB;h,y;ly1o0;r4y8;! 0;cow,moCsmok0;es;!p hip hoor0;ay;e,ll0y;!o;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;e0h,t cetera,ww;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;ngratulations,wabunga;a2oo1r0ye;avo,r;!ya;h,m; 1h0las,men,rgh;!a,em,oy;la", + "Expression": "true¦a0Qb0Mco0Ld0He0Ffuck,g09hUjeez,lRmQnOoLpIshHtGuDvoi0Sw6y0;a4e3i1u0;ck,p;kYp0;ee,pee;ah,p,s;!a,h6y;ah5elcome,h2o1t0;af,f;rd up,w;e1o0;a,ops;e,w;oo;gh,h0;! 0h,m;huh,oh;sk,ut tut;eesh,hh,it;ff,h1l0ow,sst;ease,z;ew,ooey;h1i,o0uch,w,y;h,o,ps;!h;ah,o0;!pe;eh,mm;ah,m1ol0;!s;ao,fao;aBe9i7mm,o2u0;h,mph,rra0zzB;h,y;ly1o0;r4y8;! 0;cow,moCsmok0;es;!p hip hoor0;ay;e,ll0y;!o;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;e0h,t cetera,ww;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;ngratulations,wabunga;a2oo1r0ye;avo,r;!ya;h,m; 1h0las,men,rgh;!a,em,oy;la", "Negative": "true¦n0;ever,o0;n,t", "QuestionWord": "true¦how3wh0;at,e1ich,o0y;!m,se;n,re; come,'s", "Plural": "true¦records", @@ -48,5 +48,5 @@ export default { "Determiner": "true¦aBboth,d9e6few,l4mu8neiDown,plenty,s3th2various,wh0;at0ich0;evC;at,e4is,ose;everal,ome;a,e0;!ast,s;a1i6l0very;!se;ch;e0u;!s;!n0;!o0y;th0;er", "Verb": "true¦awak9born,cannot,fr8g7h5k3le2m1s0wors9;e8h3;ake sure,sg;ngth6ss6;eep tabs,n0;own;as0e2;!t2;iv1onna;ight0;en", "Modal": "true¦c5lets,m4ought3sh1w0;ill,o5;a0o4;ll,nt;! to,a;ight,ust;an,o0;uld", - "PhrasalVerb": "true¦0:80;1:8D;2:7P;3:83;4:7I;5:8G;6:7D;7:7O;8:7B;9:85;A:7Y;B:88;C:86;D:7Z;E:6K;F:6D;a8Jb72c66d61e60f4Yg4Gh3Wiron0j3Sk3Nl34m2Qn2Oo2Mp23quietEr1Os0GtWuUvacuum 2wJyammerAzG;ero Dip HonG;e0k0;by,up;aNeIhHiGor7Urit38;mp0n35pe0r8s8;eel Dip 8O;aIiGn2T;gh Grd0;in,up;n Dr G;d1in,o4D;it 6Hk8lk Hrm 0Ysh Gt78v5F;aw3d1o5up;aw3in,o83;rgeAsG;e 6herF;aVeThRiNoMrIuGypL;ckFrn G;d1in,o45up;aHiGot0y 2P;ckleEp 89;ckEdG;e 0N;neEp 30s4Z;ck IdHe Gghte5Yme0p o0Ire0;aw3ba4d1in,up;e 6Gy 2;by,oC;ink Grow 6T;ba4ov7up;aGe 6Ell5G;m 2r 53;ckAke Hlk G;ov7shit,u5H;aGba4d1in,o3Pup;ba4ft7p5Mw3;a0Mc0Le0Eh0Ai07l03m02n01o00pVquar4XtMuKwG;earIiG;ngHtch G;aw3ba4o7N; by;ck Git 2m 2ss0;in,o7Aup;aMe11iLoJrHuG;c3Rd2P;aigh23iG;ke 6Vn3L;p Grm25;by,in,oC;n3Mr 2tc44;c3Lmp0nd Gr7Eve9y 2;ba4d1up;ar3JeJiIlHrGurA;ingAuc8;a3Rit 5Q;l18n 2;e68ll0;ber 2rt0und like;ap 56ow D;ash 5Voke0;eep HiGow 6;c1Mp 2;in,oG;ff,v7;de13gn HngGt 5Qz8; al5Lle0;in,o5up;aIoGu59;ot Gut0w 6T;aw3ba4f3SoC;c31deFk5Ove9;e Lll1Hnd KtG; Htle G;d1f3Oin,o5up;d1f59in,o5upG;!on;aw3ba4d1in,o2Mup;o6Bto;al5Gout0rap5G;il9v8;aTeQiPoLuG;b 59le0n Gstl8;aIba4d1inHoGt3Ku0X;ut,v7;!to;c2GrBw3;ll Iot HuG;g32nd9;a2Gf39o5;arBin,o5;ng 5Gp9;aGel9inFnt0;c5Pd G;o3Aup;c2Dt0;aUeTiRlPoNrKsyc2QuG;ll It G;aGba4d1in,o1Yt3Qup;p3Vw3;ap3Ud1in,o5t3Oup;attleAess HiJoG;p 2;ah1Yon;iGp 5Ur4AurEwer 5U;nt0;ay4QuG;gFmp 6;ck Gg0leAn 6p4N;o1Nup;el 4XncilF;c4Fir 2Wn0ss ItHy G;ba4oC; d1c2D;aw3ba4in,o1I;pGw4A;e49t D;arrowEerd0oG;d9teE;aQeNiMoIuG;ddl8lG;l 3U;c1MnkeyIp 6uth9ve G;aGd1in,o5up;l3Zw3; wi3W;ss0x 2;asur8lHss G;a1Nup;t 6;ke Hn 6rGs1Wx0;k 6ry9;do,o4Tup;aWeRiMoGuck0;aKc3Sg JoGse0;k Gse3Q;aft7ba4d1forw2Rin4Gov7uG;nd7p;in,o0U;d 6;e 04ghtJnIsHvG;e 3C;ten 4W;e 2k 2; 2e3H;ave It HvelG; o4F;d1go,in,o5up;in,oG;pen,ut;c8p 2sh GtchAugh9y25;in41o5;eHick9nock G;d1o48up;eGyF;l 2Wp G;aw3ba4d1fYin,o0Cto,up;aIoHuG;ic8mpF;ke39tE;c3Izz 2;aVeQiNoKuG;nHrrGsh 6;y 2;kerEt G;arBd1;lGneFrse32;d Ge 2;ba4d1fast,o03up;de Ht G;ba4on,up;aw3o5;aGlp0;d Il 2Er Gt 2;fGof;rom;in,oVu1J;c03m 2nHve Gz29;it,to;d Gg 2KkerI;d1in,o5;aUeOive Mloss 26oIrHunG; f0O;in3Mow 2G; Gof 25;aHb1Fit,oGrBt0Qu1A;ff,n,v7;bo5ft7hMw3;aw3ba4d1in,oGrise,up,w3;ff,n,ut;ar 6ek0t G;aHb19d1in,oGrBup;ff,n,ut,v7;cHhGl22rBt,w3;ead;ross;d aHnG;g 2;bo5;a0Ae03iUlQoMrIuG;cGe27;k 2;eHighten GownAy 2;aw3oC;eGshe1T; 2z8;lIol G;aGwi1M;bo5rB;d 6low 2;aHeGip0;sh0;g 6ke0mGrGttenE;e 2X;gNlLnJrHsGzzle0;h 2V;e Gm 2;aw3ba4up;d0isG;h 2;e Gl 1F;aw3fLin,o5;ht ba4ure0;eLnHsG;s 2;cId G;fGoC;or;e D;dYl 2;cKll Grm0t12;ap07bId1in,oHtG;hrough;ff,ut,v7;a4ehi26;e G;d1oCup;a0Kdge0nd 0Oy8;oJrG;aHess 6op G;aw3bWin,o1T;gAwA; 0Hubl0X;a00hXleaWoJrGut 15;ackAeep Goss D;by,d1in,oGup;n,ut;me JoHuntG; o1V;k 6l G;d1oC;aMbLforJin,oItHuG;nd7;ogeth7;n,ut,v7;th,wG;ard;a4y;pGrBw3;art;n 6;eGipF;ck Der G;on,up;lMncel0rKsItch HveF; in;o1Dup;h Dt G;doubt,oC;ry Gve 02;aw3o19;l HmE; d1;aGba4d1o16up;rBw3;a0Me0El07oYrLuG;bblIcklZil05lk 6ndlZrGst VtHy 16zz9;n 0AsG;t D;e G;ov7;anReaPiHush G;oCup;ghLng G;aIba4d1fGin,o5up;orG;th;bo5lGrBw3;ong;teG;n 2;k G;d1in,o5up;ch0;arNg 6iLn8oJssIttlHunce Gx D;aw3ba4;e 6; arB;k Dt 2;e 2;l 6;d1up;d 2;aLeed0oGurt0;cIw G;aw3ba4d1o5up;ck;k G;in,oX;ck0nk0st9; oLaJef 2nd G;d1ov7up;er;up;r0t G;d1in,oQup;ff,nG;to;ck Mil0nIrgHsG;h D;ainAe D;g DkA; on;in,o5; o5;aw3d1oGup;ff,ut;ay;cPdLsk Iuction9; oC;ff;arBo5;ouG;nd;d G;d1oGup;ff,n;own;t G;o5up;ut" + "PhrasalVerb": "true¦0:80;1:8D;2:7P;3:83;4:7I;5:8G;6:7D;7:7O;8:7B;9:85;A:7Y;B:88;C:86;D:7Z;E:6K;F:6C;a8Jb72c65d60e5Zf4Xg4Fh3Viron0j3Rk3Ml33m2Pn2No2Lp22quietEr1Ns0GtWuUvacuum 2wJyammerAzG;ero Dip HonG;e0k0;by,up;aNeIhHiGor7Urit37;mp0n34pe0r8s8;eel Dip 8O;aIiGn2S;gh Grd0;in,up;n Dr G;d1in,o4C;it 6Gk8lk Hrm 0Ysh Gt78v5E;aw3d1o5up;aw3in,o83;rgeAsG;e 6herF;aVeThRiNoMrIuGypL;ckFrn G;d1in,o44up;aHiGot0y 2O;ckleEp 89;ckEdG;e 0N;neEp 2Zs4Y;ck IdHe Gghte5Xme0p o0Ire0;aw3ba4d1in,up;e 6Gy 2;by,oC;ink Grow 6T;ba4ov7up;aGe 6Ell5F;m 2r 52;ckAke Hlk G;ov7shit,u5G;aGba4d1in,o3Oup;ba4ft7p5Lw3;a0Lc0Ke0Eh0Ai07l03m02n01o00pVquar4WtMuKwG;earIiG;ngHtch G;aw3ba4o7N; by;ck Git 2m 2ss0;in,o7Aup;aMe10iLoJrHuG;c3Qd2O;aigh22iG;ke 6Vn3K;p Grm24;by,in,oC;n3Lr 2tc43;c3Kmp0nd Gr7Eve9y 2;ba4d1up;ar3IeJiIlHrGurA;ingAuc8;a3Qit 5Q;l17n 2;e68ll0;ber 2rt0und like;ap 55ow D;ash 5Voke0;eep HiGow 6;c1Lp 2;in,oG;ff,v7;de12gn HngGt 5Qz8; al5Lle0;in,o5up;aIoGu59;ot Gut0w 6T;aw3ba4f3RoC;c30deFk5Ove9;e Kll1Gnd JtG; Gtl4V;d1f5Ain,o5upG;!on;aw3ba4d1in,o2Mup;o6Cto;al5Hout0rap5H;il9v8;aTeQiPoLuG;b 5Ale0n Gstl8;aIba4d1inHoGt3Ku0X;ut,v7;!to;c2GrBw3;ll Iot HuG;g32nd9;a2Gf39o5;arBin,o5;ng 5Hp9;aGel9inFnt0;c5Qd G;o3Aup;c2Dt0;aUeTiRlPoNrKsyc2QuG;ll It G;aGba4d1in,o1Yt3Qup;p3Vw3;ap3Ud1in,o5t3Oup;attleAess HiJoG;p 2;ah1Yon;iGp 5Vr4BurEwer 5V;nt0;ay4RuG;gFmp 6;ck Gg0leAn 6p4O;o1Nup;el 4YncilF;c4Gir 2Wn0ss ItHy G;ba4oC; d1c2D;aw3ba4in,o1I;pGw4B;e4At D;arrowEerd0oG;d9teE;aQeNiMoIuG;ddl8lG;l 3V;c1MnkeyIp 6uth9ve G;aGd1in,o5up;l40w3; wi3X;ss0x 2;asur8lHss G;a1Nup;t 6;ke Hn 6rGs1Wx0;k 6ry9;do,o4Uup;aWeRiMoGuck0;aKc3Tg JoGse0;k Gse3R;aft7ba4d1forw2Rin4Hov7uG;nd7p;in,o0U;d 6;e 04ghtJnIsHvG;e 3D;ten 4X;e 2k 2; 2e3I;ave It HvelG; o4G;d1go,in,o5up;in,oG;pen,ut;c8p 2sh GtchAugh9y25;in42o5;eHick9nock G;d1o49up;eGyF;l 2Xp G;aw3ba4d1fYin,o0Cto,up;aIoHuG;ic8mpF;ke3AtE;c3Jzz 2;aVeQiNoKuG;nHrrGsh 6;y 2;kerEt G;arBd1;lGneFrse33;d Ge 2;ba4d1fast,o03up;de Ht G;ba4on,up;aw3o5;aGlp0;d Il 2Fr Gt 2;fGof;rom;in,oVu1J;c03m 2nHve Gz2A;it,to;d Gg 2LkerI;d1in,o5;aUeOive Mloss 27oIrHunG; f0O;in3Now 2H; Gof 26;aHb1Fit,oGrBt0Qu1A;ff,n,v7;bo5ft7hMw3;aw3ba4d1in,oGrise,up,w3;ff,n,ut;ar 6ek0t G;aHb19d1in,oGrBup;ff,n,ut,v7;cHhGl23rBt,w3;ead;ross;d aHnG;g 2;bo5;a0Ae03iUlQoMrIuG;cGe28;k 2;eHighten GownAy 2;aw3oC;eGshe1U; 2z8;lIol G;aGwi1N;bo5rB;d 6low 2;aHeGip0;sh0;g 6ke0mGrGttenE;e 2Y;gNlLnJrHsGzzle0;h 2W;e Gm 2;aw3ba4up;d0isG;h 2;e Gl 1G;aw3fLin,o5;ht ba4ure0;eLnHsG;s 2;cId G;fGoC;or;e D;dYl 2;cKll Grm0t13;ap07bId1in,oHtG;hrough;ff,ut,v7;a4ehi27;e G;d1oCup;a0Ldge0nd 0Py8;oJrG;aHess 6op G;aw3bWin,o1U;gAwA; 0Iubl0Y;a00hXleaWoJrGut 16;ackAeep Goss D;by,d1in,oGup;n,ut;me JoHuntG; o1W;k 6l G;d1oC;aMbLforJin,oItHuG;nd7;ogeth7;n,ut,v7;th,wG;ard;a4y;pGrBw3;art;n 6;eGipF;ck Der G;on,up;lNncel0rKsItch HveF; in;o1Eup;h Dt G;doubt,oC;ry HvG;e 02;aw3o19;l HmE; d1;aGba4d1o16up;rBw3;a0Me0El07oYrLuG;bblIcklZil05lk 6ndlZrGst VtHy 16zz9;n 0AsG;t D;e G;ov7;anReaPiHush G;oCup;ghLng G;aIba4d1fGin,o5up;orG;th;bo5lGrBw3;ong;teG;n 2;k G;d1in,o5up;ch0;arNg 6iLn8oJssIttlHunce Gx D;aw3ba4;e 6; arB;k Dt 2;e 2;l 6;d1up;d 2;aLeed0oGurt0;cIw G;aw3ba4d1o5up;ck;k G;in,oX;ck0nk0st9; oLaJef 2nd G;d1ov7up;er;up;r0t G;d1in,oQup;ff,nG;to;ck Mil0nIrgHsG;h D;ainAe D;g DkA; on;in,o5; o5;aw3d1oGup;ff,ut;ay;cPdLsk Iuction9; oC;ff;arBo5;ouG;nd;d G;d1oGup;ff,n;own;t G;o5up;ut" } \ No newline at end of file diff --git a/src/2-two/preTagger/model/switches/_data.js b/src/2-two/preTagger/model/switches/_data.js index 49b7feac1..98e8c1518 100644 --- a/src/2-two/preTagger/model/switches/_data.js +++ b/src/2-two/preTagger/model/switches/_data.js @@ -4,7 +4,7 @@ export default { "beforeTags": "Infinitive¦adverb,mod1negative,p0;lur0ronoun;al|Singular¦adject2determiner,gerund,infinit2noun,p0;as0ossess1resen0;ttense;ive", "afterTags": "Infinitive¦adverb,conjunc1determiner,p0;ossessive,reposi0;tion|Singular¦copula,modal,noun,p0value;as0resen0;ttense", "ownTags": "Singular¦propernoun", - "beforeWords": "Infinitive¦i,please,t1w0you;e,ill;hey,o|Singular¦a7cut6for,is,m3o2pl4save1than,w0;as,ith;!d,s;f,n;a1in0;us;de,ke0;!s;ll,ny", + "beforeWords": "Infinitive¦c4do3ha2i,must,please,sho5t1w0you;e,ill,o4;hey,o;d,ve;!es;an,o0;uld|Singular¦a7cut6for,is,m3o2pl4save1than,w0;as,ith;!d,s;f,n;a1in0;us;de,ke0;!s;ll,ny", "afterWords": "Infinitive¦a2from,h1it,me,the0you;!m;er,im;!n|Singular¦a2method,of,philosophy,r1system,t0util3;herapy,ool;eform,oom;id,uthor0;ity", "words": "true¦0:3D;1:3X;2:3V;3:3R;a3Ob3Hc2Yd2Je2Ef21g1Uh1Oi1Jj1Iki1Hl1Bm15n11o10p0Qr09sNtEupgra1WvBw5y4;awn,ield;a7hist3Ji6o4re3P;nd1r4;k,ry;nd,re,sh;rra1Jt4ve;ch,er;al1Ci5o4;te,w;ew,s2R;aAe3hought,i9o8r5u4wi3;ne,rn;a5eat,i4u3;bu3Fck;in,nsf1p;r1Nu2;me,p;l4rg31s3B;k,ly;cMeKhJiIlHmGneeze,pFt7u4;pp5r4spe2K;ge,pri0;ly,o2M;aAe9o7r5u4;dy,ff,mb2W;a1Xe4;ss,t2;p,r4;e,m;m,p;ck,in,ke,mp,re,te;i2Xla24rink2P;ePi2Oo1U;eep,i1Z;de,gn;a1Civ1o2R;a4n0r2V;r2t;a5o19r4;at2ew;le,re;aHe6isk,o5u4;in,le,sh;a3ot;as2GcBel,fAg9je1Wl0Ep8que3s6tu1Xv4waC;e4i0C;al,r0;er2Ko4t;l2Jrt;air,e2Lly,o1V;a6r24;act0Borm,u0;a5o4;rd;ll;i0n5t4;!e;ge,k;aCeBin,l8o7r5u4;mp,rcha0sh;ai0e2Co4;ce2Bdu17mi0te3;s15w1;a5u4;g,n1L;n,y;el,rm16;iTrt,ss,t2u0;ff1il;ame,e6o4;d,t4;e,i0X;ed,gle14;a7e6i5o4urd1;dZnitOp;lk,nd,rrN;asu07rchandi0ss;n,r4sk,t2;ch,k1C;a8e7i6o4u0C;a4ck,g,ve;d,n;ft,m0Qne,st;cRvQ;bEck,un2;ll,ss;am,ud0Z;n5ss4;ue;cr5fluZtervi4;ew;ea0;a7elp,iRo5u4;nt;n4pe,st,u0;or;nd4rm,te;!le;a9o8r7u4;ar5e19i4;de;antee,d;asp,ip,umb0Q;of,ssip;in,ze;aFeCiBl8o6rac5u4;el;tuC;cus,ol,r4;ce,eca3m;a5o4y;at,od,w;g,sh;re,sh,t,x;a4ed;r,tu4;re;ce,rm;cho,nvy,x4ye;c6erci0p4;eri4oW;enJ;el,hanZ;aFeCi9o8r5u4;mp;a5eam,i4;ft,nk;in;dTubt;p,s4vorB;li4play;ke;fe5posCsi4;gn,re;at,ct;maMn5r4te;e,t;ce;aKent1hGlaFo7r4;ed5u4y;sh;it;llap0m8n4ok,py,ugh,v1;ce6du5tr4;a3ol;ct;rn;bine,fo5m4;and,uO;rt;im,w;a5e4ip;at,ck;llen4n4r4se;ge;ke,ll,re,u0ve;se;a9o6ran2u4;bb6ck6dg4;et;a3mb,ne,o5ss,tt4x;le;k,st,t;nk,se;ddreGge,id,lt1nsw1ppCrchAss7tt5ucti4;on;a4empt;ck;i3ocia4;te;st;!i4;ve;e5roa2;ch;al;er;ss", "fallback": "Infinitive" @@ -13,8 +13,8 @@ export default { "beforeTags": "Adjective¦copula,determiner,possessive|Gerund¦adv1conjunc0preposi0v1;tion;erb", "afterTags": "Adjective¦adjective,noun|Gerund¦adverb,co2determiner,p0;ers3ossessive,r0;eposi1onoun;njunc0pula;ti0;on", "ownTags": "", - "beforeWords": "Adjective¦a9b7deep8extreme8fe5it,most8ov4profound8quite,re3s1to0und4very,we2;o,t2;eem8o,ti0;ll;al4;er;el0lt;!s;ad0ut;ly;lso,ppear0;!ed,s|Gerund¦a6be5continue,h3keep,love4st0;art1op0;!ped,s;!ed,s;ate0elp3;!d,s;!en,gan;m,void0;!s", - "afterWords": "Adjective¦also,too|Gerund¦about,h1it,me,on,the0you;ir,m,re;er,im", + "beforeWords": "Adjective¦a9b7deep8extreme8fe5it,most8ov4profound8quite,re3s1to0und4very,we2;o,t2;eem8o,ti0;ll;al4;er;el0lt;!s;ad0ut;ly;lso,ppear0;!ed,s|Gerund¦a6be5continue,h3is,keep,love4st0was;art1op0;!ped,s;!ed,s;ate0elp3;!d,s;!en,gan;m,void0;!s", + "afterWords": "Adjective¦also,or,too|Gerund¦about,h1it,me,on,the0you;ir,m,re;er,im", "words": "true¦0:1Y;1:1W;2:1N;3:1L;a1Ib1Fc11d0Pe0Jf0Dg08h07i03jud1DlZmXoVpSrMsCt7u4veUy6;ny5p4;lif1set1;iel1I;aQe7hr5i3ouc1Jr4wis1;eToub2us1yi0;ea09i4;l2vi0;l2mp1;atisf0Qcreec1EhocTkyrocke1lo0MoBpAriTt6ur5we4;e0Ll2;gi0pri1Hroun1A;a5ea1Hi4riQun0U;mula1r3;gge3r4;t2vi0;ark2ee15;a4ot16;ki0ri0;a8e5ive1o4us14;a3l2;fres12ig0Lla9v4war10;ea2itali4;si0zi0;gi0ll0Bmb2vi0;a0Aerple5r4un0X;es12o0J;xi0;pEut4verwhel11;goi0st0H;eande3is0Yo02u4;mb2;a5i4o00;fesaZmi1;c4g0F;ki0;m6n4rrita1;sul1te0Ovi4;go0Wti0;po0P;arro7ea2orrifVumilia1;l7r4;a1ipPo5uel4;i0li0;wi0;a3ea0K;a8etc0Dit1l7o6r4ulfil2;ee0Ligh4ust0N;teU;rebo08un08;atte3oA;di0scina1;m7n5x4;ac1ci1is1;ab2c4du3gaVsui0;han1ouraU;barras08erTpo4;we3;aEe8i4;s4zzC;appoin1t4;r4u0B;ac1es02;c7fiFm6pres01ser5velo4;pi0;vi0;anReaC;a4liB;yi0;maGri0sQun1;aGhDloUo4ripp2ut1;m8n4rresponM;cer6f5spi3tr4;as1ol2;lic1uQ;ni0;for1m6p4;el2ro4;miM;anE;a4ea1il2;llen4rK;gi0;lIptiva1;ecoHlin9o5ruiGu4;d8st2;oFri0unci0;bsoLcIgFlarEmCppea2rAs4;pi3su3to4;n5un4;di0;is4;hi0;ri0;res1;li0;a8u4;si0;mi0;i0on4;i4zi0;zi0;cele4hi0;ra1;ti0;rbi0;ng", "fallback": "Adjective" }, @@ -23,7 +23,7 @@ export default { "afterTags": "Adjective¦adjective,noun|PastTense¦determiner,p0;ossessive,ronoun", "ownTags": "", "beforeWords": "Adjective¦a9b7deep8extreme8fe5it,most8ov4profound8quite,re3s1to0und4very,we2;o,t2;eem8o,ti0;ll;al4;er;el0lt;!s;ad0ut;ly;lso,ppear0;!ed,s|PastTense¦been,ha0;d,s,ve", - "afterWords": "Adjective¦also,too|PastTense¦b0down,in,out,up;ack,y", + "afterWords": "Adjective¦also,or,too|PastTense¦b0down,for,in,out,the,up,with;ack,y", "words": "true¦0:14;1:11;a11b0Yc0Jd07e05f02gift0hZiUjTknown,liSmQoOpKquaJrFs6t5u3ve01w2;arp0eath0Qorri0;ni2pd1s0;fi0t0;arn09roubl0;a8ca7et07im6peci5t3u2;bsid0FspeB;e2rip0;am0reotyp0;al0Cfi0;p9ul1;r0tt0G;t2ut0;is0Kur1;a4e2;cov0Cf0Dgul1stri2;ct0;lli0ti0G;li0F;arallel0le0HolUr2u05;e3o2;cWloVnou0J;ferr0oc3par0;c2rganY;cupi0;easHix0o2;di07tW;cens0mit0;agg0us04;mp5n2;br0t2;e2oxic1;gr1nYrest0;li0oE;ammTe1o2;ok0r2;riX;aYix0r2;a2i0;ct3gment0;duc1ns2quipp0stabl9xperie00;ur0;aCe8i2;gniQmin6s2;ciplKgrun4t2;o2r8;rt0;tl0;ish0;central8pr4ra3t2velop0;aLermE;ng0;ess0;mag0t0;eDharg0lBo7r5u2;lt3stom2;iz0;iv1;a2owd0;mp0;d0mb4n2ok0;sid2troll0;er0;in0;as2os0;si4;lebr1r2;ti2;fi0;ala7i3o2urn0;il0;as0;cknowledg0d3nim1ppreci1ssum0;at0;opt0va2;nc0;ed", "fallback": "Adjective" }, @@ -49,7 +49,7 @@ export default { "beforeTags": "Person¦honorific,p0;ers0repositi0;on|Infinitive¦adverb,mod1negative,p0;lur0ronoun;al", "afterTags": "Person¦p0verb;erson,ropernoun|Infinitive¦adverb,conjunc1determiner,p0;ossessive,reposi0;tion", "ownTags": "", - "beforeWords": "Person¦dear,h0yo;e0i;llo,y|Infinitive¦i,please,t1w0you;e,ill;hey,o", + "beforeWords": "Person¦dear,h0yo;e0i;llo,y|Infinitive¦c4do3ha2i,must,please,sho5t1w0you;e,ill,o4;hey,o;d,ve;!es;an,o0;uld", "afterWords": "Person¦fe7learn6play5s2t0;el7h0old;inks,ought;a1eems,ing,pend0;s,t;id,ng,ys;ed,s;!ed;e0lt;ls|Infinitive¦a2from,h1it,me,the0you;!m;er,im;!n", "words": "true¦b2chu3drew,ja3ma1ollie,pat,rob,su0wade;e,ng;ck,rk;ob,u0;ck", "fallback": "PresentTense" diff --git a/src/2-two/preTagger/model/switches/index.js b/src/2-two/preTagger/model/switches/index.js index 3ce9afb58..e12ee7cf7 100644 --- a/src/2-two/preTagger/model/switches/index.js +++ b/src/2-two/preTagger/model/switches/index.js @@ -8,6 +8,7 @@ const toTitleCase = function (str) { const titleCase = function (obj) { return Object.keys(obj).reduce((h, key) => { let name = toTitleCase(key).replace(/tense$/, 'Tense') + name = toTitleCase(key).replace(/noun$/, 'Noun') h[name] = obj[key] return h }, {}) @@ -44,4 +45,8 @@ Object.keys(presentPlural.words).forEach(str => { presentPlural.words = words switches.presentPlural = presentPlural +// random ad-hoc changes - +// 'was time' vs 'was working' +switches.gerundNoun.beforeWords.was = 'Gerund' + export default switches diff --git a/src/3-three/nouns/find.js b/src/3-three/nouns/find.js index f484b3dbe..5ec3f0cd2 100644 --- a/src/3-three/nouns/find.js +++ b/src/3-three/nouns/find.js @@ -17,6 +17,10 @@ const findNouns = function (doc) { m = m.splitOn('[#Pronoun] (#Determiner|#Value)', 0) // the noise the slide makes m = m.splitBefore('#Noun [(the|a|an)] #Adjective? #Noun', 0) + // here spencer slept + m = m.splitOn('[(here|there)] #Noun', 0) + // put it there + m = m.splitOn('[#Noun] (here|there)', 0) //ensure there's actually a noun m = m.if('#Noun') diff --git a/tests/three/nouns/noun-find.test.js b/tests/three/nouns/noun-find.test.js index a7c2412f4..548b76d38 100644 --- a/tests/three/nouns/noun-find.test.js +++ b/tests/three/nouns/noun-find.test.js @@ -94,6 +94,8 @@ test('noun-phrases', function (t) { `the unlikely captain of the largest international basketball team`, ['the unlikely captain of the largest international basketball team'], ], + [`are you here spencer?`, ['you', 'here', 'spencer?']], + [`put it there`, ['it', 'there']], ] arr.forEach(function (a) { const nouns = nlp(a[0]).nouns().out('array') diff --git a/tests/two/tagger/_pennSample.js b/tests/two/tagger/_pennSample.js index 9de4ab9ec..ab14e5774 100644 --- a/tests/two/tagger/_pennSample.js +++ b/tests/two/tagger/_pennSample.js @@ -2868,10 +2868,6 @@ export default [ text: 'The Ideation', tags: 'DT, NN', }, - { - text: 'Dr. Fortier was one of 15 people to receive the Carnegie Medal on Monday.', - tags: 'NNP, NNP, VBD, CD, IN, CD, NNS, TO, VB, DT, NNP, NNP, IN, NNP', - }, { text: 'Important information of big companies', tags: 'JJ, NN, IN, JJ, NNS',