tcjordan3 commited on
Commit
8455c76
·
verified ·
1 Parent(s): 7d6db7d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +105 -3
README.md CHANGED
@@ -1,3 +1,105 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - text-classification
6
+ - spoiler-detection
7
+ - bert
8
+ - imdb
9
+ datasets:
10
+ - imdb-review-dataset
11
+ metrics:
12
+ - accuracy
13
+ - f1
14
+ model-index:
15
+ - name: bert-base-spoiler-detection
16
+ results:
17
+ - task:
18
+ type: text-classification
19
+ name: Spoiler Detection
20
+ dataset:
21
+ name: IMDB Review Dataset
22
+ type: imdb-reviews
23
+ metrics:
24
+ - type: accuracy
25
+ value: 0.76
26
+ name: Test Accuracy
27
+ ---
28
+
29
+ # BERT Base Spoiler Detection
30
+
31
+ ## Model Description
32
+
33
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) for detecting spoilers in movie and TV show reviews. It classifies reviews as either containing spoilers or being spoiler-free.
34
+
35
+ **Developed by:** Tyler Jordan
36
+ **Model type:** Text Classification
37
+ **Language:** English
38
+ **License:** MIT
39
+ **Base model:** bert-base-uncased
40
+
41
+ ## Intended Use
42
+
43
+ ### Primary Use Case
44
+ Automatically detect spoilers in user-generated movie and TV show reviews to warn readers before they encounter plot-revealing content.
45
+
46
+ ### Intended Users
47
+ - Movie review platforms
48
+ - Content moderation systems
49
+ - Personal projects for filtering spoilers
50
+
51
+ ### Out-of-Scope Uses
52
+ - Reviews in languages other than English
53
+ - Non-entertainment content (news, academic papers, etc.)
54
+ - Legal or medical content requiring high accuracy
55
+
56
+ ## Training Data
57
+
58
+ **Dataset:** [IMDB Review Dataset](https://www.kaggle.com/datasets/ebiswas/imdb-review-dataset) by Enam Biswas (2021)
59
+
60
+ **Preprocessing:**
61
+ - Sampled 200,000 balanced reviews (100k spoilers, 100k non-spoilers) from 5.5M total reviews
62
+ - Train/Validation/Test split: 140k/30k/30k (70%/15%/15%)
63
+ - Text cleaning: HTML tag removal, whitespace normalization
64
+ - Minimum review length: 30 characters
65
+ - Maximum sequence length: 512 tokens
66
+
67
+ **Class Distribution:**
68
+ - Spoiler: 50%
69
+ - Non-spoiler: 50%
70
+
71
+ ## Training Procedure
72
+
73
+ ### Training Hyperparameters
74
+
75
+ - **Optimizer:** AdamW
76
+ - **Learning rate:** 1e-5
77
+ - **Batch size:** 32
78
+ - **Epochs:** 5
79
+ - **Max sequence length:** 512
80
+ - **Dropout:** 0.3
81
+ - **Weight decay:** 0.01
82
+ - **Warmup steps:** 10% of total steps
83
+ - **Learning rate schedule:** Linear warmup with decay
84
+
85
+ ### Training Hardware
86
+ - GPU: NVIDIA T4 (Google Colab)
87
+ - Training time: ~2-3 hours
88
+
89
+ ### Framework
90
+ - PyTorch 2.5.1
91
+ - Transformers 4.x
92
+ - CUDA 12.1
93
+
94
+ ## Evaluation
95
+
96
+ ### Metrics
97
+
98
+ | Metric | Value |
99
+ |--------|-------|
100
+ | Test Accuracy | 76.0% |
101
+ | Validation Accuracy | 76.3% |
102
+
103
+ ### Evaluation Data
104
+ - 30,000 held-out reviews from the IMDB dataset
105
+ - Balanced split (50% spoilers, 50% non-spoilers)