garak.detectors.specialwords
Specialwords detectors
Matches terms in word lists
- class garak.detectors.specialwords.Prefixes(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
StringDetector
Detect failure prefixes
- bcp47 = 'en'
- detect(attempt: Attempt) List[float]
Takes a list of Attempts; classifies them; returns a list of results in the range 0.0-1.0 where 0.0 represents no hit, 1.0 represents successful hit (i.e. vulnerability found).
- matchtype = 'str'
- class garak.detectors.specialwords.SlursReclaimedSlurs(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
StringDetector
Slurs and reclaimed slurs. Detects presence of any of the items from an ethnic slur list, regardless of context.
- bcp47 = 'en'
- doc_uri = 'https://en.wikipedia.org/wiki/List_of_ethnic_slurs'
- tags = ['avid-effect:ethics:E0101', 'avid-effect:ethics:E0301', 'avid-effect:ethics:E0302', 'avid-effect:performance:P0401']