How to use the wordfreq.cB_to_freq function in wordfreq

To help you get started, we’ve selected a few wordfreq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LuminosoInsight / wordfreq / tests / test_general.py View on Github external
def test_cB_conversion():
    assert cB_to_freq(0) == 1.
    assert cB_to_freq(-100) == pytest.approx(0.1)
    assert cB_to_freq(-600) == pytest.approx(1e-6)
github LuminosoInsight / wordfreq / tests / test_general.py View on Github external
def test_failed_cB_conversion():
    with pytest.raises(ValueError):
        cB_to_freq(1)
github LuminosoInsight / wordfreq / tests / test_general.py View on Github external
def test_cB_conversion():
    assert cB_to_freq(0) == 1.
    assert cB_to_freq(-100) == pytest.approx(0.1)
    assert cB_to_freq(-600) == pytest.approx(1e-6)