Add func to extract unique words from data table

Function extract the unique words from the bigram, trigram, or 4-gram
tables. Can also do unigram.