Add frequency file.
add compute term frequency function