@Test void testAsciiDoubleQuotationMakrk() throws RedPenException { Configuration conf = Configuration.builder() .addValidatorConfig(new ValidatorConfiguration("Quotation").addProperty("use_ascii", false)) .build(); Validator validator = ValidatorFactory.getInstance(conf.getValidatorConfigs().get(0), conf); Sentence str = new Sentence("I said \"that is true\".", 0); List<ValidationError> errors = new ArrayList<>(); validator.setErrorList(errors); validator.validate(str); assertNotNull(errors); assertEquals(0, errors.size()); }
@Override public void validate(Sentence sentence) { checkQuotation(sentence, leftSingleQuotationMark, rightSingleQuotationMark); checkQuotation(sentence, leftDoubleQuotationMark, rightDoubleQuotationMark); }
QuotationValidator extends Validator { @Override public void validate(Sentence sentence) { checkQuotation(sentence, leftSingleQuotationMark, rightSingleQuotationMark); checkQuotation(sentence, leftDoubleQuotationMark, rightDoubleQuotationMark); } }
QuotationValidator extends Validator { @Override public void validate(Sentence sentence) { checkQuotation(sentence, leftSingleQuotationMark, rightSingleQuotationMark); checkQuotation(sentence, leftDoubleQuotationMark, rightDoubleQuotationMark); } QuotationValidator(); }
QuotationValidator extends Validator { @Override public void validate(Sentence sentence) { checkQuotation(sentence, leftSingleQuotationMark, rightSingleQuotationMark); checkQuotation(sentence, leftDoubleQuotationMark, rightDoubleQuotationMark); } QuotationValidator(); @Override List<String> getSupportedLanguages(); @Override void validate(Sentence sentence); }
QuotationValidator extends Validator { @Override public void validate(Sentence sentence) { checkQuotation(sentence, leftSingleQuotationMark, rightSingleQuotationMark); checkQuotation(sentence, leftDoubleQuotationMark, rightDoubleQuotationMark); } QuotationValidator(); @Override List<String> getSupportedLanguages(); @Override void validate(Sentence sentence);  }