Updated the dictionary structure to allow grouping of dictionaries, this is the first step to try to clean up a bit the massive repetitions in dictionaries.
This commit is contained in:
parent
6bb0646f1c
commit
afd3a95a21
22 changed files with 1533 additions and 297 deletions
|
@ -42,18 +42,21 @@ public class CachedSyllableListTree implements SyllableListTree
|
|||
long pos, defSources[];
|
||||
DictionarySource sourceDef;
|
||||
int i;
|
||||
|
||||
FileSyllableListTree.openFiles(archivo);
|
||||
long posLista = FileSyllableListTree.wordRaf.length() - 4;
|
||||
SimplifiedLinkedList syllables = new SimplifiedLinkedList();
|
||||
|
||||
FileSyllableListTree.wordRaf.seek(posLista);
|
||||
posLista = (long) FileSyllableListTree.wordRaf.readInt();
|
||||
FileSyllableListTree.wordRaf.seek(posLista);
|
||||
|
||||
SimplifiedLinkedList syllables = new SimplifiedLinkedList();
|
||||
do
|
||||
{
|
||||
// get "link" to children
|
||||
pos = (long) FileSyllableListTree.wordRaf.readInt();
|
||||
// get syllable
|
||||
sil = FileSyllableListTree.wordRaf.readUTF();
|
||||
sourceDef = DictionarySource.read(FileSyllableListTree.wordRaf);
|
||||
// get dictionary information for each definition
|
||||
if (FileSyllableListTree.versionNumber==2) sourceDef = new BitDictionarySource();
|
||||
else sourceDef = new ByteDictionarySource();
|
||||
sourceDef.read(FileSyllableListTree.wordRaf);
|
||||
|
||||
if (sourceDef.isEmpty()) defSources = null;
|
||||
else
|
||||
{
|
||||
|
@ -87,11 +90,15 @@ public class CachedSyllableListTree implements SyllableListTree
|
|||
}
|
||||
|
||||
public DictionarySource getDictionarySource()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public BitDictionarySource getDictionarySourcesWanted()
|
||||
{
|
||||
return FileSyllableListTree.defSourcesWanted;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasDef()
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue