{"id":24574,"library":"sentencex","title":"sentencex","description":"A sentence segmentation library supporting ~300 languages, powered by Rust for performance. Version 1.0.23, MIT license, maintained by Wikimedia. Releases are frequent with multilingual improvements.","status":"active","version":"1.0.23","language":"python","source_language":"en","source_url":"https://github.com/wikimedia/sentencex","tags":["sentence segmentation","multilingual","nlp","rust"],"install":[{"cmd":"pip install sentencex","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Function is in module, not as attribute of package.","wrong":"import sentencex\nsentencex.segment()","symbol":"segment","correct":"from sentencex import segment"}],"quickstart":{"code":"from sentencex import segment\n\ntext = \"Hello world! This is a test. And another sentence.\"\nsentences = segment('en', text)\nprint(list(sentences))","lang":"python","description":"Basic usage: segment English text into sentences."},"warnings":[{"fix":"Wrap with list() or iterate.","message":"The segment function returns a generator, not a list. Must be consumed (e.g., list()) to see all sentences.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'en' for English; see README for supported codes.","message":"Language code must be lowercase (e.g., 'en', 'zh') but not all ISO codes are supported. Check support list.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.23':15 '300':7 'frequent':23 'improv':26 'languag':8 'librari':5 'licens':17 'maintain':18 'mit':16 'multilingu':25,29 'nlp':30 'perform':13 'power':9 'releas':21 'rust':11,31 'segment':4,28 'sentenc':3,27 'sentencex':1 'support':6 'version':14 'wikimedia':20","created_at":"2026-05-01T08:13:48.541579+00:00","updated_at":"2026-05-01T08:13:48.541579+00:00","problems":[{"fix":"sentences = list(segment('en', text))","cause":"segment returns a generator, not a list.","error":"TypeError: 'generator' object is not subscriptable"},{"fix":"Use 'en' instead of 'English'.","cause":"Language code must be ISO 639-1 two-letter code, not language name.","error":"ValueError: Unsupported language code: 'English'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.30","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/wikimedia/sentencex","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sentencex/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}