name: Bluemoon
description: "Bluemoon 1-1 Fandom RP+ERP cleaned and formatted for Fastchat"
build:
conversationBatch: 100
cleanDirectory: [ 'out/*' ]
verifyRequirements: false
verifyArtifacts: true
#concurrency:
# local: 16
_input_steps:
- step: &bluemoon
type: CsvInput
sync: main
config:
path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
fields:
conversation: 'thread_href'
from: 'message_username'
message: 'message'
_output_steps:
- step: &bluemoon_fastchat
type: FastChatOutput
sync: main
config:
path: "out/bluemoon.json"
indent: 2
_debug_steps:
- step: &extract_ooc
type: RegexExtract
description: "Extract OOC matches for examination"
config:
path: 'out/ooc_%worker%.txt'
dotAll: true
multiLine: true
escape: true
patterns: [
'\{.*\}', '\[.*?\]', '\(\(.*?(\)|\W)\)+', '^\(.*?\){1}', '\([^\(]+\)$',
'(OOC|ooc|OoC|OCC|ooc|Ooc)(:| |-|;)\n?.*?(\n|$)',
'(\n\nSee more|See more\n\n)', '^(RE|Re):.*?\n', '^NSFW:.*?\n$',
'^Note to everyone.*\)\)\n', '_*Author.*\n*_',
'x{3,}.*TEST?x*', '^- Let me.*-', '^.*\^\^;.*\){1}',
'^As the title suggests.*Littleton.', '^.*\)\)\n'
]
- step: &extract_links
type: RegexExtract
description: "Extract links for examination."
config:
path: 'out/links.txt'
escape: true
overwrite: true
patterns: [
'\[img|video.*\[\/img|video\]+',
'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
]
- step: &extract_trim_nonwords
type: RegexExtract
description: "Extract leading non-word data for examination."
config:
path: 'out/trim-nonwords.txt'
dotAll: true
multiLine: true
escape: true
overwrite: true
patterns: [
'^(-|,|\||\.|=|_|])\W*(s|\W)+\W(\b|\n)',
'^([w_=x]{5,}|~\+\+~)(\b|\n)',
'^(_|])+(\b|\n)', '^(\s|\.|,|\|)+'
]
_steps:
- step: &html_linebreaks
type: ExactReplace
description: "Convert html
line breaks to \n"
config:
replacements: [ [ '
', "\n" ] ]
- step: &html_strip
type: HtmlStrip
description: "Strip HTML"
config:
stripAnchorPatterns: [ '/', '.jpg', '.JPG', '.png', '.PNG', '.gif', '.GIF' ]
- step: &ooc_strip
type: RegexReplace
description: "Strip OOC content and some HTML errors."
config:
dotAll: true
multiLine: true
replacements: [
# This might be a bit overzealous.
[ '\{.*\}', "" ], [ '\[.*?\]', "" ], [ '\(\(.*?(\)|\W)\)+', "" ],
# Match for (...) but only at the beginning and end of messages.
[ '^\(.*?\){1}', "" ], [ '\([^\(]+\)$', "" ],
[ '(OOC|ooc|OoC|OCC|ooc|Ooc)(:| |-|;)\n?.*?(\n|$)', "" ],
[ '(\n\nSee more|See more\n\n)', "" ], [ '^(RE|Re):.*?\n', "" ], [ '^NSFW:.*?\n$', "" ],
# More author's notes and the like
[ '^Note to everyone.*\)\)\n', "" ], [ '_*Author.*\n*_', "" ],
[ 'x{3,}.*TEST?x*', "" ], [ '^- Let me.*-', "" ], [ '^.*\^\^;.*\){1}', "" ],
[ '^As the title suggests.*Littleton.', "" ],
[ '^.*\)\)\n', "" ]
]
- step: &links
type: RegexReplace
description: "Remove all links"
config:
replacements: [
[ '\[(img|video).*\].*\[(\/img|video)\]', "" ],
[ '[hH]ttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', "" ]
]
- step: &reduce_whitespace
type: ExactReplace
description: "Reduce standalone tabs that do not affect formatting, and newlines to maximum of two consecutive."
config:
recursive: true
replacements: [
[ "\t\n", "\n" ], [ "\n\n\n", "\n\n" ], [ ' ', ' ' ], [ " \n", "\n" ]
]
- step: &reduce_separators
type: ExactReplace
description: "Reduce nonsensical separators to a maximum of 3 consecutive."
config:
recursive: true
replacements: [ [ "~~~~", "~~~" ], [ "----", "---" ], [ "<>", "*" ], [ "****", "***" ], [ ".....", "...." ] ]
- step: &reduce_punctuation
type: ExactReplace
description: "Reduce excessive punctuation"
config:
recursive: true
replacements: [ [ "!!!!", "!!!" ], [ "????", "???" ], [ "?!?!?!", "?!?!" ], [ "!?!?!?", "!?!?" ] ]
- step: &trim
type: Trim
description: "Trim leading and trailing whitespace."
- step: &ooc_prune
type: FullMatch
description: "Prune fully OOC messages with known content."
config:
action: drop
caseSensitive: false
patterns: [
"BUMP", "-BUMP-", "~BUMP~", "Closed...", "Closed", "This thread is closed", "bump.", "*DELETED*",
"...", "Okay... so you didn't make a starting post??", "---", "~~~",
"The End ^^\nshortest RP ever XDD", "the end^^", "i think so^^", "Fin^^", "Fin ^^", "-Placeholder-", "Molly was",
"Hahahaha, Yeah, I was a little confused",
"Lol do you want to delted this thread possibly and start a new one I'm sorry",
"Sure, what ever you want!", "How about a demon/human what do you want the plot to be and if you could start it",
"Okay, do you want to be the demon, or do you want me to be the demon?", "You be the demon", "Okay, do you want to start today or tomorrow?",
"Today if possible and what's the plot", "Hmmmmm I have no idea hahahaha you?", "Hmmm demon falls for a human even though he ain't supposed to",
"Ok, sounds good! Anything else you want in?",
"Not really maybe demon fight\n\nAnd that the demon has to shroud him self in human form and reveals himself to her",
"Okay, I'll make it a bit later.", "Okay can't wait",
"THIS RP IS OFFICIALLY CLOSED NO FURTHER POSTS WILL BE POSTED AS I HAVE LOST INTEREST IN THE PLOT SORRY FOR THE LOSSES",
# TODO Do some whitespace reduction before post.
"This is a Supernatural Fandom Romance RP between Dean Winchester and Castiel the angel. \n\nWARNING! CONTAINS HOMOSEXUAL CONTENT! IF YOU'RE HOMOPHOBIC, GO AWAY!",
"\n\nThis will be a one x one between myself and Iikaitlynii based off the AMC television series The Walking Dead​",
"Well I doubt he is going to be able to contact me if he is banned....can somebody please tell me why he got banned? I was just rping with him and he role plays well and then I saw he got banned for Ban-Evasion but what exactly was he doing to get banned?",
]
- step: &strip_unicode
type: Encoding
description: "Strip unicode sequences not present in ascii. This doesn't affect output encoding."
config:
invalid: ""
codec: us-ascii
- step: &strip_nonwords
type: RegexReplace
description: "Consecutive non-word characters"
config:
dotAll: true
multiLine: true
replacements: [
[ '^(-|,|\||\.|=|_|])\W*(s|\W)+\W(\b|\n)', "" ],
[ '^([w_=x]{5,}|~\+\+~)(\b|\n)', "" ],
[ '^(_|])+(\b|\n)', "" ], [ '^(\s|\.|,|\|)+', "" ],
[ '([^a-zA-Z0-9 !?\.])\1{4,}', "" ],
]
- step: &spelling
type: ExactReplace
description: "Spelling mistakes and typos."
config:
caseSensitive: false
replacements: [ [ "bow staff","bo staff" ], [ "possiable", "possible" ], [ "possiably", "possibly" ], [ "damamge", "damage" ], [ "didn t", "didn't" ] ]
- step: &empty
type: FullMatch
description: "Drop empty messages."
config:
action: drop
patterns: [ "" ]
- step: &two_alternating_participants
type: Participants
description: "Require exactly 2 alternating participants"
config:
min: 2
max: 2
alternating: true
- step: &rename_participants
type: RenameParticipants
description: "Rename participants to their conversation roles."
config:
names: [ "human", "gpt" ]
- step: &edge_cases
type: ExactReplace
description: "Remove a few edge cases."
config:
replacements: [
[ "TEXT TEXT TEXT TEXT TEXT\nTEXT TEXTTEXTTEXT", "" ],
[ "hvlr\n/\n", "" ],
[ "' s ,\ns s.\ns s, ,\ns.\n", "" ],
[ "I'll post first\n_ _ _ _ _ _ _ _ _ _ _\n", "" ], [ "Moved from PMs to threads", "" ],
[ "I'll start out a with an opening post.", "" ],
[ "\nOOC\n", "" ],
[ "NSFW\n\n", "" ], [ "Kinda short -- sorry!", "" ],
[ "\nthe end?^^", "" ], [ "\nThe end.^^", "" ], [ "\nthe end?", "" ], [ "\nThe end?", "" ], [ "\nThe end.", "" ],
# We can probably hit more end of message (ooc ...) with regex.
[ "\nThe End. (awwww lol)", "" ],
[ "\nThe End.", "" ], [ "The End?", "" ], [ "\n~The End~", "" ], [ "The End ^^\nshortest RP ever XDD", "" ],
[ "***THE END***", "" ], [ "THE END, perfectly timed question lol", "" ],
[ "Just gonna toss this here so I don't have to hunt for it again.", "" ],
[ "If you want to hurry it up and get to the smut, just let me know XD I'm fine with whatever pace you like best.", "" ],
[ "???OCC. I intentionally jumbled it around a bit to make it more of a blur.???\n", "" ],
[ "IC: ", "" ], [ "BiC: ", "" ], [ "bic; ", "" ], [ "ON:\n", "" ],
[ "nighty night^^ see you in the morning.)", "" ],
[ "oh yes, Abandoned is a good one^^ Lets do the Time Warm Again is really funny too!)", "" ],
[ "i dunno, lol do you want to?^^ we could always have it that Lucius and Narcissa HAVE to get married or Lucius risks the disinheratance from his family or something like an arranged marraige or something?)", "" ],
[ "i thought he was a vampire? oh well. ^^", "" ], [ "don't frget about Love and Lies!^^)", "" ],
[ "If I manage to catch your eye, please post. ^^", "" ], [ "(couldn't think of anything else. ^^", "" ],
[ "g'night! sleep well^^", "" ], [ "going to bed ^^ g'night.", "" ],
[ "(and yes, there is a difference^^)", "" ],
[ "going to bed. see you in the morning!^^)", "" ], [ "going to bed^^ see you in the morning.)", "" ],
[ "going to bed^^)", "" ],
[ "wanna see Harry's Animagus form?^^ it's so cute you get Three pics!^^\nRawrandLazyandHungry", "" ],
[ "\n^^^ her shorts are just a little longer lol", "" ],
[ "*Edit: Plus a tank top and a spandex/latex pants blend.", "" ],
[ "THE END? or maybe THAT'S ALL FOLKS! or even better AND THEY ALL LIVED HAPPILY EVER AFTER! (ok, you may kill me now^^)", "" ],
[ "OOC. you remember that not i sent explaining changing and half bloods? now is when it comes in handy XDD)", "" ],
[ "(HAD TO SAY IT)", "" ],
[ "////brooooo sorry my auto correct went to Hatsumi lol it was supposed to be Natsu lol", "" ],
[ ":: Why is it you make your text SO big? Lol. ::", "" ],
[ "Because I can't see that good even though I have glasses. LOL xD", "" ],
[ ":: Oh, okay. Haha. Just wondering. ^_^ ::", "" ],
[ "(man messed up the name already XD )", "" ],
[ "Hmm I know, but its to much effort tonightmaybe tomorrow. XD And I couldnt be lucky enough to have a bread maker, but I do know how to make bread, just dont do it a lot. XD)", "" ],
[ "(can't spell the first part of it...)", "" ],
[ "READ: Alright, I'm not the best at intros, so here you go. This story takes place in the land of Skyrim. Hopefully you've heard of the game of the year by now. We enter with Luke, a man of about 22, who makes his living doing \"odd jobs\". If someone has a fight to settle, they call him. I someone has a wolf terrorizing their herd of sheep, he's your man.", "" ],
[ "Please be aware this roleplay will contain spoilers for Naruto and Naruto Shippuuden. If you have not watch all of Shippuuden, do NOT read this RP from start to finish. You have been warned. This RP will follow the anime's footsteps while changing bits of the players amusement. Again, proceed with caution.", "" ],
[ "\n*** The Walking Dead RP ***", "" ],
[ "Figgure ref", "" ],
[ "This rp will be between the character Gin Ichimaru played by True Decade and an OC of mine.\n\n---", "" ],
[ "\nClick to expand...", "" ],
[ "now what?))", "Continue." ],
]
_passes:
- pass: &usernames
required:
- path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
steps:
- *bluemoon
- type: CsvOutput
description: "Extract usernames"
config:
path: 'out/usernames_%worker%.csv'
ignoreDuplicates: true
fields: [ 'from' ]
- type: FileConcatenate
sync: main
config:
path: 'out/usernames.csv'
files: [ 'out/usernames_*.csv' ]
ignoreDuplicateLines: true
delete: true
artifacts:
- file: 'out/usernames.csv'
sha512: 4caf853406443e00579ce4556340cc94c1e52933d4cd487c9865464ee72f4f60132a0c7ecc0aa971c85cf1aebdfc307cb066bfd20bfc50840563a4252412b6c5
- pass: &clean
required:
- path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
steps: [ *bluemoon,
*html_linebreaks, *html_strip, *links, *trim, *reduce_whitespace,
*ooc_strip, *reduce_separators, *reduce_punctuation, *spelling, *ooc_prune,
*strip_unicode,
*reduce_whitespace, *strip_nonwords, *edge_cases, *trim, *empty,
*two_alternating_participants, *rename_participants,
*bluemoon_fastchat,
]
artifacts:
- file: 'out/bluemoon.json'
sha512: 55283c2ba88be4243c296e1aa2cc13c685932f1c4b96254c6cab12e30c9526085c1433e824cf9f388995fea71e4b99e55f004621b9e7b4a936378d5e61e410e0
passes: [ *clean ]