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
@@ -141,6 +141,9 @@ test('is-has', function (t) {
|
||||
["The librarian's knowledge of books was vast", '#Possessive'],
|
||||
["The manager's decision was unexpected", '#Possessive'],
|
||||
["The meeting's been rescheduled", 'has'],
|
||||
["Leonard's was Randall", '#Possessive'],
|
||||
["Toronto's was Canada", '#Possessive'],
|
||||
["Leonard's was closed on Monday", '#Possessive'],
|
||||
["The meeting's scheduled for 3 PM", 'is'],
|
||||
["The mountain's peak is covered in snow", '#Possessive'],
|
||||
["The movie's already started", 'has'],
|
||||
@@ -202,3 +205,11 @@ test('is-has', function (t) {
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('possessive before a copula keeps its whitespace', function (t) {
|
||||
const doc = nlp(`Leonard's was Randall`)
|
||||
t.equal(doc.match('#Noun').text(), `Leonard's Randall`, here + 'noun match')
|
||||
t.ok(doc.match('was').has('#Copula'), here + 'was stays a verb')
|
||||
t.notOk(doc.match('was').has('#Adjective'), here + 'was is not an adjective')
|
||||
t.end()
|
||||
})
|
||||
Reference in new issue
Block a user