forked from tuzzeg/detect_insults
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkhtml.py
678 lines (495 loc) · 17.7 KB
/
mkhtml.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
#!/usr/bin/env python
import sys
import random
import re
from operator import itemgetter
import math
from itertools import islice
from datetime import datetime
from scipy.sparse import csr_matrix
from numpy import array, zeros, matrix
from sklearn import linear_model
from sklearn import cross_validation
from sklearn import metrics
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from data import loadTestJson, loadTrainJson
from LM import KneserNeyLM, ngrams
from wordshape import wordShape, capCount
from features import *
from model import *
# Make submission using model
def mkSub(modelF, trainFile, testFile, outFile):
printNow("make submission")
trainRows = list(loadTrainJson(trainFile))
printNow(" load train rows")
m = modelF()
m.train(trainRows)
printNow(" trained")
makeSubmission(m, testFile, outFile)
return m
def makeSubmission(model, testFile, outFile):
rows = loadTestJson(testFile)
printNow(" load test rows")
with open(outFile, 'w') as f:
f.write('Insult,Date,Comment\n')
f.writelines(['%f,%s,%s\n' % (model.classify1(row), row.dt, row.rawText) for row in rows])
printNow(" submission created")
def printNow(msg):
print '%s [%s]' % (msg, datetime.strftime(datetime.now(), '%H:%M:%S'))
def printOutliers(outliers, outFile):
def insultText(insult):
if insult: return 'Insult'
return ''
def norm(s):
s = s.replace('\n', '<br>')
return s
with open(outFile, 'w') as f:
f.write('<html><table border="1">\n')
f.writelines('<tr><td><b>%s</b></td><td><b>%.3f</b></td></tr>\n<tr><td colspan="2">%s</td></tr>\n' % (insultText(insult), score, norm(text)) for diff, insult, score, text in outliers)
f.write('</table></html>')
def getOutliers(modelF, rows, n = 20, insult = True, k = 4):
kfold = cross_validation.KFold(len(rows), k = k, indices = True, shuffle = True)
rows = array(rows)
train, test = next(islice(kfold, 1))
model = modelF()
model.train(rows[train])
def out(row):
score = model.classify1(row)
return (abs(float(row.insult) - score), row.insult, score, row.text)
return sorted(map(out, filter(lambda row: insult == row.insult, rows[test])), key = itemgetter(0), reverse = True)[:n]
def printOutliersRF(outliers, outFile):
def insultText(insult):
if insult: return 'Insult'
return ''
def norm(s):
s = s.replace('\n', '<br>')
return s
with open(outFile, 'w') as f:
f.write('<html><table border="1">\n')
f.writelines('<tr><td><b>%s</b></td><td><b>%.3f</b></td><td>%s</td></tr>\n<tr><td colspan="3">%s</td></tr>\n' % (insultText(insult), score, ' '.join(['<b>%.3f</b>' % f for f in features]), norm(text)) for diff, insult, score, features, text in outliers)
f.write('</table></html>')
def getOutliersRF(model, rows, n = 20, insult = True):
def out(row):
score = model.classify1(row.text)
return (abs(float(row.insult) - score), row.insult, score, model.featurize(row.text), row.text)
return sorted(map(out, filter(lambda row: insult == row.insult, rows)), key = itemgetter(0), reverse = True)[:n]
#
# Print important features
def topFeatures(model, n = 10, reverse = 1):
return sorted([(word, weight) for ((word, c), weight) in zip(model.featDict.items(), model.estimator.coef_[0])], key = itemgetter(1), reverse = reverse)[:n]
# some models
def wordsLogistic():
return LogRegModel(SetExtractor(decorateFeat('w[%s]', textFeat(getWords)), probScore))
def words2Logistic():
return LogRegModel(SetExtractor(decorateFeat('n2[%s]', textFeat(getNgrams(2))), probScore))
def words12Logistic():
f1 = decorateFeat('w[%s]', textFeat(getWords))
f2 = decorateFeat('n2[%s]', textFeat(getNgrams(2)))
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def words12SortedLogistic():
f1 = decorateFeat('w[%s]', textFeat(getWords))
f2 = decorateFeat('n2[%s]', textFeat(getNgramsSorted(2)))
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def ngramsLogistic(n):
mask = 'ss' + str(n) + '[%s]'
return lambda: LogRegModel(SetExtractor(decorateFeat(mask, textFeat(getCharNgrams(n))), probScore))
def ngramsRank(n):
mask = 'ss' + str(n) + '[%s]'
return lambda: RankModel(SetExtractor(decorateFeat(mask, textFeat(getCharNgrams(n))), probScore))
def ngramsTfLogistic(n):
mask = 'ss' + str(n) + '[%s]'
return lambda: LogRegModel(TFExtractor(decorateFeat(mask, textFeat(getCharNgrams(n)))))
def ngramsTfRank(n):
mask = 'ss' + str(n) + '[%s]'
return lambda: RankModel(TFExtractor(decorateFeat(mask, textFeat(getCharNgrams(n)))))
def wordShapesLogistic():
return LogRegModel(SetExtractor(decorateFeat('shape[%s]', textFeat(wordShapes)), probScore))
def wordShapesTfLogistic():
return LogRegModel(TFExtractor(decorateFeat('shape[%s]', textFeat(wordShapes))))
def stemLogistic():
return LogRegModel(SetExtractor(decorateFeat('stem[%s]', getStems1), probScore))
def stemRank():
return RankModel(SetExtractor(decorateFeat('stem[%s]', getStems1), probScore))
def stem2Logistic():
f1 = decorateFeat('stem2[%s]', getStemNgrams(2))
return LogRegModel(SetExtractor(f1, probScore), C = 11)
def stem12Logistic():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('stem2[%s]', getStemNgrams(2))
return LogRegModel(SetExtractor(combine(f1, f2), probScore), C = 11)
def stem12Rank():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('stem2[%s]', getStemNgrams(2))
return RankModel(SetExtractor(combine(f1, f2), probScore))
def stem12Ridge():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('stem2[%s]', getStemNgrams(2))
return RegModel(SetExtractor(combine(f1, f2), probScore), estimator = linear_model.Ridge(alpha = 14))
def stem12SortedLogistic():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('stem2[%s]', getStemNgramsSorted(2))
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def stem12SortedRank():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('stem2[%s]', getStemNgramsSorted(2))
return RankModel(SetExtractor(combine(f1, f2), probScore))
def tagsLogistic():
f1 = decorateFeat('stem1[%s]', getTags)
return LogRegModel(SetExtractor(f1, probScore))
def tags12Logistic():
f1 = decorateFeat('tag[%s]', getTags)
f2 = decorateFeat('tag2[%s]', getTagNgrams(2))
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def tags12TfLogistic():
f1 = decorateFeat('tag[%s]', getTags)
f2 = decorateFeat('tag2[%s]', getTagNgrams(2))
return LogRegModel(TFExtractor(combine(f1, f2)))
#
# LM classifiers
def wordsLm(n):
return lambda: LMModel(WordsSeqExtractor(wordsSeq), n = n)
def stemLm(n):
return lambda: LMModel(WordsSeqExtractor(getStems), n = n)
def tagLm(n):
return lambda: LMModel(SeqExtractor(getTags), n = n)
#
# Subseq classifiers
def wordsSubseq2Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq2(wordsSeq, n), probScore))
def wordsSubseq3Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq3(wordsSeq, n), probScore))
def stemsSubseq2Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq2(getStems, n), probScore))
def stemsSubseq2Rank(n):
return lambda: RankModel(SetExtractor(getSubseq2(getStems, n), probScore))
def stemsSubseq3Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq3(getStems, n), probScore))
def tagsSubseq2Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq2(getTags, n), probScore))
def tagsSubseq3Logistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq3(getTags, n), probScore))
def stemsSubseq2SortedLogistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq2Sorted(getStems, n), probScore))
def stemsSubseq2SortedRank(n):
return lambda: RankModel(SetExtractor(getSubseq2Sorted(getStems, n), probScore))
def stemsSubseq2SortedRank(n):
return lambda: RankModel(SetExtractor(getSubseq2Sorted(getStems, n), probScore))
def stemsSubseq3SortedLogistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq3Sorted(getStems, n), probScore))
def tagsSubseq2SortedLogistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq2Sorted(getTags, n), probScore))
def tagsSubseq3SortedLogistic(n):
return lambda: LogRegModel(SetExtractor(getSubseq3Sorted(getTags, n), probScore))
#
# Mixed ngrams classifiers
def mixedST():
return LogRegModel(SetExtractor(mixedNgramsST, probScore))
def mixedTS():
return LogRegModel(SetExtractor(mixedNgramsTS, probScore))
def mixedST_TS():
f1 = mixedNgramsST
f2 = mixedNgramsTS
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def mixedSST():
return LogRegModel(SetExtractor(mixedNgramsSST, probScore))
def mixedSTS():
return LogRegModel(SetExtractor(mixedNgramsSTS, probScore))
def mixedSTT():
return LogRegModel(SetExtractor(mixedNgramsSTT, probScore))
def mixedTSS():
return LogRegModel(SetExtractor(mixedNgramsTSS, probScore))
def mixedTST():
return LogRegModel(SetExtractor(mixedNgramsTST, probScore))
def mixedTTS():
return LogRegModel(SetExtractor(mixedNgramsTTS, probScore))
def mixedSTT_TST_TTS():
f1 = mixedNgramsSTT
f2 = mixedNgramsTST
f3 = mixedNgramsTTS
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
# Syntax classifiers
def syntaxStems12():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('syn[%s]', synStems2)
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def syntaxStems2():
return LogRegModel(SetExtractor(synStems2, probScore))
def syntaxStems2Dep():
return LogRegModel(SetExtractor(synStems2Dep, probScore))
def syntaxStemsL():
return LogRegModel(SetExtractor(synStemsL, probScore))
def syntaxStemsR():
return LogRegModel(SetExtractor(synStemsR, probScore))
def syntaxStemsLR():
f1 = decorateFeat('synL[%s]', synStemsL)
f2 = decorateFeat('synR[%s]', synStemsR)
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def syntaxStems12_LR():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('syn[%s]', synStems2)
f3 = decorateFeat('synL[%s]', synStemsL)
f4 = decorateFeat('synR[%s]', synStemsR)
return LogRegModel(SetExtractor(combine(f1, f2, f3, f4), probScore))
# syntax - from dependency graph
def syntaxStems3():
return LogRegModel(SetExtractor(synStems3, probScore))
def syntaxStems123():
f1 = decorateFeat('stem1[%s]', getStems1)
f2 = decorateFeat('syn2[%s]', synStems2)
f3 = decorateFeat('syn3[%s]', synStems3)
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
def syntaxTags2():
return LogRegModel(SetExtractor(synTags2, probScore))
def syntaxTags3():
return LogRegModel(SetExtractor(synTags3, probScore))
def syntaxTags12():
f1 = decorateFeat('tags1[%s]', getTags)
f2 = decorateFeat('tags2[%s]', synTags2)
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def syntaxTags123():
f1 = decorateFeat('tags1[%s]', getTags)
f2 = decorateFeat('tags2[%s]', synTags2)
f3 = decorateFeat('tags3[%s]', synTags3)
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
def syntaxMixedST():
return LogRegModel(SetExtractor(synMixedST, probScore))
def syntaxMixedTS():
return LogRegModel(SetExtractor(synMixedTS, probScore))
def syntaxMixedST_TS():
f1 = synMixedST
f2 = synMixedTS
return LogRegModel(SetExtractor(combine(f1, f2), probScore))
def syntaxMixedSST():
return LogRegModel(SetExtractor(synMixedSST, probScore))
def syntaxMixedSTS():
return LogRegModel(SetExtractor(synMixedSTS, probScore))
def syntaxMixedSTT():
return LogRegModel(SetExtractor(synMixedSTT, probScore))
def syntaxMixedTSS():
return LogRegModel(SetExtractor(synMixedTSS, probScore))
def syntaxMixedTST():
return LogRegModel(SetExtractor(synMixedTST, probScore))
def syntaxMixedTTS():
return LogRegModel(SetExtractor(synMixedTTS, probScore))
def syntaxMixedSTT_TST_TTS():
f1 = synMixedSTT
f2 = synMixedTST
f3 = synMixedTTS
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
# syntax - sentence level
def syntaxStems12Sen():
return SenModel(syntaxStems12())
def syntaxStems2Sen():
return SenModel(syntaxStems2())
def syntaxStems2DepSen():
return SenModel(syntaxStems2Dep())
def syntaxStemsLSen():
return SenModel(syntaxStemsL())
def syntaxStemsRSen():
return SenModel(syntaxStemsR())
def syntaxStemsLRSen():
return SenModel(syntaxStemsLR())
def syntaxStems12_LRSen():
return SenModel(syntaxStems12_LR())
#
# Basic exctractors
def logLen():
return Basic(lambda row: math.log(1.0 + sum(map(lambda sen: len(sen.tokens), row.sentences))))
def logSentencesCount():
return Basic(lambda row: math.log(1.0 + len(row.sentences)))
def upperPortion():
def f(row):
u, l, d, p, o = capCount(row.text)
return (1.0 + u)/(1.0 + u + l + d + p + o)
return Basic(f)
def lowerPortion():
def f(row):
u, l, d, p, o = capCount(row.text)
return (1.0 + l)/(1.0 + u + l + d + p + o)
return Basic(f)
def digitPortion():
def f(row):
u, l, d, p, o = capCount(row.text)
return (1.0 + d)/(1.0 + u + l + d + p + o)
return Basic(f)
def puncPortion():
def f(row):
u, l, d, p, o = capCount(row.text)
return (1.0 + p)/(1.0 + u + l + d + p + o)
return Basic(f)
def otherPortion():
def f(row):
u, l, d, p, o = capCount(row.text)
return (1.0 + o)/(1.0 + u + l + d + p + o)
return Basic(f)
#
# Combined classifiers
def sub5():
f1 = getStems1
f2 = getStemNgrams(2)
f3 = textFeat(getCharNgrams(2))
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
def sub8():
f1 = getStems1
f2 = getStemNgrams(2)
e1 = SetExtractor(combine(f1, f2), probScore)
f3 = textFeat(getCharNgrams(2))
e2 = TFExtractor(f3)
return LogRegModel(CombinedExtractor(e1, e2), C = 6)
def sub8Ridge():
f1 = getStems1
f2 = getStemNgrams(2)
e1 = SetExtractor(combine(f1, f2), probScore)
f3 = textFeat(getCharNgrams(2))
e2 = TFExtractor(f3)
return RegModel(CombinedExtractor(e1, e2), estimator = linear_model.Ridge(alpha = 1))
def sub5_1():
f1 = getStems1
f2 = getStemNgramsSorted(2)
f3 = textFeat(getCharNgrams(2))
return LogRegModel(SetExtractor(combine(f1, f2, f3), probScore))
# specialized
def ngramsLogistic_2():
return ngramsLogistic(2)()
def ngramsLogistic_3():
return ngramsLogistic(3)()
def ngramsLogistic_4():
return ngramsLogistic(4)()
def ngramsTfLogistic_2():
return ngramsLogistic(2)()
def ngramsTfLogistic_3():
return ngramsLogistic(3)()
def ngramsTfLogistic_4():
return ngramsLogistic(4)()
def ngramsRank_2():
return ngramsLogistic(2)()
def ngramsRank_3():
return ngramsLogistic(3)()
def ngramsRank_4():
return ngramsLogistic(4)()
def ngramsTfRank_2():
return ngramsLogistic(2)()
def ngramsTfRank_3():
return ngramsLogistic(3)()
def ngramsTfRank_4():
return ngramsLogistic(4)()
def ngramsLogisticSen_2():
return SenModel(ngramsLogistic(2)())
def ngramsLogisticSen_3():
return SenModel(ngramsLogistic(3)())
def ngramsLogisticSen_4():
return SenModel(ngramsLogistic(4)())
def ngramsTfLogisticSen_2():
return SenModel(ngramsLogistic(2)())
def ngramsTfLogisticSen_3():
return SenModel(ngramsLogistic(3)())
def ngramsTfLogisticSen_4():
return SenModel(ngramsLogistic(4)())
def ngramsRankSen_2():
return SenModel(ngramsLogistic(2)())
def ngramsRankSen_3():
return SenModel(ngramsLogistic(3)())
def ngramsRankSen_4():
return SenModel(ngramsLogistic(4)())
def ngramsTfRankSen_2():
return SenModel(ngramsLogistic(2)())
def ngramsTfRankSen_3():
return SenModel(ngramsLogistic(3)())
def ngramsTfRankSen_4():
return SenModel(ngramsLogistic(4)())
#
# LM
def wordsLm_2():
return wordsLm(2)()
def wordsLm_3():
return wordsLm(3)()
def wordsLm_4():
return wordsLm(4)()
def stemLm_2():
return stemLm(2)()
def stemLm_3():
return stemLm(3)()
def stemLm_4():
return stemLm(4)()
def stemLm_5():
return stemLm(5)()
def stemLm_6():
return stemLm(6)()
def stemLm_7():
return stemLm(7)()
def stemLmSen_2():
return SenModel(stemLm(2)())
def stemLmSen_3():
return SenModel(stemLm(3)())
def stemLmSen_4():
return SenModel(stemLm(4)())
def stemLmSen_5():
return SenModel(stemLm(5)())
def stemLmSen_6():
return SenModel(stemLm(6)())
def stemLmSen_7():
return SenModel(stemLm(7)())
def tagLm_2():
return tagLm(2)()
def tagLm_3():
return tagLm(3)()
def tagLm_4():
return tagLm(4)()
def tagLm_5():
return tagLm(5)()
def tagLm_6():
return tagLm(6)()
def tagLm_7():
return tagLm(7)()
def tagLmSen_2():
return SenModel(tagLm(2)())
def tagLmSen_3():
return SenModel(tagLm(3)())
def tagLmSen_4():
return SenModel(tagLm(4)())
def tagLmSen_5():
return SenModel(tagLm(5)())
def tagLmSen_6():
return SenModel(tagLm(6)())
def tagLmSen_7():
return SenModel(tagLm(7)())
# subseq2
def stemsSubseq2Logistic_5():
return stemsSubseq2Logistic(5)()
def stemsSubseq2Logistic_6():
return stemsSubseq2Logistic(6)()
def stemsSubseq2SortedLogistic_5():
return stemsSubseq2SortedLogistic(5)()
def stemsSubseq2SortedLogistic_6():
return stemsSubseq2SortedLogistic(6)()
def stemsSubseq2Rank_5():
return stemsSubseq2Rank(5)()
def stemsSubseq2SortedRank_5():
return stemsSubseq2SortedRank(5)()
def tagsSubseq2Logistic_5():
return tagsSubseq2Logistic(5)()
def tagsSubseq2Logistic_6():
return tagsSubseq2Logistic(6)()
def tagsSubseq2SortedLogistic_5():
return tagsSubseq2SortedLogistic(5)()
def tagsSubseq2SortedLogistic_6():
return tagsSubseq2SortedLogistic(6)()
# subseq3
def stemsSubseq3Logistic_5():
return stemsSubseq3Logistic(5)()
def stemsSubseq3Logistic_6():
return stemsSubseq3Logistic(6)()
def stemsSubseq3SortedLogistic_5():
return stemsSubseq3SortedLogistic(5)()
def stemsSubseq3SortedLogistic_6():
return stemsSubseq3SortedLogistic(6)()
def tagsSubseq3Logistic_4():
return tagsSubseq3Logistic(4)()
def tagsSubseq3Logistic_5():
return tagsSubseq3Logistic(5)()
def tagsSubseq3Logistic_6():
return tagsSubseq3Logistic(6)()
def tagsSubseq3SortedLogistic_5():
return tagsSubseq3SortedLogistic(5)()
def tagsSubseq3SortedLogistic_6():
return tagsSubseq3SortedLogistic(6)()