Tool for Top-K Auto-Completion

The top-k auto-completion tool is released as JAVA source code with corresponding binary executable file for convenience.

Version Date Download
0.1.1 20161129 Source Code    Binary Releases    Sample Dataset

Usage:

    topk SEARCH_STRING [K] [OPTION]

Notice: The binary file requires at least JRE 8 to run.

Perform top-K auto-completions for SEARCH_STRING using TRIE structure, the results are from DICT_FILE in respect of synonyms in SYN_FILE.

Option Default Comments
SEARCH_STRING The search string.
K 10 The maximum number of results returned.
-d DICT_FILE "dict.txt" List of dictionary strings with scores.
-s SYN_FILE "rule.txt" List of synonym rules.
-t TRIE "ET" The trie structure used in this search. Can be of TT, ET or HT. If you choose HT, you may want to specify BUDGET.
-b BUDGET 5000 A number indicates the additional space (in bytes) budget can be occupied by HT.

Examples:

    // Top-10 lookup for "Intl. Conf"
    topk "Intl. Conf"

    // Top-5 lookup for "Intl. Conf"
    topk "Intl. Conf" 5

    // Top-5 lookup for "Intl. Conf" using TT with "dict.txt" and "rule.txt"
    topk "Intl. Conf" 5 -d dict.txt -s rule.txt -t TT

    // Top-5 lookup for "Intl. Conf" using HT with budget equals 5000
    topk "Intl. Conf" 5 -t TT -b 5000