modbot.environment.ProcessingConfig
- class modbot.environment.ProcessingConfig(file_name=None, run_config=None)[source]
Bases:
BaseConfig
Configuration for preprocessing routines
Methods
get_config
([file_name, config])Get configuration from file
save
(outpath)Save config to json file
update_config
(args)Update config with args
Attributes
Threshold probability for moderation
review bans of these moderators during training
Path to bert encoder
Path to bert preprocess model
BLACKLIST
Phrase lists for filtering and manual checking signals
Channel to moderate
Path to Chatty data for training
Threshold probability to check for new classification
Directory where training data and model is stored
review deletions by these moderators during training
List of emotes to use for filtering
config file path
Phrases to check
ignore actions of these moderators during training
ignore messages of these users during training
file for training
Strings to indicate if message contains a link
Log level.
Directory to write logs
Get default log file name
Path to ML model
Type of model to use for moderation
Bot username
Whether to allow links in chat or not
Ratio of ones to total number of samples for training data
Whether to send message in chat when probability is exceeded
TRAIN_ACTIONS
Allowed phrases
Whether to write chat messages to log file
Config attributes info
Get public attributes
- ACT_PMIN = 0.6
Threshold probability for moderation
- BAN_CHECKS = []
review bans of these moderators during training
- BERT_ENCODER = 'https://tfhub.dev/tensorflow/small_bert/bert_en_uncased_L-2_H-128_A-2/2'
Path to bert encoder
- BERT_PREPROCESS = 'https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3'
Path to bert preprocess model
- BLACKLIST_OPTIONS = ['#removethemole', 'super hottie', 'thicc', 't h i c c', 'u are hot', 'you are hot', 'your hot', 'ur hot', 'u are sexy', 'you are sexy', 'your sexy', 'ur sexy', 'why is this in just chatting', 'u a virgin', 'wrong category', 'si1mp', 's1mp', 'simp', 'T H I C C', 'onlyfans', 'thicc(.*)Botez', 'thicc(.*)Alex', 'thicc(.*) andrea', 'Botez(.*) thicc', 'Botez is(.*) hot', 'Andrea is(.*) hot', 'Alex is(.*) hot', 'Alex(.*)thicc', 'andrea(.*) thicc', 'she(.*)thicc', 'sexy(.*) Alex', 'sexy(.*) andrea', 'Botez(.*) sexy', 'sexy(.*) Botez', 'Andrea(.*)sexy', 'Alex(.*) sexy', 'andrea(.*) sexy', 'ur so hawt', 'u so hawt', 'rape', 'your butthole', 'mybutthole', 'give me a kiss', 'gimme a kiss', 'blow me a kiss', 'cunt', 'suck dick', 'lick(.*) feet', 'suck my', 'whore', 'simp', 'lick(.*) toes', 'suck(.*) toes', 'your vagina', 'your vag', 'show vag', 'vagene', 'show bobs', 'you(.*)ugly', 'your booty', 'ur so hot', 'u so hot', 'slut', 'what happened to you(.*) face']
Phrase lists for filtering and manual checking signals
- CHANNEL = None
Channel to moderate
- CHATTY_DIR = None
Path to Chatty data for training
- CHECK_PMIN = 0.4
Threshold probability to check for new classification
- DATA_DIR = '/home/runner/work/modbot/modbot/data'
Directory where training data and model is stored
- DELETE_CHECKS = []
review deletions by these moderators during training
- EMOTELIST = ['NotLikeThis', '<3', 'LUL', 'WutFace', 'ResidentSleeper', 'pepeLa', 'pepeDS', 'pepeJAM', 'pepePls', 'FeelsBadMan', 'FeelsGoodMan', 'monkaS', 'monkaHmm', 'KEKW', 'Kapp', 'Hypers', 'HandsUp', 'FeelsWeirdMan', 'EZY', '5Head', '3Lass', 'Pog', 'Pepega', 'PagChomp', 'OMEGALUL', 'monkaW', 'PogU', 'PepeHands', 'PepoThink', 'alexandraSub', 'PepePls', 'PixelBob', 'Jebaited', 'TriHard', 'MrDestructoid', 'Keepo', 'HeyGuys', 'PepeLaugh', 'SquadP', 'PJSugar', 'ammoHeman', 'SourPls', 'peepoHappy', 'HotPokket', 'BibleThump', 'DansGame', 'orbThonk', 'malexaH', 'electraSad', 'TopHat', 'FutureMan', 'PokGengar', 'OMEGA', 'onetri2Hii', 'bayliunSad', 'bayliunVictory', 'cheer100', 'cheer10', 'cheer1', 'TBAngel', 'chesscoachHi', 'chesscoachWhat', 'TwitchUnity', 'justbu8', 'blinkxXmas', 'symfNerd', 'malexaHi', 'HahaTurtledove', 'HahaThisisfine', 'HahaThink', 'HahaSweat', 'HahaSleep', 'HahaShrugRight', 'HahaShrugMiddle', 'HahaLean', 'HahaNutcracker', 'HahaPoint', 'HahaSnowhal', 'HahaPresent', 'HahaReindeer', 'HahaShrugLeft', 'HahaHide', 'HahaGoose', 'HahaGingercat', 'HahaElf', 'HahaDoge', 'HahaCat', 'HahaBaby', 'HahaNyandeer', 'Haha2020', 'HahaBall', 'HahaDreidel', 'gutBaby']
List of emotes to use for filtering
- FILE_NAME = None
config file path
- GRAYLIST = []
Phrases to check
- IGNORE_ACTIONS = []
ignore actions of these moderators during training
- IGNORE_USERS = []
ignore messages of these users during training
- INFILE = None
file for training
- LINKLIST = ['https://', 'http://', 'www.', '.com', '.net', '.org', '.edu', '/tv', 'tv/', '.tv', 'http:', 'https:']
Strings to indicate if message contains a link
- LOGGER_LEVEL = 'VERBOSE'
Log level.
- LOG_DIR = '/home/runner/work/modbot/modbot/data/logs'
Directory to write logs
- property LOG_PATH
Get default log file name
- MODEL_PATH = None
Path to ML model
- MODEL_TYPE = 'SVM'
Type of model to use for moderation
- NICKNAME = None
Bot username
- NOLINKS = False
Whether to allow links in chat or not
- OFFENSIVE_WEIGHT = 0.01
Ratio of ones to total number of samples for training data
- PMSG_ON = False
Whether to send message in chat when probability is exceeded
- WHITELIST = ['LUL', 'KEKW', '!drama', 'http://', 'https://', '/tv', 'tv/']
Allowed phrases
- WRITE_LOG = True
Whether to write chat messages to log file
- property attrs
Config attributes info
- get_config(file_name=None, config=None)
Get configuration from file
- property public_attrs
Get public attributes
- Returns
Dictionary of public global attributes
- Return type
dict
- save(outpath)
Save config to json file
- Parameters
outpath (str) – Path to save public attrs
- update_config(args)
Update config with args
- Parameters
args (parser.parse_args) – Args from argparser with which to update config