From 773f6b9843e7f4fcdb9d18147461c29d15bc1539 Mon Sep 17 00:00:00 2001 From: Robyn Speer Date: Thu, 31 Oct 2013 14:38:01 -0400 Subject: [PATCH] The metanl scale is not what I thought it was. Former-commit-id: 0d2fb217268df86366b2749cc7ab73aad38b153e --- tests/test_queries.py | 4 ++-- wordfreq/query.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_queries.py b/tests/test_queries.py index b307e0c..70205fe 100644 --- a/tests/test_queries.py +++ b/tests/test_queries.py @@ -28,8 +28,8 @@ def test_freq_examples(): def test_compatibility(): - eq_(metanl_word_frequency(':|en'), 1e9) - eq_(metanl_word_frequency(':|en', offset=1e9), 2e9) + eq_(metanl_word_frequency('the|en'), 1e9) + eq_(metanl_word_frequency('the|en', offset=1e9), 2e9) def _check_normalized_frequencies(wordlist, lang): diff --git a/wordfreq/query.py b/wordfreq/query.py index c089911..64a6729 100644 --- a/wordfreq/query.py +++ b/wordfreq/query.py @@ -121,7 +121,7 @@ def wordlist_info(connection=None): yield {'wordlist': wordlist, 'lang': lang, 'count': count} -METANL_CONSTANT = 50291582139.907646 +METANL_CONSTANT = 38328308509.73808 def metanl_word_frequency(wordlang, offset=0.): """ Return a word's frequency in a form that matches the output of