]> gitweb.fperrin.net Git - DictionaryPC.git/commitdiff
Fixed Builder, and escaping arg names.
authorthadh <thadh@localhost>
Tue, 18 Sep 2012 17:13:51 +0000 (10:13 -0700)
committerthadh <thadh@localhost>
Tue, 18 Sep 2012 17:13:51 +0000 (10:13 -0700)
src/com/hughes/android/dictionary/engine/DictionaryBuilderMain.java
src/com/hughes/android/dictionary/parser/wiktionary/AbstractWiktionaryParser.java
todo.txt

index dfc4abb434a5e44cf3d18ae8cf8b7a829859f7c6..8a657f7d447afff05389bec434d7b72d1e676a75 100644 (file)
@@ -151,7 +151,8 @@ public class DictionaryBuilderMain extends TestCase {
       // Pairs without English.
       result.add(String.format("--lang1=%s", lang1));
       result.add(String.format("--lang2=%s", lang2));
-      
+      result.add(String.format("--dictInfo=Wikitionary-based %s-%s dictionary.", lang1, lang2));
       result.add(String.format("--input%d=%swikiSplit/en/EN.data", i, INPUTS));
       result.add(String.format("--input%dName=BETA!enwiktionary.%s-%s", i, lang1, lang2));
       result.add(String.format("--input%dFormat=%s", i, EnTranslationToTranslationParser.NAME));
@@ -169,7 +170,13 @@ public class DictionaryBuilderMain extends TestCase {
     
     // Build the non EN ones.
     final String[][] nonEnPairs = new String[][] {
-        
+
+        // The 3 I use most:
+        {"DE", "EN" },
+        {"IT", "EN" },
+        {"DE", "IT" },
+            
+            
         {"AR", "DE" },
         {"AR", "ES" },
         {"AR", "FR" },
@@ -277,7 +284,7 @@ public class DictionaryBuilderMain extends TestCase {
       done.add(pairList);
       
       if (!pairList.contains("IT") || !pairList.contains("EN")) {
-        continue;
+        //continue;
       }
       
       DictionaryBuilder.main(getMainArgs(pair).toArray(new String[0]));
index 623e1821975b3fd7795dabc5fa5c48b1d9fe31ae..55a791e96441a86a5a6379590ee1307b926f8707 100644 (file)
@@ -239,7 +239,7 @@ public abstract class AbstractWiktionaryParser implements Parser {
         final AppendAndIndexWikiCallback<T> appendAndIndexWikiCallback) {
       
       if (name != null) {
-        appendAndIndexWikiCallback.builder.append(name);
+        appendAndIndexWikiCallback.dispatch(name, null);
       }
       for (int i = 0; i < args.size(); ++i) {
         if (args.get(i).length() > 0) {
index 4b79693484d750ab9f8024751a7525371f9b50c0..e8a26d2180ae4abb8f17cb12bf3fe0abfd4a822e 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -1,4 +1,6 @@
 HtmlEntry
+  - text inside functions doesn't get escaped properly.
+  - Skips Uebersetzung section (likewise in other langs), except maybe for the other lange of interest.
   - Build single EN/DE/IT/FR dictionaries based on HtmlEntry.
   - Parse Italian verb forms from enwiktionary into something useful.
   - "See also" link entries for cross-referencing ("form of"--strong, links to token, "mentioned in"--weaker, links to HtmlEntry).