Filter Text Package

The filter_text package provides utilities for filtering sensitive or unwanted text content across multiple categories. This package is ideal for applications requiring moderation of user-generated content, such as chat applications, forums, or social media platforms.

Features

  • Flexible Filtering: Filter sensitive words and phrases across multiple categories:

    • Adult Content: Filters explicit or adult-themed words.
    • Political Content: Filters terms related to politics.
    • Profanity: Filters offensive language.
    • Hate Speech: Filters intolerant or offensive speech.
    • Violence: Filters violent terms and phrases.
    • Drugs: Filters references to drugs.
    • Spam Content: Filters words associated with spam or promotional language.
    • Personal Information: Filters words indicating personal details.
    • Racial Slurs: Filters offensive terms based on race.
    • Articles, Pronouns, Nouns: Filters various word types.
    • Long and Short Words: Filters based on word length.
    • Emojis and Unsupported Text: Filters emojis and non-standard text.
  • Text Transformations: Transform text into various formats:

    • Uppercase
    • Lowercase
    • Camel Case
    • Snake Case
  • Easy API Integration: Simple API for effortless integration into projects.

Filter Types:

  • FilterType.adult: Filters adult content.
  • FilterType.politics: Filters political terms.
  • FilterType.profanity: Filters offensive language.
  • FilterType.hateSpeech: Filters hate speech.
  • FilterType.violence: Filters violent terms.
  • FilterType.drugs: Filters drug references.
  • FilterType.spam: Filters spam keywords.
  • FilterType.personalInfo: Filters personal details.
  • FilterType.racialSlurs: Filters racial slurs.
  • FilterType.articles: Filters articles.
  • FilterType.nouns: Filters nouns.
  • FilterType.pronouns: Filters pronouns.
  • FilterType.longWords: Filters long words.
  • FilterType.shortWords: Filters short words.
  • FilterType.emojis: Filters emojis.
  • FilterType.unsupportedText: Filters unsupported text.

Transformation Types:

  • TransformationType.uppercase: Converts text to uppercase.
  • TransformationType.lowercase: Converts text to lowercase.
  • TransformationType.camelCase: Converts text to Camel Case.
  • TransformationType.snakeCase: Converts text to snake_case.

Getting Started

Prerequisites

  • Dart SDK version >= 2.12.0
  • Flutter SDK (if using with Flutter)

Installation

Add the following line to your pubspec.yaml:

dependencies:
  filter_text: ^1.0.2

Libraries

filter_text
main