Skip to main content

Installing


Install with pip

pip install nest-dfa==1.1.2

Usage


  • DFAFilter用法

    :explain: 敏感词过滤

    :syntax: DFAFilter(sensitive_words: str) -> None

    :syntax: filter(self, message: str, repl: str="*") -> str

    :param: sensitive_words, 敏感词文本文件地址

    :param: message 需要检测敏感词的字符串

    :param: repl 敏感词需要替换的标识,默认为 *

    :return: 过滤后的字符串

    >>> from pydfa.dfa import DFAFilter
    >>> dfa = DFAFilter(sensitive_words="/mnt/d/sensitive_words.txt")
    >>> message = "大家足球投注哈麻醉"
    >>> print(dfa.filter(message))
    >>> "大家****哈**"
    

Release files for nest-dfa 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nest-dfa 1.1.2
File Size Uploaded
nest-dfa-1.1.2.tar.gz 2.1 kB Details

Release files / nest-dfa-1.1.2.tar.gz

Download URL nest-dfa-1.1.2.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
35d518ca9768043480b8eb436766befa625f19d38dfd47cb666f308ac3c0d459
BLAKE2b-256 checksum
How to use checksums
13a6bf0e3896eede92e0502df18811ab31c6d6494351f8f6d3604c0a5eb53446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.1.2 This release

1 release file

1.1.1

1 release file

1.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page