-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
70 lines (45 loc) · 1.76 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Gender Detection</title>
<meta name="description" content="A node.js module to determine a person's gender based on his/her first name.">
<meta name="author" content="Davide Miceli">
<link rel="stylesheet" href="https://getbootstrap.com/docs/4.1/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1 id="genderdetection">Gender Detection</h1>
<h2 id="description">Description</h2>
<p>A node.js module to determine a person's gender based on his/her first name.</p>
<p>It works also for many languages other than english, supporting international names, using an own datasource of 40.000 records that can be extended.
This module is able to clean the text, detecting gender from dirty or unclear names.</p>
<h2 id="installation">Installation</h2>
<pre><code>$ npm install gender-detection
</code></pre>
<h2 id="example">Example</h2>
<pre><code class="javascript language-javascript">// Require gender detection module
const gender = require('gender-detection');
let g;
// Use it to detect the gender:
g = gender.detect('Tim Johnson');
// "male"
g = gender.detect('Holly');
// "female"
g = gender.detect('GhJGhgj')
// "unknown"
// It works also with unclean or dirty names:
g = gender.detect('BiLL$...');
// "male"
g = gender.detect('::Jenni♥fer::');
// "female"
// Extract the first name
const first_name = gender.getFirstName('Mario Bros');
// "mario"
</code></pre>
<h3 id="unittests">Unit tests</h3>
<pre><code class="shell language-shell">npm test
</code></pre>
</div>
</body>
</html>