{"id":29276697,"url":"https://github.com/tushar50896/cuss_inspect","last_synced_at":"2025-07-05T09:01:34.554Z","repository":{"id":62565986,"uuid":"303323732","full_name":"tushar50896/cuss_inspect","owner":"tushar50896","description":"A basic and simple yet powerful Python library to detect toxicity/profanity of a review or list of reveiws.","archived":false,"fork":false,"pushed_at":"2020-12-02T06:46:46.000Z","size":1831,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-28T05:09:19.100Z","etag":null,"topics":["abusive-language-detection","cusswords","logistic-regression","profanity","profanity-detection","python","review-checks","scikit-learn","swearing-detector","toxic-comment-classification"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cuss-inspect/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tushar50896.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-12T08:16:52.000Z","updated_at":"2024-04-05T15:45:04.000Z","dependencies_parsed_at":"2022-11-03T17:47:43.613Z","dependency_job_id":null,"html_url":"https://github.com/tushar50896/cuss_inspect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tushar50896/cuss_inspect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar50896%2Fcuss_inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar50896%2Fcuss_inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar50896%2Fcuss_inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar50896%2Fcuss_inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tushar50896","download_url":"https://codeload.github.com/tushar50896/cuss_inspect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushar50896%2Fcuss_inspect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263645452,"owners_count":23493989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abusive-language-detection","cusswords","logistic-regression","profanity","profanity-detection","python","review-checks","scikit-learn","swearing-detector","toxic-comment-classification"],"created_at":"2025-07-05T09:01:09.485Z","updated_at":"2025-07-05T09:01:29.632Z","avatar_url":"https://github.com/tushar50896.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cuss_inspect\n![pypi](https://img.shields.io/pypi/v/cuss-inspect?style=plastic) \n![](https://img.shields.io/github/license/tushar50896/cuss_inspect?style=plastic)\n\nA simple yet powerful library to predict toxicity/profanity of a review/comment or list of reviews/comments.\n\n## How It Works\n\n`cuss_inspect` is a logistic regression based model trained on 180K+ reviews and tested on 24K+ reviews. The library does not uses any specific wordlist/swear-words-list but is able to detected most of the swear words easily.\n\n### Performance\n\n\n|  | 1 Prediction (ms) | 10 Predictions (ms) | 100 Predictions (ms) | 1000 Predictions (ms) | 10000 Predictions (ms) \n| --------|-------------------|---------------------|-----------------------| -----------------------|----------------------- \n| cuss_inspect | 0.2 | 0.3 | 0.8 | 4.3 | 24.7\n\n\n\n\n### Accuracy\n\nThe accuracy,precision and recall are quite impressive as compared to other models. Logistic regression for text classification outperforms many other classifcation algorithms such as SVC,Decision Tree and Naive Bayes.\n\n| | Precision | Recall | F1 Score\n| --- | ------- | ------------- | ---------------------- \n0 | 0.83 | 0.94 | 0.88\n1 | 0.99 | 0.96 | 0.97\nAccuracy | | | 0.95\nmacro avg | 0.91 | 0.95 | 0.93\nweighted avg | 0.96 | 0.96 | 0.96\n\n\n### Receiver Operating Characteristics \n![ROC Curve](https://github.com/LMSharma/cuss_inspect/blob/main/ROC_Curve.jpeg) \n\n## Installation\n\n```\n$ pip install cuss_inspect\n```\n\n## Usage\n\n```python\nfrom cuss_inspect import predict, predict_prob\n\n# for simple string\ntext_0 = \"this is simple review. you have done a good job\"\nprint(predict(text_0))\n# [0]\nprint(predict_prob(text_0)\n# [0.05]\n\ntext_1 = \"son of a bitch\"\nprint(predict(text_1))\n# [1]\nprint(predict_prob(text_1)\n# [1.]\n\n# for list of inputs\ntest = ['who are you?' , 'what do you want?' , 'son of a dog' , 'how the hell can you say that' , 'fuck it']\nprint(predict(test))\n# [0 0 1 1 1]\nprint(predict_prob(test))\n# [0.12 0.22 0.55 0.96 1.]\n\n```\n\n*`predict()` and `predict_prob` return [`numpy`](https://pypi.org/project/numpy/) arrays.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushar50896%2Fcuss_inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftushar50896%2Fcuss_inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushar50896%2Fcuss_inspect/lists"}