-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
148 lines (125 loc) · 5.36 KB
/
index.html
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
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>TRUMPASAURUS</title>
<a style="float:right" href="https://github.com/deanturpin/trumpasaurus">View on GitHub</a>
<!-- Includes -->
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="trumpasaurus.js"></script>
<h1>TRUMPASAURUS</h1>
<h4>Analysis of word usage in political speeches</h4>
<select id="title" onchange="getSpeech()">
<option value="">Choose a speech...</option>
<!-- GE2017 manifestos -->
<option value="Conservative">Conservative manifesto 2017</option>
<option value="Labour">Labour manifesto 2017</option>
<option value="DUP">DUP manifesto 2017</option>
<option value="SinnFein">Sinn Féin manifesto 2017</option>
<option value="Green">Green manifesto 2017</option>
<option value="UKIP">UKIP manifesto 2017</option>
<option value="Libdem">Liberal Democrat manifesto 2017</option>
<option value="SNP">SNP manifesto 2017</option>
<!-- UK -->
<option value="may-brexit-2017">Theresa May - Brexit 2017</option>
<option value="may-brexit-2016">Theresa May - Brexit 2016</option>
<option value="jeremy.txt">Jeremy Corbyn - Terrorism and foreign policy</option>
<option value="thatcher.txt">Margaret Thatcher - Europe’s Political Architecture</option>
<option value="thatcher-grand-hotel.txt">Margaret Thatcher - Grand Hotel</option>
<option value="cameron-big-society">David Cameron - Big Society</option>
<option value="ashdown-harrogate">Paddy Ashdown - Harrogate</option>
<option value="miliband-brighton-2013">Ed Miliband - Brighton</option>
<!-- American -->
<option value="trump-atlanta.txt">Donald Trump - Atlanta</option>
<option value="trump-saudi.txt">Donald Trump - Saudi Arabia</option>
<option value="trump-convention.txt">Donald Trump - Convention</option>
<option value="hillary.txt">Hillary Clinton - Convention</option>
<option value="martin.txt">Martin Luther King - I have a dream</option>
<!-- Paxman -->
<option value="paxman-blair1.txt">Jeremy Paxman / Tony Blair (Paxman)</option>
<option value="paxman-blair2.txt">Jeremy Paxman / Tony Blair (Blair)</option>
<option value="paxman-brand1.txt">Jeremy Paxman / Russell Brand (Paxman)</option>
<option value="paxman-brand2.txt">Jeremy Paxman / Russell Brand (Brand)</option>
<!-- Misc -->
<option value="pie.txt" >Jonathan Pie - Manchester</option>
<option value="stephen.txt">Stephen Fry - Bafta</option>
<option value="queen-speech-2016">Queen's speech 2016</option>
<option value="queen-speech-2017">Queen's speech 2017</option>
<option value="trudeau-beat-fear.txt">Justin Trudeau - We beat fear with hope</option>
<option value="poe-raven.txt">Edgar Allan Poe - The Raven</option>
</select>
<p id="results" style="float:right; text-align:right"></p>
<pre id="speech" width="50%">
HOLD THE FRONT PAGE!
Actually I've made a terrible assumption in my calculations and I need to have a
think how to take the length of a speech into account.
--
Generally speaking it seems that the more a speech is refined the more coherent
it becomes and the unique word ratio decreases. However, this doesn't continue
indefinitely and the further you finesse the more tiresome it becomes.
Unique word ratio and average sentence length appear to be a similarly good
measure of rant or not. But there are some exceptions - like the Queen's speech
- so we must still take into account another factor. Initial banding using only
unique word ratio:
25% - repetitive, tiresome
29% - overly finessed, some repetition
32% - finessed
35% - practiced but loose
40% - quick fire, less structure
50% - rant
Exceptions:
At the Grand Hotel Thatcher spoke without an autocue yet the unique word ratio
suggests it was very well rehearsed (32%). May's Brexit speech and the 2017
Conservative manifesto also have similar low counts (29-31%) - perhaps penned by
the same hand - but surprisingly Blair's apparently quick fire response to
Paxman has a very low ratio (27%).
Theresa in Birmingham, the SNP manifesto and the LibDem manifesto boast the
lowest counts measured (22,23,24%).
----
MENTIONS IN THE MANIFESTOS ("|" means or)
Conserv DUP SinnFei Labour Green Libdem SNP UKIP
1 abortion
1 badger
6 blair
8 1 7 25 2 23 41 42 brexit
1 1 cameron
clegg
14 6 12 16 5 climate
28 6 4 66 11 68 28 21 community|communities
41 68 32 1 17 conservative
1 3 1 corbyn
13 2 1 23 15 5 25 crime
8 6 4 2 1 1 cyber
2 2 7 1 4 5 5 debt
3 13 16 1 8 11 24 defence
5 2 9 4 2 19 26 disabled|disability
29 22 4 86 19 92 23 76 education|school
211 19 58 486 71 46 583 516 europe|european|eu|e.u.
1 1 2 14 fgm|mutilation
6 1 11 1 14 11 34 immigrant|immigration
4 1 2 1 4 1 internet
13 148 15 1 17 4 ireland
3 1 16 islam|muslim
1 1 ivory
9 12 6 1 6 2 2 jihad|terror
2 1 342 1 9 1 2 labour
11 1 5 5 1 lgbt
16 1 33 8 39 31 5 nhs
1 5 11 1 5 7 2 nuclear
4 nuttall
16 8 2 39 3 41 8 28 police|justice
2 3 1 2 1 3 racism|racist
1 2 1 saudi
3 9 1 18 296 1 scotland
2 1 3 15 1 8 sex
8 43 sinn
1 6 2 stormont
62 21 15 3 17 26 8 strong|stable
1 3 1 surveillance
1 4 6 2 syria
24 11 2 41 11 48 79 65 tax
8 3 12 3 1 theresa
8 6 5 9 4 tourism|tourist
1 1 1 1 9 1 trident
1 2 2 trump
1 1 7 1 18 12 3 university|universities
53 19 7 71 11 67 37 38 wealth|money|economy
</pre>