Squish42 commited on
Commit
e035f7f
·
1 Parent(s): ad27253

Reduce some useless separators.

Browse files
Files changed (2) hide show
  1. bluemoon.json +2 -2
  2. dataset.yaml +11 -4
bluemoon.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:23823af929103d4d24e05b058bf6eda8fee6fe80a6cf6df5072998c192e271da
3
- size 217187580
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddf817ba1dd15aa3e4617cf3f0c1f91fb0fcb56053445c4b0066812a550267ca
3
+ size 217180735
dataset.yaml CHANGED
@@ -72,7 +72,7 @@ steps:
72
  type: HtmlStrip
73
  description: "Strip HTML"
74
  config:
75
- stripAnchorPatterns: ['/', '.jpg', '.JPG', '.png', '.PNG', '.gif', '.GIF']
76
 
77
  - step: &ooc_strip
78
  type: RegexReplace
@@ -110,6 +110,13 @@ steps:
110
  [ "\t\n", "\n" ], [ "\n\n\n", "\n\n" ], [ ' ', ' ' ], [ " \n", "\n" ]
111
  ]
112
 
 
 
 
 
 
 
 
113
  - step: &trim
114
  type: Trim
115
  description: "Trim leading and trailing whitespace."
@@ -173,7 +180,7 @@ steps:
173
  [ "hvlr\n/\n", "" ],
174
  [ "' s ,\ns s.\ns s, ,\ns.\n", "" ],
175
  [ "I'll post first\n_ _ _ _ _ _ _ _ _ _ _\n", "" ], [ "Moved from PMs to threads", "" ],
176
- [ "I'll start out a with an opening post.", ""],
177
  [ "NSFW\n\n", "" ],
178
  ]
179
 
@@ -183,13 +190,13 @@ input:
183
  sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
184
  reader: *bluemoon
185
  steps: [ *html_linebreaks, *html_strip, *links, *trim, *reduce_whitespace,
186
- *ooc_strip, *ooc_prune ]
187
 
188
  output:
189
  - name: 'Bluemoon'
190
  path: 'out/bluemoon.json'
191
  description: 'Bluemoon 1-1 Fandom RP+ERP cleaned and formatted for Fastchat'
192
- sha512: 0a371870d9448b12322b0865c49055396eb6f9e3c5e6b84a88af0343546597f73608db00be97b5f5d26c3643080fc292247f915de4408e1d0936d6faeb06e560
193
  writer: fastchat
194
  steps: [ *strip_unicode, *reduce_whitespace, *trim_nonwords, *edge_cases, *trim, *empty,
195
  *two_alternating_participants, *rename_participants ]
 
72
  type: HtmlStrip
73
  description: "Strip HTML"
74
  config:
75
+ stripAnchorPatterns: [ '/', '.jpg', '.JPG', '.png', '.PNG', '.gif', '.GIF' ]
76
 
77
  - step: &ooc_strip
78
  type: RegexReplace
 
110
  [ "\t\n", "\n" ], [ "\n\n\n", "\n\n" ], [ ' ', ' ' ], [ " \n", "\n" ]
111
  ]
112
 
113
+ - step: &reduce_separators
114
+ type: ExactReplace
115
+ description: "Reduce nonsensical separators to a maximum of 3 consecutive."
116
+ config:
117
+ recursive: true
118
+ replacements: [ [ "~~~~", "~~~" ], [ "----", "---" ] ]
119
+
120
  - step: &trim
121
  type: Trim
122
  description: "Trim leading and trailing whitespace."
 
180
  [ "hvlr\n/\n", "" ],
181
  [ "' s ,\ns s.\ns s, ,\ns.\n", "" ],
182
  [ "I'll post first\n_ _ _ _ _ _ _ _ _ _ _\n", "" ], [ "Moved from PMs to threads", "" ],
183
+ [ "I'll start out a with an opening post.", "" ],
184
  [ "NSFW\n\n", "" ],
185
  ]
186
 
 
190
  sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
191
  reader: *bluemoon
192
  steps: [ *html_linebreaks, *html_strip, *links, *trim, *reduce_whitespace,
193
+ *ooc_strip, *ooc_prune, *reduce_separators ]
194
 
195
  output:
196
  - name: 'Bluemoon'
197
  path: 'out/bluemoon.json'
198
  description: 'Bluemoon 1-1 Fandom RP+ERP cleaned and formatted for Fastchat'
199
+ sha512: 88e86779a94146d56f8b6c6f3abc3ffc3624066fb5fab389a373a395cfddccfcf13bac4a9ff986c4741c92b29dfb4b493c36c4f8542d2a6499c77c9d09ad41c9
200
  writer: fastchat
201
  steps: [ *strip_unicode, *reduce_whitespace, *trim_nonwords, *edge_cases, *trim, *empty,
202
  *two_alternating_participants, *rename_participants ]