mattdr commited on
Commit
b254a57
·
verified ·
1 Parent(s): a9fce4d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -3
README.md CHANGED
@@ -1,3 +1,79 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ ---
4
+
5
+ Sentence Frame Classifier
6
+ A RoBERTa-based model for detecting media frames at the sentence level. This model can classify sentences into 9 different frame categories and works across both news articles and reader comments.
7
+ Model Description
8
+ This model was trained to identify media frames in text at the sentence level. It's based on the Media Frame Corpus (Card et al., 2015) and extends to online discussion contexts, making it suitable for analyzing both professional journalism and user-generated content.
9
+ Key Features:
10
+
11
+ Sentence-level frame classification
12
+ Cross-domain capability (news articles + comments)
13
+ 9 frame categories based on established political communication theory
14
+ Robust performance across different topics
15
+
16
+ Frame Categories
17
+ The model classifies sentences into these 9 frame categories:
18
+
19
+ Economic - Economic costs, benefits, or implications
20
+ Morality - Moral or ethical considerations
21
+ Fairness and Equality - Issues of fairness, equality, or discrimination
22
+ Legality and Crime - Legal aspects, constitutionality, crime, and punishment
23
+ Political and Policies - Political processes, policy prescriptions, and evaluations
24
+ Security and Defense - Security threats, defense, or public safety
25
+ Health and Safety - Health risks, safety concerns, or medical implications
26
+ Cultural Identity - Cultural values, traditions, or identity issues
27
+ Public Opinion - Public sentiment, polls, or popular support
28
+
29
+ Performance
30
+
31
+ Macro F1: 0.66
32
+ Accuracy: 0.77
33
+ Cross-topic generalization: Robust performance across different topics
34
+ Validation: Human-validated on 600 sentences
35
+
36
+ Usage
37
+ pythonfrom transformers import pipeline
38
+
39
+ # Load the classifier
40
+ classifier = pipeline("text-classification", model="your-username/sentence-frame-classifier")
41
+
42
+ # Classify a sentence
43
+ text = "The new policy will cost taxpayers millions of dollars while providing few benefits."
44
+ result = classifier(text)
45
+ print(result)
46
+ # Output: [{'label': 'Economic', 'score': 0.89}]
47
+
48
+ # Multiple examples
49
+ examples = [
50
+ "This violates our constitutional rights and freedoms.",
51
+ "The public strongly supports this initiative according to recent polls.",
52
+ "We must protect our children from these dangerous substances."
53
+ ]
54
+
55
+ for text in examples:
56
+ result = classifier(text)
57
+ print(f"Text: {text}")
58
+ print(f"Frame: {result[0]['label']} (confidence: {result[0]['score']:.2f})")
59
+ print()
60
+ Training Data
61
+ The model was trained on:
62
+
63
+ Media Frame Corpus (MFC): Professionally annotated news articles
64
+ Online Forum Data: Sentence-level annotations from online discussions
65
+ Total: 63,626 sentences across multiple topics
66
+
67
+ Citation
68
+ If you use this model in your research, please cite:
69
+
70
+
71
+ License
72
+ This model is released under the MIT License. You are free to use, modify, and distribute this model for any purpose, provided you include appropriate attribution.
73
+ Model Details
74
+
75
+ Model Type: Text Classification
76
+ Base Model: RoBERTa-large
77
+ Parameters: ~355M
78
+ Training Framework: Transformers
79
+ Inference Framework: Transformers Pipeline