-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
160 lines (131 loc) · 5.75 KB
/
index.htm
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Javascript gender bias detector" />
<meta property="og:description" content="JGendered wording (i.e., masculine- and feminine-themed words, such as those associated with gender stereotypes) may be an unacknowledged, institutional-level mechanism of inequality gender maintenance." />
<meta property="og:url" content="https://darenr.github.io/gender-bias" />
<meta property="og:image" content="https://darenr.github.io/gender-bias/gender-bias-screenshot.png" />
<meta property="og:site_name" content="github - daren race - gender bias" />
<meta property="article:tag" content="gender bias" />
<meta property="article:tag" content="daren race" />
<meta property="article:tag" content="machine learning" />
<meta property="article:section" content="Articles" />
<meta property="article:published_time" content="2018-10-02T10:00:36+00:00" />
<meta property="article:modified_time" content="2018-10-20T14:49:37+00:00" />
<meta property="og:updated_time" content="2018-11-02T14:49:37+00:00" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:description" content="Gendered wording (i.e., masculine- and feminine-themed words, such as those associated with gender stereotypes) may be an unacknowledged, institutional-level mechanism of inequality gender maintenance." />
<meta name="twitter:title" content="Javascript gender bias detector" />
<meta name="twitter:image" content="https://darenr.github.io/gender-bias/gender-bias-screenshot.png" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<style>
html {
position: relative;
min-height: 100%;
}
body {
padding-top: 70px;
margin-bottom: 80px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 80px;
text-align: center;
}
textarea {
border-radius: 4px;
width: 100%;
height: 180px;
min-height: 180px;
max-height: 180px;
padding: 10px;
}
</style>
<title>Gender Bias Detector</title>
</head>
<body role="document">
<!-- Fixed navbar -->
<div class="container">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Gender Bias Detector</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf" target="_blank">Evidence That Gendered Wording Exists and
Sustains Gender Inequality</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
<div class="container main">
<p>
Gendered wording (i.e., masculine- and feminine-themed
words, such as those associated with gender stereotypes) may be an unacknowledged,
institutional-level mechanism of inequality gender maintenance. This real-time Detector
will alert you to language that contains an inherent gender bias. The text is not sent
to a server, everything happens in the privacy of your browser.
</p>
<h3>Enter some text below for real-time gender bias analysis:</h3>
<textarea id="txt"></textarea>
<h3>Verdict:</h3>
<pre id="result"></pre>
</div>
<footer class="footer">
<div class="container">
<p class="text-muted">The original list of
gender-coded words from the research paper written by Danielle Gaucher,
Justin Friesen, and Aaron C. Kay: Evidence That Gendered Wording in Job
Advertisements Exists and Sustains Gender Inequality (Journal of Personality
and Social Psychology, July 2011.)</p>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- English Gendered words -->
<script src="wordlist_en.js"></script>
<!-- Algorithm -->
<script src="bias.js"></script>
<script>
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};
$(document).ready(function() {
$('#txt').focus();
$('#txt').bind('input propertychange', function() {
$('#result').html(JSON.stringify(bias($('#txt').val()), undefined, 2));
});
var q = getUrlParameter("q");
if(q) {
$('#txt').val(q).trigger('propertychange');
}
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-91393607-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-91393607-5');
</script>
</body>
</html>