checkGolden(name, result);
}
+ public void testItalianTurkish() throws Exception {
+ final String name = "it-tr_dictcc.quickdic";
+ final File result = new File(TEST_OUTPUTS + name);
+ System.out.println("Writing to: " + result);
+ DictionaryBuilder.main(new String[] {
+ "--dictOut=" + result.getAbsolutePath(),
+ "--lang1=IT",
+ "--lang2=TR",
+ "--dictInfo=it-tr_dictcc_simulated",
+
+ "--input1=" + TEST_INPUTS + "it-tr_dictcc_simulated.txt",
+ "--input1Name=dictcc",
+ "--input1Charset=UTF8",
+ "--input1Format=tab_separated",
+
+ "--print=" + result.getPath() + ".text",
+ });
+
+ checkGolden(name, result);
+ }
+
private void checkGolden(final String dictName, final File dictFile)
throws IOException, FileNotFoundException {
// Check it once:
return;
}
final String[] fields = fieldSplit.split(line);
- if (fields.length != 2) {
+ // dictcc now has a part of speech field as field #3.
+ if (fields.length < 2 || fields.length > 3) {
logger.warning("Malformed line: " + line);
return;
}
subfields[0] = new String[] { fields[0] };
subfields[1] = new String[] { fields[1] };
}
-
+
final PairEntry pairEntry = new PairEntry(entrySource);
for (int i = 0; i < subfields[0].length; ++i) {
subfields[0][i] = subfields[0][i].trim();