Skip to content

zhangyukun230/PatriciaTrie

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Read the en_wordlist.combined into memory.
  2. Compress it and save it into a binary file.
  3. Load the binary into memory.
  4. Perform words search.

pt.basic

The pt.basic package contains the minimum implementation support only add operation.

  • Testing only #1
    ~1s and 17M to load into memory.

pt.compress

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 92.3%
  • Kotlin 7.7%