Hello,
I’ve executed an en-US grammar check for the following text (using the API):
“There are a few JavaScript XPath implementations.”
The response contains a match for the MANY_NN rule telling me to replace “few JavaScript” with "few " (notice the trailing whitespace). If I execute that replacement the sentence would contain a double whitespace between the words few
and XPath
.
The match response:
{
"message": "Possible agreement error. The noun JavaScript seems to be countable; consider using: \"few \".",
"shortMessage": "Grammatical problem",
"replacements": [
{
"value": "few "
}
],
"offset": 12,
"length": 14,
"context": {
"text": "There are a few JavaScript XPath implementations.",
"offset": 12,
"length": 14
},
"sentence": "There are a few JavaScript XPath implementations.",
"rule": {
"id": "MANY_NN",
"subId": "1",
"description": "Possible agreement error: 'many/several/few' + singular countable noun",
"issueType": "grammar",
"category": {
"id": "GRAMMAR",
"name": "Grammar"
}
}
}
The MANY_NN rule message is:
<message>Possible agreement error. The noun <match no="2"/> seems to be countable; consider using: <suggestion><match no="1"/> <match suppress_misspelled="yes" no="2" postag="NNP?S" postag_regexp="yes"/></suggestion>.</message>
I think the whitespace in the <suggestion>
between the <match no="1"/>
and <match no="2"/>
is causing this. Is this intended behavior? Is or should there be an option to only add the trailing whitespace when the <match no="2"/>
is present?