### Question:
OcrOpWeight implements EdOpWeight { @Override public int ins(char c) { if (ignorePunctuation) { return (Character.isSpaceChar(c) || Character.isLetterOrDigit(c)) ? 1 : 0; } else { return 1; } } OcrOpWeight(boolean ignorePunctuation);  OcrOpWeight(Parameters pars);  OcrOpWeight(); @Override int sub(char c1, char c2); @Override int ins(char c); @Override int del(char c);  }### Answer:
@Test public void testIns() { System.out.println("ins"); OcrOpWeight W = new OcrOpWeight(true); assertEquals(1, W.ins('a')); assertEquals(0, W.ins('@')); assertEquals(0, W.ins('+')); W = new OcrOpWeight(); assertEquals(1, W.ins('a')); assertEquals(1, W.ins('@')); assertEquals(1, W.ins('+')); }