Recognize more openers of secondary clauses in mainClause

This commit is contained in:
dualfroz committed 2026-09-14 16:15:15 +02:00
1 parent 5424b39d8d
commit 6099cb9020
2 files changed
+25 -1

No files matched your search

+15
View File
@@ -47,6 +47,9 @@ test('svo parser', function (t) {
],
['He bought the car that the dealer, the bank, and the broker all recommended.', 'he', 'bought'],
['I ate dinner before I went to bed.', 'i', 'ate'],
['To win the race, you must train every day.', 'you', 'must train'],
['Had I known, I would have left earlier.', 'i', 'would have left'],
['In case you forget, we will remind you.', 'we', 'will remind'],
// ['every day the kitten tries to eat the mouse', 'the kitten', 'tries to eat'],
// ['The boy who you saw at the store committed a robbery.', 'the boy', 'committed'],
@@ -62,3 +65,15 @@ test('svo parser', function (t) {
})
t.end()
})
test('svo main clause after a preposition', function (t) {
const arr = [
['Since 2010 we have lived here, and we love it.', 'have lived'],
['Once upon a time there lived a king, and he was rich.', 'lived'],
]
arr.forEach(a => {
const obj = nlp(a[0]).sentences().json()[0]
t.equal(obj.sentence.verb, a[1], here + 'verb: ' + a[1])
})
t.end()
})