This repo is for practicing patricia trie purpose. Implementation is referring the AOSP source code. AOSP FusionDictionary
The goal of this repo is using JAVA rather than JNI/C++ to implement the same capability of making a binary dictionary and use it the same way as AOSP.
Internally AOSP using the patricia trie
to accomplish type ahead suggestion and words correction.
The repo have several packages as I am trying to strip and re-add the functionality into the implementation.
The performance test is performed on my personal Android (OnePlus 7T, Android 10) phone.
Operation:
- Read the
en_wordlist.combined
into memory. - Compress it and save it into a binary file.
- Load the binary into memory.
- Perform words search.
The pt.basic package contains the minimum implementation support only add
operation.
- Testing only #1
~1s and 17M to load into memory.
Introduce the compressing steps preparing for binary format. The dictionary compressing part is refer the AOSP v2 encoder.
- Testing #2 The output file is around 1.3MB.