{"id":23133,"library":"nostril-detector","title":"Nostril","description":"Nostril (Nonsense String Evaluator) is a Python 3 module that infers whether a given word or text string is likely nonsense or meaningful text. It is primarily used to distinguish program identifiers from natural language. Current version 1.2.2, released 2023-12-31. Release cadence is low, with no recent updates.","status":"active","version":"1.2.2","language":"python","source_language":"en","source_url":"https://github.com/casics/nostril","tags":["nonsense","text-classification","natural-language-processing","program-identifier"],"install":[{"cmd":"pip install nostril-detector","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Required for array operations","package":"numpy","optional":false},{"reason":"Required for the naive Bayes classifier","package":"scikit-learn","optional":false}],"imports":[{"wrong":"from nostril import detect_nonsense","symbol":"nonsense_detector","correct":"from nostril_detector import nonsense_detector"},{"symbol":"generate_nonsense_detector","correct":"from nostril_detector import generate_nonsense_detector"},{"symbol":"test_labeled","correct":"from nostril_detector import test_labeled"}],"quickstart":{"code":"from nostril import detect_nonsense\n\n# Test a meaningful string\ntest_string = 'hello world'\nresult = detect_nonsense(test_string)\nprint(f'{test_string!r}: nonsense={result}')\n\n# Test a nonsense string (e.g., program identifier)\ntest_string2 = 'xzyqwk'\nresult2 = detect_nonsense(test_string2)\nprint(f'{test_string2!r}: nonsense={result2}')\n","lang":"python","description":"Basic usage: call detect_nonsense(string) which returns True if the string is likely nonsense, False otherwise."},"warnings":[{"fix":"Use 'from nostril import detect_nonsense' after 'pip install nostril-detector'.","message":"The import module is 'nostril', not 'nostril_detector'. Uninstalling 'nostril-detector' and installing 'nostril' leads to a different package (a text encoding detector).","severity":"gotcha","affected_versions":"all"},{"fix":"Remember: detect_nonsense('hello') -> False (meaningful); detect_nonsense('xzy') -> True (nonsense).","message":"The detect_nonsense function returns True for nonsense input and False for meaningful input. This is contrary to intuition (non-nonsense = meaningful).","severity":"gotcha","affected_versions":"all"},{"fix":"Use '-V' for version, or '--version'.","message":"The command-line option '-v' for version was changed to '-V' in v1.1.0.","severity":"deprecated","affected_versions":"<1.1.0"}],"env_vars":null,"search_vec":"'-12':42 '-31':43 '1.2.2':39 '2023':41 '3':9 'cadenc':45 'classif':55 'current':37 'distinguish':31 'evalu':5 'given':15 'identifi':33,62 'infer':12 'languag':36,58 'like':21 'low':47 'meaning':24 'modul':10 'natur':35,57 'natural-language-process':56 'nonsens':3,22,52 'nostril':1,2 'primarili':28 'process':59 'program':32,61 'program-identifi':60 'python':8 'recent':50 'releas':40,44 'string':4,19 'text':18,25,54 'text-classif':53 'updat':51 'use':29 'version':38 'whether':13 'word':16","created_at":"2026-05-01T06:02:35.952507+00:00","updated_at":"2026-05-01T06:02:35.952507+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.2.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/casics/nostril","docs":null,"changelog":null,"pypi":"https://pypi.org/project/nostril-detector/","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-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}