Read 's before a copula as possessive, not as a contraction
This commit is contained in:
1 parent
6fd03e1913
commit
1b935cb309
3 files changed
+18
-1
No files matched your search
@@ -13,6 +13,8 @@ const beforePossessive = {
|
||||
}
|
||||
const adjLike = new Set(['too', 'also', 'enough', 'about'])
|
||||
const nounLike = new Set(['is', 'are', 'did', 'were', 'could', 'should', 'must', 'had', 'have'])
|
||||
// "is was" or "has was" can't happen, so a copula means the 's is possessive
|
||||
const copulas = new Set(['is', 'are', 'was', 'were', 'am'])
|
||||
|
||||
const isPossessive = (terms, i) => {
|
||||
const term = terms[i]
|
||||
@@ -68,6 +70,10 @@ const isPossessive = (terms, i) => {
|
||||
}
|
||||
//a gerund suggests 'is walking'
|
||||
if (nextTerm.tags.has('Verb')) {
|
||||
// 'leonard's was closed'
|
||||
if (copulas.has(nextTerm.normal)) {
|
||||
return true
|
||||
}
|
||||
//fix 'jamie's bite'
|
||||
if (nextTerm.tags.has('Infinitive')) {
|
||||
return true
|
||||
|
||||
@@ -58,7 +58,7 @@ export default [
|
||||
// became involved
|
||||
{ match: '(become|became|becoming|becomes) [#Verb]', group: 0, tag: 'Adjective', reason: 'become-verb' },
|
||||
// their declared intentions
|
||||
{ match: '#Possessive [#PastTense] #Noun', group: 0, tag: 'Adjective', reason: 'declared-intentions' },
|
||||
{ match: '#Possessive [#PastTense] #Noun', group: 0, notIf: '#Copula', tag: 'Adjective', reason: 'declared-intentions' },
|
||||
// is he cool
|
||||
{ match: '#Copula #Pronoun [%Adj|Present%]', group: 0, tag: 'Adjective', reason: 'is-he-cool' },
|
||||
// is crowded with
|
||||
|
||||
Reference in new issue
Block a user