The metanl scale is not what I thought it was.

This commit is contained in:
Rob Speer 2013-10-31 14:38:01 -04:00
parent e931062b5a
commit 0d2fb21726
2 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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