Giter Site home page Giter Site logo

content_filter's People

Contributors

dependabot-preview[bot] avatar mrdogebro avatar parafoxia avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

parafoxia

content_filter's Issues

Default word's list

Is default word's list empty?
Or maybe there is some option in your library to see the all list of words which will be filtered?

Convert Foreign Charaters

Convert foreign characters into their English equivalents to allow the filter to detect words even when letters have been replaced with foreign lookalike's. Also replace non-qwerty charaters with qwerty charaters. This would mean something like โ„‡ would be converted to e, รง to c, etc.

Features

  • Convert foreign characters to English visual equivalents
  • Convert non-qwerty English charaters (e.g. script) to qwerty equivalents
  • Improve the replacement system to make it easier to see all the replacements that are taking place

Comply with PEP8 standards

Update the module and its functions to comply with the PEP8 standards.

Features

  • Update naming conventions
  • Update imports
  • Update anything else non PEP8 complaint

Ignore Non-Printing Charaters

Make the filter ignore non-printing charaters so that they do not mess up filtering as they do now.

Features

  • Ignore non-printing charaters

Make Content Filter typed

With Content Filter's upcoming introduction into Carberretta (Carberra/Carberretta#137), making the project typed would ensure some potential CI issues are eradicated. It would also provide better autocompletes for those using and contributing to Content Filter.

This would involve:

  • Typing the project to mypy --strict standards
  • Formatting the project to make black happy

This would force a drop in support for Python 3.4, but considering it reached end-of-life in March 2019, that's no big deal.

I'll PR these changes in.

Censored Word Replacement

Could you add the ability to replace a matching word with the configured censored word? For example, say you have this line in a JSON file:

{ "find": "find", "word": "word", "censored": "censored" }

It would be very useful to have a function that replaced each matching word found with the censored alternative string here or a setting to do this while filtering.

Convert to class-based

Convert the module to be class-based. For example, their would be a filter class that would hold the functions for the filter. This would allow for more object-orientated programming as well as allow multiple different filter configs to be used in a single file.

Features

  • Classes containing the functions
  • Multiple different filters in a single file
  • Store settings in class instance

Indexes Offset By Non-word Characters

I noticed that when I check a string, and it returns a match, when I look at the indexes, the indexes don't match the original string. It actually looks like it is the indexes of the string without any whitespace (or at least any spaces).

For example, say I have this string, hello world censor hello world, and I am trying to match the word "censor". as_list will tell me that the match is at (10, 16). However, if I use those indexes to find the word to replace it, it returns d cens. So the indexes appear to be offset by 2 in this case, which correspond with the number of spaces before the word "censor" in the string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.