I am using Java to add a new rule and my code is as follows
fakePatternTokens.add(new PatternToken("business", false, true, false));
PatternRule rule1 = new PatternRule("id1",
language,
fakePatternTokens,
"desc1",
"Did you mean <match regexp_match=\"business\" regexp_replace=\"abc\"><suggestion>\\1</suggestion> </match>?",
"shortMsg1");
but my output seems to be
{
"from_position": 0,
"to_position": 8,
"message": "Did you mean <match regexp_match=\"business\" regexp_replace=\"abc\"><suggestion>business</suggestion> </match>?",
"suggested_replacements": "business"
}
why is suggested replacements is not changed to ‘abc’