-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (111 loc) · 6.4 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
<!DOCTYPE HTML>
<html>
<head>
<title>Algorithmic tl;dr</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.scrolly.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<body>
<!-- Header -->
<section id="header">
<div class="inner">
<span class="icon major fa-cloud"></span>
<h1><strong>Algorithmic</strong> tl;dr<br/></h1>
<p>Made at HackRU 2015</p>
<ul class="actions">
<li><a href="#two" class="button scrolly">More</a></li>
</ul>
</div>
</section>
<!-- Two -->
<section id="two" class="main style2">
<div class="container">
<div class="row 150%">
<div class="6u 12u$(medium)">
<ul class="major-icons">
<li><span class="icon style1 major fa-code"></span></li>
<li><span class="icon style2 major fa-bolt"></span></li>
<li><span class="icon style4 major fa-cog"></span></li>
<li><span class="icon style5 major fa-desktop"></span></li>
</ul>
</div>
<div class="6u$ 12u$(medium)">
<header class="major">
<h2>About my hack...</h2>
</header>
<p><strong>Algorithmic tl;dr</strong> is an Auto Summarization Model adapted from a research paper published through the <a href="http://academic.research.microsoft.com/Publication/61454589/an-algorithm-for-summarization-of-paragraph-up-to-one-third-with-the-help-of-cue-words-comparison">International Journal of Advanced Computer Science and Applications</a> in 2014.</p>
<p>I came across this paper through Microsoft's Academic Research portal and thought it would be interesting to see how the algorithm performed since it had yet to be implemented for general use.</p>
<p>The algorithm employs simple Natural Language Processing techniques in order to assign priority to sentences based off common adverbs, nouns, adjectives, and verbs. It additionally attempts to maximize the amount of salient information retained by ignoring stop words and taking note of numbers mentioned. Through a series of computations and comparisons the algorithm ranks the sentences based off these metrics and attempts to return a paragraph of optimal length and clarity.</p>
<p>In my preliminary testing I found that in general the algorithm reduced paragraphs by roughly 60%, and maintained a sentiment score very close to the original text.</p>
</div>
</div>
</div>
</section>
<!-- One -->
<section id="one" class="main style1 special">
<div class="container">
<header class="major">
<h2>Try it out</h2>
</header>
<div class="row 150%">
<div class="6u 12u$(medium)">
<textarea name="input" id="input" rows="10">A new report on child welfare that found more US children living in poverty than before the Great Recession belies the fanfare of the nation's economic turnaround.
Twenty-two percent of American children were living in poverty in 2013 compared with 18 percent in 2008, according to the latest Kids Count Data Book, with poverty rates nearly double among African-Americans and American Indians and problems most severe in South and Southwest.
The report, released Tuesday from the child advocacy group the Annie E Casey Foundation, showed some signs of slight improvement, including high school graduation rates at an all-time high and a falling percentage of uninsured children. But the bright spots weren't enough to offset a picture that many children have been left behind amid the nation's economic recovery.
The problems extend beyond - and in some cases drive - increasing poverty rates. More children were raised in single-parent homes in 2013 than in 2008, and fewer lived with parents with secure employment.
Foundation President Patrick McCarthy said that particularly troubling is an increase in the share of kids living in poor communities, regardless of their own families' economic standing. The report says 1 in 7 children live in those areas, marked by poor schools and a lack of a safe place to play.
"They're more likely to fall down the economic ladder, less likely to be employed and more likely to get in trouble," McCarthy said.</textarea>
</div>
<div class="6u$ 12u$(medium) important(medium)" id="output">
<h3><h3>
</div>
</div>
<br>
<h2 id="old_length" class="align-left"></h2>
<h2 id="new_length" style="color: #54FC42" class="align-left"></h2>
<ul class="actions vertical">
<li><a class="button special fit" onClick="go();">Process</a></li>
</ul>
</div>
</section>
<!-- Footer -->
<section id="footer">
<ul class="icons">
<li><a href="#" class="icon alt fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="#" class="icon alt fa-facebook"><span class="label">Facebook</span></a></li>
<li><a href="#" class="icon alt fa-instagram"><span class="label">Instagram</span></a></li>
<li><a href="#" class="icon alt fa-github"><span class="label">GitHub</span></a></li>
<li><a href="#" class="icon alt fa-envelope"><span class="label">Email</span></a></li>
</ul>
<ul class="copyright">
<li>Designed by: Sean Kallungal</li>
</ul>
</section>
<script type="text/javascript" src="lexer.js"></script>
<script type="text/javascript" src="lexicon.js_"></script>
<script type="text/javascript" src="POSTagger.js"></script>
<script type="text/javascript" src="stop_list.js"></script>
<script type="text/javascript" src="summarize.js"></script>
<script>
function go(){
var arr = autoSummarize(document.getElementById("input").value);
document.getElementById("output").innerHTML = arr[0];
document.getElementById("old_length").innerHTML = "Original Length: " + arr[1] + " sentence(s).";
document.getElementById("new_length").innerHTML = "New Length: " + arr[2] + " sentence(s).";
}
</script>
</body>
</html>