X-Git-Url: http://gitweb.fperrin.net/?p=DictionaryPC.git;a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2Fengine%2FWiktionarySplitter.java;h=37344cae59362fa1e5da2342bb36e2e98f708724;hp=3cee85da6a2a89743f53be952239e4aea8f87d0f;hb=eec1a89b6cdffe7048aefa3cb2b3497b1744be99;hpb=4c7701228aff69ceb4dffd23ed319382b5f0a55c diff --git a/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java b/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java index 3cee85d..37344ca 100644 --- a/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java +++ b/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java @@ -130,10 +130,12 @@ public class WiktionarySplitter extends org.xml.sax.helpers.DefaultHandler { private void endPage() { final String title = titleBuilder.toString(); lastPageTitle = title; - if (++pageCount % 1000 == 0) { + if (++pageCount % 100000 == 0) { System.out.println("endPage: " + title + ", count=" + pageCount); } - if (title.startsWith("Wiktionary:") || + if (title.startsWith("Unsupported titles/")) return; + if (title.contains(":")) { + if (title.startsWith("Wiktionary:") || title.startsWith("Appendix:") || title.startsWith("Help:") || title.startsWith("Index:") || @@ -144,7 +146,6 @@ public class WiktionarySplitter extends org.xml.sax.helpers.DefaultHandler { title.startsWith("Rhymes:") || title.startsWith("Category:") || title.startsWith("Wikisaurus:") || - title.startsWith("Unsupported titles/") || title.startsWith("Transwiki:") || title.startsWith("File:") || title.startsWith("Thread:") || @@ -188,10 +189,7 @@ public class WiktionarySplitter extends org.xml.sax.helpers.DefaultHandler { // sentinel false - ) { - return; - } - if (title.contains(":")) { + ) return; if (!title.startsWith("Sign gloss:")) { System.err.println("title with colon: " + title); }