// limitations under the License.
/**
- *
+ *
*/
package com.hughes.android.dictionary.engine;
* normalizations.
*/
public NormalizeComparator getSortComparator() {
- return new NormalizeComparator(normalizer(), sortLanguage.getCollator());
+ return new NormalizeComparator(normalizer(), sortLanguage.getCollator(), dict.dictFileVersion);
}
public Index(final Dictionary dict, final DataInput inp) throws IOException {
}
sortedIndexEntries = CachingList.create(
RAFList.create(raf, indexEntrySerializer, raf.getFilePointer(),
- dict.dictFileVersion), CACHE_SIZE);
+ dict.dictFileVersion, dict.dictInfo + " idx " + languageCode + ": "), CACHE_SIZE);
if (dict.dictFileVersion >= 7) {
int count = StringUtil.readVarInt(raf);
stoplist = new HashSet<String>(count);
} else if (index.dict.dictFileVersion >= 6) {
this.htmlEntries = CachingList.create(
RAFList.create((RandomAccessFile)raf, index.dict.htmlEntryIndexSerializer,
- ((RandomAccessFile)raf).getFilePointer(), index.dict.dictFileVersion), 1);
+ ((RandomAccessFile)raf).getFilePointer(), index.dict.dictFileVersion,
+ index.dict.dictInfo + " htmlEntries: "), 1);
} else {
this.htmlEntries = Collections.emptyList();
}
}
final IndexEntry midEntry = sortedIndexEntries.get(mid);
- final int comp = sortCollator.compare(token, midEntry.normalizedToken());
+ int comp = NormalizeComparator.compareWithoutDash(token, midEntry.normalizedToken(), sortCollator, dict.dictFileVersion);
+ if (comp == 0)
+ comp = sortCollator.compare(token, midEntry.normalizedToken());
if (comp == 0) {
final int result = windBackCase(token, mid, interrupted);
return result;