Squish42 commited on
Commit
a9c9fcf
1 Parent(s): 6dc442e

Move some debug steps to debug.yaml

Browse files
Files changed (2) hide show
  1. dataset.yaml +0 -107
  2. debug.yaml +118 -0
dataset.yaml CHANGED
@@ -31,51 +31,6 @@ _output_steps:
31
  indent: 2
32
  #includeMessageId: true
33
 
34
- _debug_steps:
35
- - step: &extract_ooc
36
- type: RegexExtract
37
- description: "Extract OOC matches for examination"
38
- config:
39
- path: 'out/ooc_%worker%.txt'
40
- dotAll: true
41
- multiLine: true
42
- escape: true
43
- patterns: [
44
- '\{.*\}', '\[.*?\]', '\(\(.*?(\)|\W)\)+', '^\(.*?\){1}', '\([^\(]+\)$',
45
- '(OOC|ooc|OoC|OCC|ooc|Ooc)(:| |-|;)\n?.*?(\n|$)',
46
- '(\n\nSee more|See more\n\n)', '^(RE|Re):.*?\n', '^NSFW:.*?\n$',
47
- '^Note to everyone.*\)\)\n', '_*Author.*\n*_',
48
- 'x{3,}.*TEST?x*', '^- Let me.*-', '^.*\^\^;.*\){1}',
49
- '^As the title suggests.*Littleton.', '^.*\)\)\n'
50
- ]
51
-
52
- - step: &extract_links
53
- type: RegexExtract
54
- description: "Extract links for examination."
55
- config:
56
- path: 'out/links.txt'
57
- escape: true
58
- overwrite: true
59
- patterns: [
60
- '\[img|video.*\[\/img|video\]+',
61
- 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
62
- ]
63
-
64
- - step: &extract_trim_nonwords
65
- type: RegexExtract
66
- description: "Extract leading non-word data for examination."
67
- config:
68
- path: 'out/trim-nonwords.txt'
69
- dotAll: true
70
- multiLine: true
71
- escape: true
72
- overwrite: true
73
- patterns: [
74
- '^(-|,|\||\.|=|_|])\W*(s|\W)+\W(\b|\n)',
75
- '^([w_=x]{5,}|~\+\+~)(\b|\n)',
76
- '^(_|])+(\b|\n)', '^(\s|\.|,|\|)+'
77
- ]
78
-
79
  _steps:
80
  - step: &html_linebreaks
81
  type: ExactReplace
@@ -174,12 +129,6 @@ _steps:
174
  "title or something idk", "Geralt = \n\nDandelion = ",
175
  "(Are we still rping this?"
176
  ]
177
- - step: &strip_usernames
178
- type: ExactReplace
179
- pack: [ 'pack/gen/usernames.csv' ]
180
- config:
181
- caseSensitive: true
182
- packedReplacements: [ 'pack/gen/usernames.csv' ]
183
 
184
  - step: &strip_unicode
185
  type: Encoding
@@ -248,62 +197,6 @@ _steps:
248
  conversationsPath: 'stats/conversations.json.gz'
249
  gZipConversations: true
250
  _passes:
251
- # Collect all usernames from source data
252
- - pass: &usernames
253
- required:
254
- - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
255
- sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
256
- steps:
257
- - *bluemoon
258
- - type: CsvOutput
259
- description: "Extract usernames"
260
- config:
261
- path: 'out/usernames_%worker%.csv'
262
- ignoreDuplicates: true
263
- fields: [ 'from' ]
264
- - type: FileConcatenate
265
- sync: main
266
- config:
267
- path: 'pack/gen/usernames_all.csv'
268
- files: [ 'out/usernames_*.csv' ]
269
- ignoreDuplicateLines: true
270
- eol: "\r\n"
271
- delete: true
272
- artifacts:
273
- - file: 'pack/gen/usernames_all.csv'
274
- sha512: ffcc8aa980f4d8b0cace9092280d07215337cc316cb3fa45742a5f5a735d21a31f581d27884a414df21ac99616d14c7ebec1ab68a5766c10faa4b1564ceb7c20
275
-
276
-
277
- # Count the occurrences of usernames in messages in the source data
278
- - pass: &count_usernames
279
- required:
280
- - path: "pack/gen/usernames_all.csv"
281
- sha512: ffcc8aa980f4d8b0cace9092280d07215337cc316cb3fa45742a5f5a735d21a31f581d27884a414df21ac99616d14c7ebec1ab68a5766c10faa4b1564ceb7c20
282
- - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
283
- sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
284
- steps:
285
- - *bluemoon
286
- - type: StatsCountOccurrences
287
- description: "Count occurrences of usernames."
288
- pack: [ 'pack/gen/usernames_all.csv' ]
289
- config:
290
- path: 'out/usernames_counted_%worker%.csv'
291
- packedPatterns: [ 'pack/gen/usernames_all.csv' ]
292
- countCol: 2
293
- regex: false
294
- min: 1
295
- - type: StatsAddColMerge
296
- description: "Merge username count csv files"
297
- sync: main
298
- config:
299
- path: 'pack/gen/usernames.csv'
300
- files: [ 'out/usernames_counted_*.csv' ]
301
- cols: [ 2 ]
302
- min: 1
303
- artifacts:
304
- - file: 'pack/gen/usernames.csv'
305
-
306
-
307
  - pass: &clean
308
  required:
309
  - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
 
31
  indent: 2
32
  #includeMessageId: true
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  _steps:
35
  - step: &html_linebreaks
36
  type: ExactReplace
 
129
  "title or something idk", "Geralt = \n\nDandelion = ",
