Documentation
Our WebsiteOur Github
  • 👋Welcome to Infinitode Documentation
  • AI Documentation
  • API Documentation
    • Basic Math API Documentation (#Experimental)
    • BMI Calculator API Documentation
    • Character Counter API Documentation
    • Chemical Equation Balancer API Documentation
    • Color Generator API Documentation
    • Date Difference Calculator API Documentation
    • Dungen API Documentation
    • Dungen Dev API Documentation
    • Factorial Calculator API Documentation
    • Fantasy Name Generator API Documentation
    • Fibonacci Sequence Generator API Documentation
    • GCD Calculator API Documentation
    • Hash API Documentation
    • Helix PSA API Documentation
    • LCM Calculator API Documentation
    • Leap Year Checker API Documentation
    • Lorem API Documentation
    • Molar Mass Calculator API Documentation (#Experimental)
    • MycoNom API Documentation
    • Name Generator API Documentation
    • Palindrome Checker API Documentation
    • Password Generator API Documentation
    • Password Strength Detector API Documentation
    • Periodic Table API Documentation
    • Prime Number Checker API Documentation
    • Quadratic Equation Solver API Documentation
    • Random Facts Generator API Documentation
    • Random Quotes Generator API Documentation
    • Roman Numeral Converter API Documentation
    • Simple Interest Calculator API Documentation
    • Slugify API Documentation
    • Text Case Converter API Documentation
    • Unit Converter API Documentation
    • Username Generator API Documentation
    • UUID Generator API Documentation
    • Vowel Counter API Documentation
  • Package Documentation
    • BlurJS Package Documentation
      • BlurJS Usage Examples
      • BlurJS Reference Documentation
    • CodeSafe Package Documentation
      • CodeSafe Reference
        • CodeSafe Functions
    • DeepDefend Package Documentation
      • DeepDefend Reference
        • Attacks Functions
        • Defenses Functions
    • DupliPy Package Documentation
      • DupliPy Reference
        • Formatting Functions
        • Replication Functions
        • Similarity Functions
        • Text Analysis Functions
    • FuncProfiler Package Documentation
      • FuncProfiler Reference
        • FuncProfiler Functions
    • Hued Package Documentation
      • Hued Reference
        • Analysis Functions
        • Colors Functions
        • Conversions Functions
        • Palettes Functions
    • LocalSiteMap Package Documentation
      • LocalSiteMap Reference
        • LocalSiteMap Functions
    • PyAutoPlot Package Documentation
      • PyAutoPlot Reference
        • PyAutoPlot Functions
    • PyWebScrapr Package Documentation
      • PyWebScrapr Reference
        • PyWebScrapr Functions
    • ValX Package Documentation
      • ValX Reference
        • ValX Functions
Powered by GitBook
On this page
  • Detect profanity
  • Remove profanity
  • Detect sensitive information
  • Remove sensitive information
  • Detect hate speech or offensive language
  • Remove hate speech or offensive language

Was this helpful?

  1. Package Documentation
  2. ValX Package Documentation
  3. ValX Reference

ValX Functions

PreviousValX Reference

Last updated 5 months ago

Was this helpful?

Available functions:

  • (text_data, language="English"): Detect profanity in text using regex.

  • (text_data, output_file=None, language="English"): Remove profanity from text data.

  • (text_data, info_type=[]): Detect sensitive information in text data.

  • (text_data, output_file=None, info_type=[]): Remove sensitive information from text data.

  • (text): Detect hate speech or offensive language in a text string.

  • (text_data): Remove hate speech or offensive language in text data using AI.


Detect profanity

Detect profanity in text using regex.

Args:
        text_data (list): A list of strings representing the text data to analyze.
        language (str): The language used to detect profanity. Defaults to 'English'. Available languages include: All, Arabic, Czech, Danish, German, English, Esperanto, Persian, Finnish, Filipino, French, French (CA), Hindi, Hungarian, Italian, Japanese, Kabyle, Korean, Dutch, Norwegian, Polish, Portuguese, Russian, Swedish, Thai, Klingon, Turkish, Chinese.

Returns:
            list: A list of dictionaries where each dictionary represents a detected instance of profanity.
            Each dictionary contains the following keys:
            - "Line" (int): The line number where the profanity was detected.
            - "Column" (int): The column number (position in the line) where the profanity starts.
            - "Word" (str): The detected profanity word.
            - "Language" (str): The language in which the profanity was detected.

Remove profanity

Remove profanity from text data.

Args:
        text_data (list): A list of strings representing the text data to clean.
        output_file (str): The file path to write the cleaned data. If None, cleaned data is not written to a file.
        language (str): The language for which to remove profanity. Defaults to 'English', Available languages include: All, Arabic, Czech, Danish, German, English, Esperanto, Persian, Finnish, Filipino, French, French (CA), Hindi, Hungarian, Italian, Japanese, Kabyle, Korean, Dutch, Norwegian, Polish, Portuguese, Russian, Swedish, Thai, Klingon, Turkish, Chinese.

Returns:
        list: A list of strings representing the cleaned text data.

Detect sensitive information

Detect sensitive information in text data.

Args:
        text_data (list of str): A list of strings representing the text data to be analyzed.
        info_type (str or list of str, optional): One or more types of sensitive info to detect. Available types are: "email", "phone", "credit_card", "ssn", "id", "address", "ip", "iban", "mrn", "icd10", "geo_coords", "username", "file_path", "bitcoin_wallet", "ethereum_wallet". Uses all info types by default.

Returns:
        list of tuple: A list of tuples containing detected sensitive information, each tuple representing (line number, column index, type, value).

Remove sensitive information

Remove sensitive information from text data.

Args:
        text_data (list of str): A list of strings representing the text data to be cleaned.
        output_file (str, optional): Path to the output file where cleaned data will be saved.
        info_type (str or list of str, optional): One or more types of sensitive info to detect and remove. Available types are: "email", "phone", "credit_card", "ssn", "id", "address", "ip", "iban", "mrn", "icd10", "geo_coords", "username", "file_path", "bitcoin_wallet", "ethereum_wallet". Uses all info types by default.

Returns:
        list of str: A list of strings representing the cleaned text data.

Detect hate speech or offensive language

Detect offensive language or hate speech in the provided text string, using an AI model.

Args:
        text (str): A string representing the text data to be used for hate speech detection and offensive language detection.
        
Returns:
        list of str: A list of strings representing the outcome of the detection.

Remove hate speech or offensive language

Remove offensive language or hate speech in the provided text data array, using an AI model.

Args:
        text (str): A string representing the text data to be used for hate speech detection and offensive language detection.

Returns:
        list of str: A list of strings representing the cleaned text data.
detect_profanity
remove_profanity
detect_sensitive_information
remove_sensitive_information
detect_hate_speech
remove_hate_speech