public void testEnItWiktionary() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-IT.quickdic", "r");
public void testEnItWiktionary() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-IT.quickdic", "r");
assertTrue(rows.toString(), rows.size() > 0);
assertTrue(rows.get(0).toString().startsWith("come mai@"));
assertTrue(rows.get(0) instanceof TokenRow);
assertTrue(rows.toString(), rows.size() > 0);
assertTrue(rows.get(0).toString().startsWith("come mai@"));
assertTrue(rows.get(0) instanceof TokenRow);
assertTrue(rows.toString(), rows.size() > 0);
assertTrue(rows.get(0).toString().startsWith("buon giorno@"));
assertTrue(rows.get(0) instanceof TokenRow);
assertTrue(rows.toString(), rows.size() > 0);
assertTrue(rows.get(0).toString().startsWith("buon giorno@"));
assertTrue(rows.get(0) instanceof TokenRow);
public void testDeEnWiktionary() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "DE-EN.quickdic", "r");
public void testDeEnWiktionary() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "DE-EN.quickdic", "r");
public void testGermanMetadata() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testGermanMetadata() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
final Index deIndex = dict.indices.get(0);
assertEquals("DE", deIndex.shortName);
final Index deIndex = dict.indices.get(0);
assertEquals("DE", deIndex.shortName);
public void testGermanIndex() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testGermanIndex() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
final Index deIndex = dict.indices.get(0);
for (final Index.IndexEntry indexEntry : deIndex.sortedIndexEntries) {
final Index deIndex = dict.indices.get(0);
for (final Index.IndexEntry indexEntry : deIndex.sortedIndexEntries) {
// Check that search in lowercase works.
assertSearchResult("Alibi", "Alibi", deIndex.findInsertionPoint("alib", new AtomicBoolean(false)));
// Check that search in lowercase works.
assertSearchResult("Alibi", "Alibi", deIndex.findInsertionPoint("alib", new AtomicBoolean(false)));
public void testGermanTokenRows() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testGermanTokenRows() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
final Index deIndex = dict.indices.get(0);
// Pre-cache a few of these, just to make sure that's working.
final Index deIndex = dict.indices.get(0);
// Pre-cache a few of these, just to make sure that's working.
public void testChemnitz() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testChemnitz() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
final Index deIndex = dict.indices.get(0);
assertSearchResult("Höschen", "Hos", deIndex.findInsertionPoint("Hos", new AtomicBoolean(false)));
final Index deIndex = dict.indices.get(0);
assertSearchResult("Höschen", "Hos", deIndex.findInsertionPoint("Hos", new AtomicBoolean(false)));
public void testMultiSearch() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testMultiSearch() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(TEST_OUTPUTS + "de-en.quickdic", "r");
public void testMultiSearchIt() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "IT.quickdic", "r");
public void testMultiSearchIt() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "IT.quickdic", "r");
public void testMultiSearchDeBig() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "DE-EN.quickdic", "r");
public void testMultiSearchDeBig() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "DE-EN.quickdic", "r");
public void testMultiSearchBigAF() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "AF-EN.quickdic", "r");
public void testMultiSearchBigAF() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "AF-EN.quickdic", "r");
public void testExactSearch() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-cmn.quickdic", "r");
public void testExactSearch() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-cmn.quickdic", "r");
public void testThai() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-TH.quickdic", "r");
public void testThai() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-TH.quickdic", "r");
final Index thIndex = dict.indices.get(1);
final IndexEntry entry = thIndex.findInsertionPoint("ดี", new AtomicBoolean(false));
final Index thIndex = dict.indices.get(1);
final IndexEntry entry = thIndex.findInsertionPoint("ดี", new AtomicBoolean(false));
public void testNorwegian() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-NL.quickdic", "r");
public void testNorwegian() throws IOException {
final RandomAccessFile raf = new RandomAccessFile(OUTPUTS + "EN-NL.quickdic", "r");
final Index nlIndex = dict.indices.get(1);
IndexEntry entry = nlIndex.findInsertionPoint("Xhosa", new AtomicBoolean(false));
final Index nlIndex = dict.indices.get(1);
IndexEntry entry = nlIndex.findInsertionPoint("Xhosa", new AtomicBoolean(false));