Drop does/did when turning a negative verb positive
This commit is contained in:
1 parent
8124553282
commit
8fd9ece28a
3 files changed
+51
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import test from 'tape'
|
||||
import nlp from '../../_lib.js'
|
||||
const here = '[three/verb-toPositive] '
|
||||
|
||||
test('inline verb toPositive:', function (t) {
|
||||
const arr = [
|
||||
[`he does not like camels`, 'he likes camels'],
|
||||
[`he did not like camels`, 'he liked camels'],
|
||||
[`he doesn't like camels`, 'he likes camels'],
|
||||
[`she didn't go home`, 'she went home'],
|
||||
[`it does not matter`, 'it matters'],
|
||||
[`he does not have a car`, 'he has a car'],
|
||||
[`he does not really like camels`, 'he really likes camels'],
|
||||
[`spencer did not walk`, 'spencer walked'],
|
||||
// already worked
|
||||
[`they do not like camels`, 'they like camels'],
|
||||
[`i do not like camels`, 'i like camels'],
|
||||
[`do not use reverse psychology`, 'use reverse psychology'],
|
||||
[`he is not cool`, 'he is cool'],
|
||||
[`he will not go`, 'he will go'],
|
||||
[`he has not eaten`, 'he has eaten'],
|
||||
]
|
||||
arr.forEach(function (a) {
|
||||
const doc = nlp(a[0])
|
||||
doc.verbs().toPositive()
|
||||
const str = doc.text('normal')
|
||||
t.equal(str, a[1], here + a[1] + ' --- ' + str)
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
Reference in new issue
Block a user