KanjidicEntry extends DictEntry { public List<String> getKunyomi() { final List<String> result = new ArrayList<String>(); for (final String e : reading.split(",")) { final String ee = e.trim(); if (ee.length() == 0) { continue; } if (KanjiUtils.isKatakana(ee.charAt(0))) { continue; } if (ee.charAt(0) == '[') { break; } result.add(ee); } return result; } KanjidicEntry(final String kanji, final String reading, final String english, final int radical, final int strokes, final String skip, final Integer grade); Integer getJlpt(); char getKanji(); List<String> getOnyomi(); List<String> getKunyomi(); List<String> getNamae(); List<String> getEnglish(); static String removeSplits(final String str); final int radical; final int strokes; final String skip; final Integer grade; }
@Test public void testKunyomi() { assertArrayEquals(test1().getKunyomi(), Arrays.asList("いと.しい", "かな.しい", "め.でる", "お.しむ", "まな")); assertArrayEquals(test2().getKunyomi(), Arrays.asList("かた", "-かた", "-がた")); assertArrayEquals(test3().getKunyomi(), Arrays.asList("か た", "-か た", "-がた")); }