130
  "(Are we still rping this?"
131
  ]
 
 
 
 
 
 
132
 
133
  - step: &strip_unicode
134
  type: Encoding
 
197
  conversationsPath: 'stats/conversations.json.gz'
198
  gZipConversations: true
199
  _passes:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  - pass: &clean
201
  required:
202
  - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
debug.yaml ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _input_steps:
2
+ - step: &bluemoon
3
+ type: CsvInput
4
+ sync: main
5
+ config:
6
+ path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
7
+ fields:
8
+ conversation: 'thread_href'
9
+ from: 'message_username'
10
+ message: 'message'
11
+
12
+ _debug_steps:
13
+ - step: &extract_ooc
14
+ type: RegexExtract
15
+ description: "Extract OOC matches for examination"
16
+ config:
17
+ path: 'out/ooc_%worker%.txt'
18
+ dotAll: true
19
+ multiLine: true
20
+ escape: true
21
+ patterns: [
22
+ '\{.*\}', '\[.*?\]', '\(\(.*?(\)|\W)\)+', '^\(.*?\){1}', '\([^\(]+\)$',
23
+ '(OOC|ooc|OoC|OCC|ooc|Ooc)(:| |-|;)\n?.*?(\n|$)',
24
+ '(\n\nSee more|See more\n\n)', '^(RE|Re):.*?\n', '^NSFW:.*?\n$',
25
+ '^Note to everyone.*\)\)\n', '_*Author.*\n*_',
26
+ 'x{3,}.*TEST?x*', '^- Let me.*-', '^.*\^\^;.*\){1}',
27
+ '^As the title suggests.*Littleton.', '^.*\)\)\n'
28
+ ]
29
+
30
+ - step: &extract_links
31
+ type: RegexExtract
32
+ description: "Extract links for examination."
33
+ config:
34
+ path: 'out/links.txt'
35
+ escape: true
36
+ overwrite: true
37
+ patterns: [
38
+ '\[img|video.*\[\/img|video\]+',
39
+ 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
40
+ ]
41
+
42
+ - step: &extract_trim_nonwords
43
+ type: RegexExtract
44
+ description: "Extract leading non-word data for examination."
45
+ config:
46
+ path: 'out/trim-nonwords.txt'
47
+ dotAll: true
48
+ multiLine: true
49
+ escape: true
50
+ overwrite: true
51
+ patterns: [
52
+ '^(-|,|\||\.|=|_|])\W*(s|\W)+\W(\b|\n)',
53
+ '^([w_=x]{5,}|~\+\+~)(\b|\n)',
54
+ '^(_|])+(\b|\n)', '^(\s|\.|,|\|)+'
55
+ ]
56
+
57
+ - step: &strip_usernames
58
+ type: ExactReplace
59
+ pack: [ 'pack/gen/usernames.csv' ]
60
+ config:
61
+ caseSensitive: true
62
+ packedReplacements: [ 'pack/gen/usernames.csv' ]
63
+
64
+
65
+ passes:
66
+ # Collect all usernames from source data
67
+ - pass: &usernames
68
+ required:
69
+ - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
70
+ sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
71
+ steps:
72
+ - *bluemoon
73
+ - type: CsvOutput
74
+ description: "Extract usernames"
75
+ config:
76
+ path: 'out/usernames_%worker%.csv'
77
+ ignoreDuplicates: true
78
+ fields: [ 'from' ]
79
+ - type: FileConcatenate
80
+ sync: main
81
+ config:
82
+ path: 'pack/gen/usernames_all.csv'
83
+ files: [ 'out/usernames_*.csv' ]
84
+ ignoreDuplicateLines: true
85
+ eol: "\r\n"
86
+ delete: true
87
+ artifacts:
88
+ - file: 'pack/gen/usernames_all.csv'
89
+ sha512: ffcc8aa980f4d8b0cace9092280d07215337cc316cb3fa45742a5f5a735d21a31f581d27884a414df21ac99616d14c7ebec1ab68a5766c10faa4b1564ceb7c20
90
+
91
+ # Count the occurrences of usernames in messages in the source data
92
+ - pass: &count_usernames
93
+ required:
94
+ - path: "pack/gen/usernames_all.csv"
95
+ sha512: ffcc8aa980f4d8b0cace9092280d07215337cc316cb3fa45742a5f5a735d21a31f581d27884a414df21ac99616d14c7ebec1ab68a5766c10faa4b1564ceb7c20
96
+ - path: "data/rentry/bluemoon/bluemoon-fanbased-roleplays-1x1.csv"
97
+ sha512: f31d6bd278bc4211736d6aace3917cd0c1d0143bec9bf9d07054f5f9b32060e17399b6ea0935774b2271ac45a88309a60ef8eec8c4ac5283d1b353a255529cc5
98
+ steps:
99
+ - *bluemoon
100
+ - type: StatsCountOccurrences
101
+ description: "Count occurrences of usernames."
102
+ pack: [ 'pack/gen/usernames_all.csv' ]
103
+ config:
104
+ path: 'out/usernames_counted_%worker%.csv'
105
+ packedPatterns: [ 'pack/gen/usernames_all.csv' ]
106
+ countCol: 2
107
+ regex: false
108
+ min: 1
109
+ - type: StatsAddColMerge
110
+ description: "Merge username count csv files"
111
+ sync: main
112
+ config:
113
+ path: 'pack/gen/usernames.csv'
114
+ files: [ 'out/usernames_counted_*.csv' ]
115
+ cols: [ 2 ]
116
+ min: 1
117
+ artifacts:
118
+ - file: 'pack/gen/usernames.csv'