Prefix Trees

This program creates the shortest (and as uniquely as possible) prefixes from a list of words. It presents the prefixes as a "prefix tree", where the node is the word from the list. The options is as follows: The program was presented in the (swedish) blog post Något om "prefixträd" sorterade på lite olika sätt samt komprimering and containts some more info.
Options
Sort (plain) Reverse Sort by letter frequency
Use 100 random words
Language for the random words: Swedish English

Word list (type each word on a single line, or at least with space between.)
Clear wordlist


The resulting prefix tree

Goto the statistics part

!!!! indicates that the word is the complete word, i.e. not a prefix. Hence it may be a substring for another word...)
a:
  ap: april
  au: augusti
d: december
f: februari
j:
  ja: januari
  ju:
    jul: juli
    jun: juni
m:
  ma:
    maj: maj (!!!)
    mar: mars
n: november
o: oktober
s: september


Statistics of the prefix tree

Number total words: 12
Number prefix words: 12
Number complete words (not a proper prefix): 0
Original total length of words: 74
Total length of prefixes: 23
Mean original length: 6.17
Mean prefix length: 1.92
Compression factor (original length/prefix length): 3.217


Some other results

Back to my homepage
Created by Hakan Kjellerstrand hakank@bonetmail.com