Registry / ai-ml / nostril-detector

nostril-detector

JSON →
library1.2.2pypypi✓ verified 86d ago

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.

pip install nostril-detector
INSTALL
IMPORT
SIG · NOSTRIL-DETECTOR
N
nostril-detector
ai-mlpythonv1.2.2
Install
3.3s avg
Import
—
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 37.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.3s · import 0.000s · 38MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nonsense_detector
✓ from nostril_detector import nonsense_detector
✗ from nostril import detect_nonsense
generate_nonsense_detector
✓ from nostril_detector import generate_nonsense_detector
test_labeled
✓ from nostril_detector import test_labeled

Basic usage: call detect_nonsense(string) which returns True if the string is likely nonsense, False otherwise.

from nostril import detect_nonsense # Test a meaningful string test_string = 'hello world' result = detect_nonsense(test_string) print(f'{test_string!r}: nonsense={result}') # Test a nonsense string (e.g., program identifier) test_string2 = 'xzyqwk' result2 = detect_nonsense(test_string2) print(f'{test_string2!r}: nonsense={result2}')
Debug
Known issues
gotchaThe import module is 'nostril', not 'nostril_detector'. Uninstalling 'nostril-detector' and installing 'nostril' leads to a different package (a text encoding detector).
fix
Use 'from nostril import detect_nonsense' after 'pip install nostril-detector'.
affects: all
gotchaThe detect_nonsense function returns True for nonsense input and False for meaningful input. This is contrary to intuition (non-nonsense = meaningful).
fix
Remember: detect_nonsense('hello') -> False (meaningful); detect_nonsense('xzy') -> True (nonsense).
affects: all
deprecatedThe command-line option '-v' for version was changed to '-V' in v1.1.0.
fix
Use '-V' for version, or '--version'.
affects: <1.1.0
Upgrade
Version history
1.2.2latest on PyPI · released Jan 28, 2024
Audit
Dependencies
numpyrequiredRequired for array operations
scikit-learnrequiredRequired for the naive Bayes classifier
Agent activity
9 hits · last 30 days
node
6
Amazon
1
Resources
nostril-detector — pip install nostril-detector · libregistry