+// Copyright 2011 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package com.hughes.android.dictionary.engine;
import java.io.File;
//new Lang("^German$", "DE"),
};
Lang[] langs2 = new Lang[] {
- new Lang("^Italian$", "IT"),
+ new Lang("^.*Italian.*$", "IT"),
+ new Lang("^.*Greek.*$", "EL"),
+ new Lang("^.*Spanish.*$", "ES"),
+ /*
new Lang("^German$", "DE"),
new Lang("^Afrikaans$", "AF"),
new Lang("^Armenian$", "HY"),
new Lang("^English$", "EN"),
new Lang("^Finnish$", "FI"),
new Lang("^French$", "FR"),
- new Lang("^Greek$", "EL"),
new Lang("^Hebrew$", "HE"),
new Lang("^Hindi$", "HI"),
new Lang("^Icelandic$", "IS"),
new Lang("^Sanskrit$", "SA"),
new Lang("^Serbian$", "SR"),
new Lang("^Somali$", "SO"),
- new Lang("^Spanish$", "ES"),
new Lang("^Sudanese$", "SU"),
new Lang("^Swedish$", "SV"),
new Lang("^Tajik$", "TG"),
new Lang("^Vietnamese$", "VI"),
new Lang("^Welsh$", "CY"),
new Lang("^Yiddish$", "YI"),
- new Lang("^Zulu$", "ZU"),
+ new Lang("^Zulu$", "ZU"),*/
};
for (final Lang lang1 : langs1) {
}
int enIndex = -1;
+ Lang nonEnglish = null;
if (lang2.code.equals("EN")) {
enIndex = 2;
+ nonEnglish = lang1;
}
if (lang1.code.equals("EN")) {
enIndex = 1;
+ nonEnglish = lang2;
}
+ assert nonEnglish != null;
final String dictFile = String.format("dictOutputs/%s-%s_enwiktionary.quickdic", lang1.code, lang2.code);
System.out.println("building dictFile: " + dictFile);
String.format("--lang2=%s", lang2.code),
String.format("--dictInfo=(EN)Wikitionary-based %s-%s dictionary", lang1.code, lang2.code),
- "--input1=dictInputs/enwiktionary-20110205-pages-articles.xml",
- "--input1Name=enwiktionary",
- "--input1Format=enwiktionary",
- String.format("--input1TranslationPattern1=%s", lang1.nameRegex),
- String.format("--input1TranslationPattern2=%s", lang2.nameRegex),
- String.format("--input1EnIndex=%d", enIndex),
+ "--input3=wikiSplit/english.data",
+ "--input3Name=enwiktionary.english",
+ "--input3Format=enwiktionary",
+ "--input3LangPattern=" + nonEnglish.nameRegex,
+ "--input3LangCodePattern=" + (enIndex == 1 ? lang2.code : lang1.code).toLowerCase(),
+ "--input3EnIndex=" + enIndex,
+
});
// Print the entries for diffing.