{"id":21212,"library":"english-words","title":"english-words-py","description":"A Python library to generate sets of English words by combining different word lists. Version 2.0.2 provides access to common, small, and large word sets; simple API with get_words_set().","status":"active","version":"2.0.2","language":"python","source_language":"en","source_url":"https://github.com/mwiens91/english-words-py","tags":["english","words","wordlist","nlp"],"install":[{"cmd":"pip install english-words","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used internally for package data; should be available in standard environments.","package":"setuptools"}],"imports":[{"note":"This is the only public function. No other imports are needed.","wrong":"","symbol":"get_words_set","correct":"from english_words import get_words_set"}],"quickstart":{"code":"from english_words import get_words_set\n\n# Get the default (common English words) set\nwords = get_words_set()\nprint(len(words))  # e.g., 2000\n\n# Get a specific word list\nsmall = get_words_set(word_set='small')\nprint(list(small)[:5])\n\n# Available sets: 'common' (default), 'small', 'large'","lang":"python","description":"Quickly retrieve word sets."},"warnings":[{"fix":"Change imports to use `from english_words import get_words_set` and call the function.","message":"In version 2.0.0, the old `english_words` module (importing a set directly) was replaced with a function-based API. Direct import of `english_words.english_words` or similar patterns no longer works.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Use one of the official word_set names: 'common', 'small', 'large'.","message":"Passing `word_set='en'` or other non-standard names may not work; only 'common', 'small', 'large' are officially supported.","severity":"deprecated","affected_versions":"all"},{"fix":"Wrap with list() if you need sequential access: `list(get_words_set())`.","message":"The returned object is a frozenset, not a list. Converting to list is required for index access or mutation.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from english_words import get_words_set` instead.","cause":"Importing from the top-level module as if it were the old API (e.g., `import english_words; english_words.english_words`).","error":"'module' object has no attribute 'english_words'"},{"fix":"Run `pip install --upgrade english-words` to get version 2.0.0+.","cause":"Old version (<2.0.0) installed; upgrade to get function-based API.","error":"AttributeError: module 'english_words' has no attribute 'get_words_set'"},{"fix":"Convert to list first: `list(get_words_set())[0]`.","cause":"Trying to access an element by index on the frozenset returned by `get_words_set()`.","error":"TypeError: 'frozenset' object does not support indexing"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}