kamalyesh / KompressorTool

Compress all words of a language for faster retrieval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KompressorTool

Compress all words of a language for faster retrieval

It also provides a way to save a tree-like data structure as files. Which is, at the moment, only applicable for the data structure, which is defined in this project.

What does it do?

This tool takes a word in English language, puts it into the structure (named KompressorGrid) where each baser level item of structure (named KompressorCell) will be identiifed using the first letter of the word, letter at the position -say i- and the letter at the position i+1.

After putting some words into the structure, if we want to check a string is valid word or not, we can do it using this structure.

Only problem was we would have to prepare this structure over every time we use it, which defeats the purpose of this program.

The solution I've come up with is storing this structure in another structure, as files. The contents of this files are numbers, numbers, numbers which will mean nothing, if you do not know how to read them. More confusing for us Humans is that there is not a single file, but lot of them which stores this data.

To read this data, this code provides another function too.

Another benefit of this storage structure is, it reduces space required to store those words!!

Then, again, we need that small time for opening and closing files, which when used multiple times, is not so small at all. So... I converted this file structure into code. Note that this option is advisable only if you have put all the words (you may or may not use) of the language into this structure.

About

Compress all words of a language for faster retrieval


Languages

Language:Java 100.0%