Tag beneath, underneath and aboard as prepositions before an object
This commit is contained in:
1 parent
89767d1cc6
commit
80bc4a141e
2 files changed
+4
-1
No files matched your search
@@ -38,7 +38,7 @@ export default [
|
|||||||
// The cat slept [under] the table. He sat [beside] me.
|
// The cat slept [under] the table. He sat [beside] me.
|
||||||
// the plane flew well [above] the clouds
|
// the plane flew well [above] the clouds
|
||||||
// she stood directly [below] the window...
|
// she stood directly [below] the window...
|
||||||
...['above', 'below', 'under', 'over', 'beside', 'behind', 'against', 'outside', 'inside', 'near'].map(word => ({
|
...['above', 'below', 'under', 'over', 'beside', 'behind', 'against', 'outside', 'inside', 'near', 'beneath', 'underneath', 'aboard'].map(word => ({
|
||||||
match: `[(${word} && !#Verb)] (#Determiner|#Possessive|#Pronoun|#ProperNoun)`,
|
match: `[(${word} && !#Verb)] (#Determiner|#Possessive|#Pronoun|#ProperNoun)`,
|
||||||
group: 0, tag: 'Preposition', reason: `${word}-space-obj`,
|
group: 0, tag: 'Preposition', reason: `${word}-space-obj`,
|
||||||
})),
|
})),
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ test('connectors distinguish nominal objects from finite clauses', t => {
|
|||||||
['They stood behind us.', 'behind', 'Preposition'],
|
['They stood behind us.', 'behind', 'Preposition'],
|
||||||
['He leaned against the wall.', 'against', 'Preposition'],
|
['He leaned against the wall.', 'against', 'Preposition'],
|
||||||
['He sat near the door.', 'near', 'Preposition'],
|
['He sat near the door.', 'near', 'Preposition'],
|
||||||
|
['The dog slept beneath the bench.', 'beneath', 'Preposition'],
|
||||||
|
['The keys were underneath the mat.', 'underneath', 'Preposition'],
|
||||||
|
['We went aboard the ship.', 'aboard', 'Preposition'],
|
||||||
]
|
]
|
||||||
for (const [str, word, tag] of cases) {
|
for (const [str, word, tag] of cases) {
|
||||||
const term = nlp(str).match(word)
|
const term = nlp(str).match(word)
|
||||||
|
|||||||
Reference in new issue
Block a user