From dd044a93ab62f36d2a501ca4c1d14668e09ee62b Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 24 Jan 2025 11:46:56 +0100 Subject: [PATCH] Filtered out other languages from kanji dic2 --- .../java/org/x4o/fc18/cake2/fcdoc/kanji/KanjiDict.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/fcdoc/kanji/KanjiDict.java b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/fcdoc/kanji/KanjiDict.java index e14a863..5baf8eb 100644 --- a/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/fcdoc/kanji/KanjiDict.java +++ b/nx01-x4o-fc18/src/test/java/org/x4o/fc18/cake2/fcdoc/kanji/KanjiDict.java @@ -69,6 +69,7 @@ public class KanjiDict { KanjiDictLiteral literal; String cpType; String qcType; + String mLang; private void addLiteral() { if (literal.kuTen208 != null) { @@ -109,7 +110,10 @@ public class KanjiDict { literal.fourCorner = Integer.parseInt(bufChar.toString().replaceAll("\\.", "")); } } else if ("meaning".equals(qName)) { - literal.meaning.add(bufChar.toString()); + if (mLang == null) { + literal.meaning.add(bufChar.toString()); + } + mLang = null; } bufChar = new StringBuilder(); } @@ -146,6 +150,8 @@ public class KanjiDict { cpType = atts.getValue("cp_type"); } else if ("q_code".equals(qName)) { qcType = atts.getValue("qc_type"); + } else if ("meaning".equals(qName)) { + mLang = atts.getValue("m_lang"); } }