@Test void testDefaultJapaneseSetting() throws Exception { List<Document> documents = new ArrayList<>(); documents.add(Document.builder(new NeologdJapaneseTokenizer()) .addSection(1) .addParagraph() .addSentence(new Sentence("Re:VIEW フォーマットが好きだ。", 1)).build()); Configuration config = Configuration.builder("ja") .addValidatorConfig(new ValidatorConfiguration("InvalidSymbol")).build(); RedPen redPen = new RedPen(config); Map<Document, List<ValidationError>> errors = redPen.validate(documents); assertEquals(0, errors.get(documents.get(0)).size()); }
@Override public void validate(Sentence sentence) { Set<SymbolType> symbolTypes = getSymbolTable().getNames(); for (SymbolType symbolType : symbolTypes) { validateSymbol(sentence, symbolType); } }
InvalidSymbolValidator extends Validator { @Override public void validate(Sentence sentence) { Set<SymbolType> symbolTypes = getSymbolTable().getNames(); for (SymbolType symbolType : symbolTypes) { validateSymbol(sentence, symbolType); } } }
InvalidSymbolValidator extends Validator { @Override public void validate(Sentence sentence) { Set<SymbolType> symbolTypes = getSymbolTable().getNames(); for (SymbolType symbolType : symbolTypes) { validateSymbol(sentence, symbolType); } }  }
InvalidSymbolValidator extends Validator { @Override public void validate(Sentence sentence) { Set<SymbolType> symbolTypes = getSymbolTable().getNames(); for (SymbolType symbolType : symbolTypes) { validateSymbol(sentence, symbolType); } }  @Override void validate(Sentence sentence); }
InvalidSymbolValidator extends Validator { @Override public void validate(Sentence sentence) { Set<SymbolType> symbolTypes = getSymbolTable().getNames(); for (SymbolType symbolType : symbolTypes) { validateSymbol(sentence, symbolType); } }  @Override void validate(Sentence sentence);  }