From 76a72676706a6b6f0848733c4e0c58f3c8d5888b Mon Sep 17 00:00:00 2001 From: Andrew Lin Date: Mon, 4 Nov 2013 16:51:25 -0500 Subject: [PATCH] Remove metanl_word_frequency(), which we no longer need. --- wordfreq/query.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/wordfreq/query.py b/wordfreq/query.py index 82367c9..ea4ae41 100644 --- a/wordfreq/query.py +++ b/wordfreq/query.py @@ -120,24 +120,3 @@ def wordlist_info(connection=None): for wordlist, lang, count in results: yield {'wordlist': wordlist, 'lang': lang, 'count': count} - -METANL_CONSTANT = 35007147100.25307 -def metanl_word_frequency(wordlang, offset=0.): - """ - Return a word's frequency in a form that matches the output of - metanl 0.6. - - In wordfreq, frequencies are proportions. They add up to 1 within a - wordlist and language. - - In metanl, we had decided arbitrarily that common words should have a - frequency of a billion or so. There was no real reason. - - This function provides compatibility by adapting wordfreq to give the - same output as metanl. It does this by multiplying the word frequency in - the 'multi' list by a big ugly constant. Oh well. - """ - word, lang = wordlang.rsplit('|', 1) - freq = word_frequency(word, lang, 'multi', - offset = offset / METANL_CONSTANT) - return freq * METANL_CONSTANT