]> gitweb.fperrin.net Git - DictionaryPC.git/commitdiff
Added Urdu!
authorThad Hughes <thad.hughes@gmail.com>
Tue, 24 Jan 2012 05:33:01 +0000 (21:33 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Tue, 24 Jan 2012 05:33:01 +0000 (21:33 -0800)
15 files changed:
data/downloadInputs.sh
src/com/hughes/android/dictionary/engine/CheckDictionariesMain.java
src/com/hughes/android/dictionary/engine/DictionaryBuilder.java
src/com/hughes/android/dictionary/engine/IndexBuilder.java
src/com/hughes/android/dictionary/parser/enwiktionary/EnWiktionaryLangs.java
testdata/goldens/de-en.quickdic.text
testdata/goldens/wiktionary.ar_ar.quickdic.text
testdata/goldens/wiktionary.de_de.quickdic.text
testdata/goldens/wiktionary.de_en.quickdic.text
testdata/goldens/wiktionary.fr_fr.quickdic.text
testdata/goldens/wiktionary.it_en.quickdic.text
testdata/goldens/wiktionary.it_it.quickdic.text
testdata/goldens/wiktionary.zh_en.quickdic.text
testdata/goldens/wiktionary.zh_zh.quickdic.text
todo.txt

index 412ab18f4413f3b63f00517e9fe1df0dc7bd5003..8dcad04ff0331307bd8a44d949772aa510e48218 100755 (executable)
@@ -16,9 +16,9 @@ echo "Note that unzipping is slow."
 L=en
 echo "Downloading from: http://dumps.wikimedia.org/${L}wiktionary/"
 WIKI=${L}wiktionary-20120109-pages-articles.xml
-curl --remote-name http://dumps.wikimedia.org/${L}wiktionary/20120109/${WIKI}.bz2
-bunzip2 ${WIKI}.bz2
-mv ${WIKI} inputs/${L}wiktionary-pages-articles.xml
+#curl --remote-name http://dumps.wikimedia.org/${L}wiktionary/20120109/${WIKI}.bz2
+#bunzip2 ${WIKI}.bz2
+#mv ${WIKI} inputs/${L}wiktionary-pages-articles.xml
 
 L=fr
 echo "Downloading from: http://dumps.wikimedia.org/${L}wiktionary/"
index 898f46236416cf1437bf5a5254d6daaec7adf05d..811ebb04ab3e90c8ba49a919a58d26d0da62432e 100644 (file)
@@ -11,7 +11,7 @@ import com.hughes.android.dictionary.DictionaryInfo;
 public class CheckDictionariesMain {
   
   static final String BASE_URL = "http://quickdic-dictionary.googlecode.com/files/";
-  static final String VERSION_CODE = "v003";
+  static final String VERSION_CODE = "v002";
 
   public static void main(String[] args) throws IOException {
     final File dictDir = new File(DictionaryBuilderMain.OUTPUTS);
index 519663774bc9242c5708d498a725f4f1bda0a672..8051a9028c695a3862f403afff3d52c3a475a06f 100644 (file)
@@ -42,8 +42,8 @@ public class DictionaryBuilder {
   public final Dictionary dictionary;
   public final List<IndexBuilder> indexBuilders = new ArrayList<IndexBuilder>();
   
-  public DictionaryBuilder(final String dictInfo, final Language lang0, final Language lang1, final String normalizerRules1, final String normalizerRules2, final Set<String> lang1Stoplist, final Set<String> lang2Stoplist) {
-    dictionary = new Dictionary(dictInfo);
+  public DictionaryBuilder(final String dictInfoString, final Language lang0, final Language lang1, final String normalizerRules1, final String normalizerRules2, final Set<String> lang1Stoplist, final Set<String> lang2Stoplist) {
+    dictionary = new Dictionary(dictInfoString);
     indexBuilders.add(new IndexBuilder(this, lang0.getIsoCode(), lang0.getIsoCode() + "->" + lang1.getIsoCode(), lang0, normalizerRules1, lang1Stoplist, false));
     indexBuilders.add(new IndexBuilder(this, lang1.getIsoCode(), lang1.getIsoCode() + "->" + lang0.getIsoCode(), lang1, normalizerRules2, lang2Stoplist, true));
   }
@@ -128,7 +128,7 @@ public class DictionaryBuilder {
           fatalError("Must specify human readable name for: " + prefix + "Name");
         }
 
-        final EntrySource entrySource = new EntrySource(dictionaryBuilder.dictionary.sources.size(), inputName);
+        final EntrySource entrySource = new EntrySource(dictionaryBuilder.dictionary.sources.size(), inputName, 0);
         System.out.println("");
         
         String inputFormat = keyValueArgs.remove(prefix + "Format");
index 44bfa761daff1886f303e412ea0436872838fa7d..1140b64ac7579a8067937095c9331949d99f8e8e 100644 (file)
@@ -68,6 +68,7 @@ public class IndexBuilder {
           }
           if (tokenEntryDatas.add(entryData)) {
             rows.add(new PairEntry.Row(entryData.index(), rows.size(), index));
+            ++entryData.entry.entrySource.numEntries;
             ++numRows;
             
 //            System.out.print("  " + typeToEntry.getKey() + ": ");
index 80f47ed3d8c25b594fca22a403ce7bb1d1ec173b..83d5a7b368060eecab163f186d8aad1a35705bc6 100644 (file)
@@ -65,6 +65,7 @@ public class EnWiktionaryLangs {
     isoCodeToWikiName.put("BO", "Tibetan");
     isoCodeToWikiName.put("TR", "Turkish");
     isoCodeToWikiName.put("UK", "Ukrainian");
+    isoCodeToWikiName.put("UR", "Urdu");
     isoCodeToWikiName.put("VI", "Vietnamese");
     isoCodeToWikiName.put("CI", "Welsh");
     isoCodeToWikiName.put("YI", "Yiddish");
index 6a16c6b80985c746e6d65329596b426a1f390462..29f7c0b86267d710816c31cfe7054511351bd49d 100644 (file)
@@ -3,6 +3,9 @@ Version: devel, 2009-08-12
 Source: http://dict.tu-chemnitz.de/
 Thanks to Frank Richter.
 
+EntrySource: chemnitz 980
+EntrySource: dictcc 13
+
 Index: DE DE->EN
 ***40***
   40 :: 40
index 1193e0e9d25d6fb9f4cad4d6c37a23ad9c091fd5..e8c8354f43b3902fd93e80f901441ea4d2f7abec 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.arabic 13363
+
 Index: AR AR->EN
 ***أ***
   أ / ‍أ (’álifu hámzatin) :: The first letter of the Arabic alphabet is the small hamza (ء) that sits on top of أ, and the tall column is its bearer. The composite letter is called الف (’álif) and the hamza represents a glottal stop (/ʔ/). (For the pronunciation without hamza, see ا.) It is followed by ب.
index 592109e38b8e080caa317097d0d1a88941dfd1ba..edf8ca909a1bfa6bfa23363880461e9d445318c2 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.german 5303
+
 Index: DE DE->EN
 ===001===
   ward (verb form) :: {archaic} Third-person singular indicative past form of werden.
index 6de44b10a08235e73d6f2fd0a1b4a9c22df96d2a..f7a8038cb272083301cd048f246ad0b65913d6c8 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.english 4965
+
 Index: DE DE->EN
 ===2===
   Zehn {f} (2) :: ten (the number following nine) (noun)
index 460d5b32b44e0793b24dc14d3b0fc0a1ff5ea80f..6fd55d48610179e9ae358e6ea780d8e71e2c2618 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.french 6667
+
 Index: FR FR->EN
 ===00===
   de {fr-prep} :: from (used to indicate the start of a time or range)
index 6fe85b1cf0d24043b91e5971770d2fdb54ea7b91..eaf5b1ab5852614f5662b66f14dfd5c64aa43cfe 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.english 3462
+
 Index: IT IT->EN
 ===15===
   (periodo di) due settimane ; quindicina {f} (actually 15 days) :: fortnight (period of two weeks) (noun)
index 3b6f946cbcacd09ffe2663442112f66bcbf21c12..c9fc3cf4aee83d2b821b0aa40ed41bed0e900de5 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.italian 5146
+
 Index: IT IT->EN
 ===1963===
   dal :: since
index 63351c71125ac2e246711fe3f2cec2d7c1373fcb..0e1e948c84e088eec6a266e5edad17a03cac59a6 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.english 4579
+
 Index: ZH ZH->EN
 ===1===
   (Cantonese) 今日 (gam<sup>1</sup>yat<sup>6</sup>) :: today (on the current day) (adverb)
index 45382cd90b4726ba9694c98fd3bce52150fe8f84..e027b7656ca9c40cb25c4ab6b8cdfccd99c63680 100644 (file)
@@ -1,4 +1,6 @@
 dictInfo=SomeWikiData
+EntrySource: enwiktionary.chinese 628
+
 Index: ZH ZH->EN
 ===3===
   NB {{cmn-adj|p|pint=nb}} :: {{slang|skey=nb}} fucking awesome
index 68289df8a535246168deac36f4a9680a2c27c253..23295b2f0e1b3b273b32b708d5e2f5b7d81c7fa9 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -1,4 +1,6 @@
 For next release:
+help screen
+eng_urdu
 fix up dictionary manager:
   thread that handles unzipping, downloading for the life of the application (so screen changes don't screw it up).
   check over UI.