ai-content-maker/.venv/Lib/site-packages/nltk/test/unit/test_freqdist.py

8 lines
203 B
Python
Raw Normal View History

2024-05-03 04:18:51 +03:00
import nltk
def test_iterating_returns_an_iterator_ordered_by_frequency():
samples = ["one", "two", "two"]
distribution = nltk.FreqDist(samples)
assert list(distribution) == ["two", "one"]