Skip to content

⚒This is a simple version of typeahead implemeted in java using Trie. Typeahead is a feature of software, website or application(and some typewriters) that enables users to continue typing and keep receiving hottest keyowrds based on what they are typing as the prefix of those keyowrds.

ToxicXing/Typeahead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeahead

This is a simple version of typeahead implemeted in java using Trie.

What is typeahead?

Typeahead is a feature of software, website or application(and some typewriters) that enables users to continue typing and keep receiving hottest keyowrds based on what they are typing as the prefix of those keyowrds.

What can it do?

This version of typeahead supports build, search, serialization and deserialization.

Build

Build method is called to build a Trie based on what we got from original data, which could be tens of thounsand items of data logs from some search engine. Usually, the log looks like:
KEYWORD | FREQUENCY
  apple                10
  amazon            15
  intel                  4
  cisco                13
  app                  25
  walmart           14
  apex                10
  adobe              24
  alibaba            32
Keyword is the top K hottest keywords that is searched in a regular period of time.
Frequency is how many times a keyowrd is searched.
This simple version of typeahead converted above log information into a trie.

Search

Search will return a list of hottest keyowrds that users may want to type.

Serialization and Deserialization

Serialization and deserialization is used to store/recover trie into/from file and disk.

About

⚒This is a simple version of typeahead implemeted in java using Trie. Typeahead is a feature of software, website or application(and some typewriters) that enables users to continue typing and keep receiving hottest keyowrds based on what they are typing as the prefix of those keyowrds.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages