Closed sam-writer closed 4 years ago
This would also allow us to handle this inclusivity match something like
{
"is-addicted-to": {
"patterns": [
{
"LEMMA": "be",
"TEMPLATE_ID": 1
},
{
"LOWER": "addicted"
},
{
"LOWER": "to"
},
{
"POS": "NOUN"
},
],
"suggestions": [
[
{
"TEXT": "has",
"FROM_TEMPLATE_ID": 1
},
{
"TEXT": "a"
// it would be cool if we could add "AUTO": true or something to get a-or-an
// or "FROM_SUGGESTION_REF": 2
// to explicitly point it at the next token
},
{
"PATTERN_REF": 3
},
{
"TEXT": "use disorder"
},
]
],
}
The idea is to handle generic cases that are needed if we want replaCy to be an option for rule-based GEC.
Here is a snippet of a match_dict with examples of this
That first pattern is my attempt to translate to replaCy the following LT pattern:
The second pattern is an attempt to redo the
extract revenge
pattern using this proposed syntax. I am not saying we'd want that change (it doesn't produce a minimal diff).