profanity-filter | Python library | Natural Language Processing library

 by   rominf Python Version: 1.3.3 License: GPL-3.0

kandi X-RAY | profanity-filter Summary

kandi X-RAY | profanity-filter Summary

profanity-filter is a Python library typically used in Artificial Intelligence, Natural Language Processing applications. profanity-filter has no bugs, it has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has low support. You can install using 'pip install profanity-filter' or download it from GitHub, PyPI.

profanity-filter is a universal library for detecting and filtering profanity. Support for English and Russian is included.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              profanity-filter has a low active ecosystem.
              It has 68 star(s) with 29 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 12 open issues and 19 have been closed. On average issues are closed in 17 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of profanity-filter is 1.3.3

            kandi-Quality Quality

              profanity-filter has 0 bugs and 10 code smells.

            kandi-Security Security

              profanity-filter has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              profanity-filter code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              profanity-filter is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              profanity-filter releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              profanity-filter saves you 494 person hours of effort in developing the same functionality from scratch.
              It has 1161 lines of code, 123 functions and 17 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed profanity-filter and discovered the below as its top functions. This is intended to give you an instant insight into profanity-filter implemented functionality, and help decide if they suit your requirements.
            • Configures the model
            • Set the language
            • Load profane word dictionaries
            • Update the languages_str attribute
            • Clears the cache
            • Update the profane_word_dictionaries
            • Clear the censored words cache
            • Returns a spacy profanity filter component
            • Return the language for the given language
            • Create a token from a word
            • Parse a spacy text
            • Returns a dictionary of profane words
            • Load all profane words
            • Set spacy filter
            • Set the custom_profane_word dictionary
            • Set the extra_profane_word_dictionary
            • Set spell classes
            • Set the censor character
            • Create a new profile filter
            • Set the morphological analysis
            Get all kandi verified functions for this library.

            profanity-filter Key Features

            No Key Features are available at this moment for profanity-filter.

            profanity-filter Examples and Code Snippets

            copy iconCopy
            from profanity_filter import ProfanityFilter
            
            pf = ProfanityFilter()
            
            pf.censor_char = '@'
            pf.censor("That's bullshit!")
            # "That's @@@@@@@@!"
            
            pf.censor_char = '*'
            pf.custom_profane_word_dictionaries = {'en': {'love', 'dog'}}
            pf.censor("I love dogs a  
            copy iconCopy
            import spacy
            from profanity_filter import ProfanityFilter
            
            nlp = spacy.load('en')
            profanity_filter = ProfanityFilter(nlps={'en': nlp})  # reuse spacy Language (optional)
            nlp.add_pipe(profanity_filter.spacy_component, last=True)
            
            doc = nlp('This is sh  
            copy iconCopy
            $ profanity_filter -h
            usage: profanity_filter [-h] [-t TEXT | -f PATH] [-l LANGUAGES] [-o OUTPUT_FILE] [--show]
            
            Profanity filter console utility
            
            optional arguments:
              -h, --help            show this help message and exit
              -t TEXT, --text TEXT  Tes  

            Community Discussions

            Trending Discussions on profanity-filter

            QUESTION

            Profanity filter could not load Spacy model 'en'
            Asked 2021-Nov-01 at 04:47

            I need the Spacy model 'en' for the Python profanity-filter. I would like to have a requirements.txt file that installs everything needed. I have the following:

            ...

            ANSWER

            Answered 2021-Nov-01 at 04:47

            You can't fix this in requirements.txt. Making the shortcut en work for the model en_core_web_sm isn't a property of the installed package, it's something spaCy manages separately. The shortcut process relies on symbolic links and is kind of flaky, which is why it was removed in v3.

            Since it looks like the profanity filter package is abandoned, your options are running spacy link from the command line or modifying the profanity filter package yourself.

            You could also figure out what spacy link is doing and do that (or call the relevant functions) in code.

            Source https://stackoverflow.com/questions/69791122

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install profanity-filter

            First two parts of installation instructions are designed for the users who want to filter English profanity. If you want to filter profanity in another language you still need to read it.
            For minimal setup you need to install profanity-filter with is bundled with spacy and download spacy model for tokenization and lemmatization:. For more info about Spacy models read: https://spacy.io/usage/models/.

            Support

            Let's take Russian for example on how to add new language support. Firstly, we need to provide file profanity_filter/data/ru_badwords.txt which contains a newline separated list of profane words. For Russian it's already present, so we skip file generation. Next, we need to download the appropriate Spacy model. Unfortunately, Spacy model for Russian is not yet ready, so we will use an English model for tokenization. If you had not install Spacy model for English, it's the right time to do so. As a consequence, even if you want to filter just Russian profanity, you need to specify English in ProfanityFilter constructor as shown in usage examples.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install profanity-filter

          • CLONE
          • HTTPS

            https://github.com/rominf/profanity-filter.git

          • CLI

            gh repo clone rominf/profanity-filter

          • sshUrl

            git@github.com:rominf/profanity-filter.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Natural Language Processing Libraries

            transformers

            by huggingface

            funNLP

            by fighting41love

            bert

            by google-research

            jieba

            by fxsjy

            Python

            by geekcomputers

            Try Top Libraries by rominf

            poetry-version

            by rominfPython

            winapps

            by rominfPython

            jira-oauth

            by rominfPython

            peewee-erd

            by rominfPython

            aiojira

            by rominfPython