Gayanukaa commited on
Commit
965a0bd
·
verified ·
1 Parent(s): f65fffb

add spice files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -58,3 +58,26 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ lib/ejml-0.23.jar filter=lfs diff=lfs merge=lfs -text
62
+ lib/fst-2.47.jar filter=lfs diff=lfs merge=lfs -text
63
+ lib/guava-19.0.jar filter=lfs diff=lfs merge=lfs -text
64
+ lib/jackson-core-2.5.3.jar filter=lfs diff=lfs merge=lfs -text
65
+ lib/javassist-3.19.0-GA.jar filter=lfs diff=lfs merge=lfs -text
66
+ lib/joda-time-2.9-sources.jar filter=lfs diff=lfs merge=lfs -text
67
+ lib/joda-time.jar filter=lfs diff=lfs merge=lfs -text
68
+ lib/jollyday-0.4.7-sources.jar filter=lfs diff=lfs merge=lfs -text
69
+ lib/jollyday.jar filter=lfs diff=lfs merge=lfs -text
70
+ lib/junit-4.12.jar filter=lfs diff=lfs merge=lfs -text
71
+ lib/lmdbjni-linux64-0.4.6.jar filter=lfs diff=lfs merge=lfs -text
72
+ lib/lmdbjni-osx64-0.4.6.jar filter=lfs diff=lfs merge=lfs -text
73
+ lib/Meteor-1.5.jar filter=lfs diff=lfs merge=lfs -text
74
+ lib/protobuf.jar filter=lfs diff=lfs merge=lfs -text
75
+ lib/SceneGraphParser-1.0.jar filter=lfs diff=lfs merge=lfs -text
76
+ lib/stanford-corenlp-3.6.0-javadoc.jar filter=lfs diff=lfs merge=lfs -text
77
+ lib/stanford-corenlp-3.6.0-models.jar filter=lfs diff=lfs merge=lfs -text
78
+ lib/stanford-corenlp-3.6.0-sources.jar filter=lfs diff=lfs merge=lfs -text
79
+ lib/stanford-corenlp-3.6.0.jar filter=lfs diff=lfs merge=lfs -text
80
+ lib/StanfordDependenciesManual.pdf filter=lfs diff=lfs merge=lfs -text
81
+ lib/xom-1.2.10-src.jar filter=lfs diff=lfs merge=lfs -text
82
+ lib/xom.jar filter=lfs diff=lfs merge=lfs -text
83
+ spice-1.0.jar filter=lfs diff=lfs merge=lfs -text
Readme.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+
2
+ This zip file contains the pre-built SPICE-1.0.jar and all libraries required to run it, except for Stanford CoreNLP.
3
+
4
+ Run $ ./get_stanford_models.sh or otherwise download the CoreNLP 3.6.0 code and models jar files into /lib.
5
+
6
+ Instructions for using SPICE are found in spice-1.0.jar/README.md
get_stanford_models.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env sh
2
+ # This script downloads the Stanford CoreNLP models.
3
+
4
+ CORENLP=stanford-corenlp-full-2015-12-09
5
+ SPICELIB=lib
6
+
7
+ DIR="$( cd "$(dirname "$0")" ; pwd -P )"
8
+ cd $DIR
9
+
10
+ echo "Downloading..."
11
+
12
+ wget http://nlp.stanford.edu/software/$CORENLP.zip
13
+
14
+ echo "Unzipping..."
15
+
16
+ unzip $CORENLP.zip -d $SPICELIB/
17
+ mv $SPICELIB/$CORENLP/stanford-corenlp-3.6.0.jar $SPICELIB/
18
+ mv $SPICELIB/$CORENLP/stanford-corenlp-3.6.0-models.jar $SPICELIB/
19
+ rm -f stanford-corenlp-full-2015-12-09.zip
20
+ rm -rf $SPICELIB/$CORENLP/
21
+
22
+ echo "Done."
lib/CoreNLP-to-HTML.xsl ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <xsl:stylesheet version="1.0"
4
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
+ xmlns:d="http://nlp.stanford.edu/CoreNLP/v1">
6
+
7
+ <xsl:output method="html"/>
8
+
9
+ <xsl:template match="/">
10
+ <html>
11
+ <body>
12
+ <center><h2>Stanford CoreNLP XML Output</h2></center>
13
+ <hr size="3" color="#333333"/>
14
+ <center><h3>Document</h3></center>
15
+
16
+ <table border="1" style="background-color:#f0f0f0;" align="center">
17
+ <tr><th>Document Info</th></tr>
18
+ <tr><td>
19
+ <xsl:if test="root/document/docId">
20
+ <br/><i>DocId</i>: <xsl:value-of select="root/document/docId"/>
21
+ </xsl:if>
22
+ <xsl:if test="root/document/docDate">
23
+ <br/><i>DocDate</i>: <xsl:value-of select="root/document/docDate"/>
24
+ </xsl:if>
25
+ <xsl:if test="root/document/docSourceType">
26
+ <br/><i>DocSourceType</i>: <xsl:value-of select="root/document/docSourceType"/>
27
+ </xsl:if>
28
+ <xsl:if test="root/document/docType">
29
+ <br/><i>DocType</i>: <xsl:value-of select="root/document/docType"/>
30
+ </xsl:if>
31
+ <xsl:if test="root/document/author">
32
+ <br/><i>Author</i>: <xsl:value-of select="root/document/author"/>
33
+ </xsl:if>
34
+ <xsl:if test="root/document/location">
35
+ <br/><i>Location</i>: <xsl:value-of select="root/document/location"/>
36
+ </xsl:if>
37
+ </td></tr>
38
+
39
+ <xsl:if test="root/document/text">
40
+ <tr><th>Text</th></tr>
41
+ <tr><td>
42
+ <div class="preformatted">
43
+ <xsl:value-of select="root/document/text"/>
44
+ </div>
45
+ </td></tr>
46
+ </xsl:if>
47
+
48
+ <tr><th>Sentences</th></tr>
49
+ <xsl:for-each select="root/document/sentences/sentence">
50
+ <tr><td>
51
+ <xsl:apply-templates select=".">
52
+ <xsl:with-param name="position" select="position()"/>
53
+ </xsl:apply-templates>
54
+ </td></tr>
55
+ </xsl:for-each>
56
+
57
+ <tr><th>Coreference resolution graph</th></tr>
58
+ <tr><td>
59
+ <xsl:apply-templates select="root/document/coreference"/>
60
+ </td></tr>
61
+ </table>
62
+
63
+ </body>
64
+ </html>
65
+ </xsl:template>
66
+
67
+ <xsl:template match="root/document/sentences/sentence">
68
+ <xsl:param name="position" select="'0'"/>
69
+ <p><i><b>Sentence #<xsl:value-of select="$position"/></b></i>
70
+ <xsl:if test="@sentiment">
71
+ <xsl:text> Sentiment: </xsl:text><xsl:value-of select="@sentiment"/>
72
+ </xsl:if>
73
+ </p>
74
+
75
+ <p>
76
+ <i>Tokens</i><br/>
77
+ <xsl:apply-templates select="tokens"/>
78
+ </p>
79
+
80
+ <p>
81
+ <i>Parse tree</i><br/>
82
+ <xsl:value-of select="parse"/>
83
+ </p>
84
+
85
+ <p>
86
+ <i>Uncollapsed dependencies</i>
87
+ <ul>
88
+ <xsl:for-each select="dependencies[@type='basic-dependencies']">
89
+ <xsl:apply-templates select="dep"/>
90
+ </xsl:for-each>
91
+ </ul>
92
+ </p>
93
+
94
+ <p>
95
+ <i>Enhanced dependencies</i>
96
+ <ul>
97
+ <xsl:for-each select="dependencies[@type='collapsed-ccprocessed-dependencies']">
98
+ <xsl:apply-templates select="dep"/>
99
+ </xsl:for-each>
100
+ </ul>
101
+ </p>
102
+ </xsl:template>
103
+
104
+ <xsl:template match="tokens">
105
+ <table border="1">
106
+ <tr>
107
+ <th>Id</th>
108
+ <th>Word</th>
109
+ <th>Lemma</th>
110
+ <th>Char begin</th>
111
+ <th>Char end</th>
112
+ <th>POS</th>
113
+ <th>NER</th>
114
+ <th>Normalized NER</th>
115
+ <th>Speaker</th>
116
+ <th>Sentiment</th>
117
+ </tr>
118
+ <xsl:for-each select="token">
119
+ <tr>
120
+ <td><xsl:value-of select="@id"/></td>
121
+ <td><xsl:value-of select="word"/></td>
122
+ <td><xsl:value-of select="lemma"/></td>
123
+ <td><xsl:value-of select="CharacterOffsetBegin"/></td>
124
+ <td><xsl:value-of select="CharacterOffsetEnd"/></td>
125
+ <td><xsl:value-of select="POS"/></td>
126
+ <td><xsl:value-of select="NER"/></td>
127
+ <td><xsl:value-of select="NormalizedNER"/></td>
128
+ <td><xsl:value-of select="Speaker"/></td>
129
+ <td><xsl:value-of select="sentiment"/></td>
130
+ </tr>
131
+ </xsl:for-each>
132
+ </table>
133
+ </xsl:template>
134
+
135
+ <xsl:template match="dependencies">
136
+ <ul>
137
+ <xsl:for-each select="dep">
138
+ <xsl:apply-templates select="."/>
139
+ </xsl:for-each>
140
+ </ul>
141
+ </xsl:template>
142
+
143
+ <xsl:template match="dep">
144
+ <li>
145
+ <xsl:value-of select="@type"/>
146
+ (
147
+ <xsl:value-of select="governor"/><xsl:if test="governor/@copy">^<xsl:value-of select="governor/@copy"/></xsl:if>-<xsl:value-of select="governor/@idx"/>
148
+ ,
149
+ <xsl:value-of select="dependent"/><xsl:if test="dependent/@copy">^<xsl:value-of select="dependent/@copy"/></xsl:if>-<xsl:value-of select="dependent/@idx"/>
150
+ )
151
+ <xsl:if test="@extra">(extra)</xsl:if>
152
+ </li>
153
+ </xsl:template>
154
+
155
+ <xsl:template match="coreference">
156
+ <ol>
157
+ <xsl:for-each select="coreference">
158
+ <li>
159
+ <table border="1">
160
+ <tr>
161
+ <th>Sentence</th>
162
+ <th>Head</th>
163
+ <th>Text</th>
164
+ <th>Context</th>
165
+ </tr>
166
+ <xsl:for-each select="mention">
167
+ <tr>
168
+ <td><xsl:value-of select="sentence"/></td>
169
+ <td><xsl:value-of select="head"/> <xsl:if test="@representative"> (gov) </xsl:if></td>
170
+ <td><xsl:value-of select="text"/></td>
171
+ <td><xsl:if test="leftContext or rightContext">
172
+ ...<xsl:value-of select="leftContext"/>
173
+ <span style="background-color: #99ff99;">
174
+ <xsl:text> </xsl:text>
175
+ <xsl:value-of select="text"/></span>
176
+ <xsl:text> </xsl:text>
177
+ <xsl:value-of select="rightContext"/>...
178
+ </xsl:if>
179
+ </td>
180
+ </tr>
181
+ </xsl:for-each>
182
+ </table>
183
+ </li>
184
+ </xsl:for-each>
185
+ </ol>
186
+ </xsl:template>
187
+
188
+ </xsl:stylesheet>
lib/LIBRARY-LICENSES ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ These are the 3rd party libraries which we currently distribute with Stanford CoreNLP.
2
+ All of them have licenses that are compatible with GPL v3.
3
+ All but the JSON library allow commercial use.
4
+ A compatible JSON library is a component of Java EE (JSR 374).
5
+
6
+ -----------------------------------------------------------------
7
+
8
+ ejml-0.23.jar
9
+
10
+ URL: http://ejml.org/
11
+
12
+ License: Gnu Lesser General Public License v.3 (through v 0.23; version 0.24 forward uses Apache 2.0)
13
+
14
+ -----------------------------------------------------------------
15
+
16
+ javax.json.jar
17
+
18
+ URL: http://central.maven.org/maven2/javax/json/javax.json-api/1.0/javax.json-api-1.0.pom
19
+ https://json-processing-spec.java.net/
20
+
21
+ License: GNU GPLv2 with Classpath Exception (or CDDL)
22
+
23
+ -----------------------------------------------------------------
24
+
25
+ joda-time-2.1.jar
26
+
27
+ URL: http://www.joda.org/joda-time/
28
+
29
+ License: Apache License 2.0
30
+ http://www.joda.org/joda-time/license.html
31
+
32
+ -----------------------------------------
33
+
34
+ jollyday-0.4.7.jar
35
+
36
+ URL: http://jollyday.sourceforge.net/
37
+
38
+ License: Apache License 2.0
39
+ http://jollyday.sourceforge.net/license.html
40
+
41
+ -----------------------------------------
42
+
43
+ protobuf.jar
44
+
45
+ URL: https://github.com/google/protobuf/
46
+ https://developers.google.com/protocol-buffers/
47
+
48
+ License: BSD 3-clause license
49
+ https://github.com/google/protobuf/blob/master/LICENSE
50
+ http://opensource.org/licenses/BSD-3-Clause
51
+
52
+ -----------------------------------------
53
+
54
+ xom-1.2.10.jar
55
+
56
+ Url: http://www.xom.nu/
57
+ OR http://www.cafeconleche.org/XOM/
58
+
59
+ License: LGPL v2.1 Gnu lesser general public license
60
+ http://www.xom.nu/license.xhtml
61
+
62
+ -----------------------------------------
63
+
lib/LICENSE.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
lib/Makefile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a rudimentary Makefile for rebuilding Stanford CoreNLP.
2
+ # We actually use ant (q.v.) or a Java IDE.
3
+
4
+ JAVAC = javac
5
+ JAVAFLAGS = -O -d classes -encoding utf-8
6
+
7
+ # Builds the classes' jar file
8
+ corenlp: source
9
+ mkdir -p classes
10
+ $(JAVAC) $(JAVAFLAGS) src/edu/stanford/nlp/*/*.java \
11
+ src/edu/stanford/nlp/*/*/*.java \
12
+ src/edu/stanford/nlp/*/*/*/*.java \
13
+ src/edu/stanford/nlp/*/*/*/*/*.java \
14
+ src/edu/stanford/nlp/*/*/*/*/*/*.java
15
+ cd classes ; jar -cfm ../stanford-corenlp-`date +%Y-%m-%d`.jar ../src/META-INF/MANIFEST.MF edu ; cd ..
16
+
17
+ # Before making, unjar the source jar file in the 'src' directory
18
+ source:
19
+ if [ ! -e src ] ; then \
20
+ mkdir src ; cd src ; jar -xf ../stanford-corenlp-*-sources.jar; \
21
+ fi;
22
+
23
+ clean:
24
+ rm -rf classes
25
+ rm -rf src
lib/Meteor-1.5.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:014a3627d277a6f4ba5b44a20733f8dff28bbb428204c36abfda56565658ba09
3
+ size 6318623
lib/README.txt ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Stanford CoreNLP - Stanford's Suite of NLP Tools
2
+ ------------------------------------------------
3
+
4
+ Copyright © 2009-2015 The Board of Trustees of
5
+ The Leland Stanford Junior University. All Rights Reserved.
6
+
7
+ DOCUMENTATION
8
+
9
+ Please look at the URL below for documentation for Stanford CoreNLP:
10
+
11
+ http://nlp.stanford.edu/software/corenlp.shtml
12
+
13
+ LICENSE
14
+
15
+ //
16
+ // StanfordCoreNLP -- a suite of NLP tools
17
+ // Copyright © 2009-2015 The Board of Trustees of
18
+ // The Leland Stanford Junior University. All Rights Reserved.
19
+ //
20
+ // This program is free software; you can redistribute it and/or
21
+ // modify it under the terms of the GNU General Public License
22
+ // as published by the Free Software Foundation; either version 2
23
+ // of the License, or (at your option) any later version.
24
+ //
25
+ // This program is distributed in the hope that it will be useful,
26
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ // GNU General Public License for more details.
29
+ //
30
+ // You should have received a copy of the GNU General Public License
31
+ // along with this program; if not, write to the Free Software Foundation,
32
+ // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33
+ //
34
+ // For more information, bug reports, fixes, contact:
35
+ // Christopher Manning
36
+ // Dept of Computer Science, Gates 1A
37
+ // Stanford CA 94305-9010
38
+ // USA
39
+ //
40
+
41
+ ---------------------------------
42
+ CHANGES
43
+ ---------------------------------
44
+
45
+ 2015-12-09 3.6.0 Improved coreference, OpenIE integration,
46
+ Stanford CoreNLP server
47
+
48
+ 2015-04-20 3.5.2 Switch to Universal dependencies, add Chinese
49
+ coreference system to CoreNLP
50
+
51
+ 2015-01-29 3.5.1 NER, dependency parser, SPIED improvements;
52
+ general bugfixes
53
+
54
+ 2014-10-26 3.5.0 Upgrade to Java 1.8; add annotators for
55
+ dependency parsing and relation extraction
56
+
57
+ 2014-08-27 3.4.1 Add Spanish models
58
+
59
+ 2014-06-16 3.4 Add shift reduce parser
60
+
61
+ 2014-01-04 3.3.1 Bugfix release
62
+
63
+ 2013-11-12 3.3.0 Add sentiment model, minor sutime improvements
64
+
65
+ 2013-06-19 3.2.0 New RNN parser model, more efficient tagger
66
+
67
+ 2013-04-04 1.3.5 Speed improvements, coref improvements,
68
+ Chinese version, -nthreads option
69
+
70
+ 2012-11-12 1.3.4 Improved ner model and dependency code,
71
+ now possible to change annotator pool for
72
+ later StanfordCoreNLP objects
73
+
74
+ 2012-07-09 1.3.3 Minor bug fixes
75
+
76
+ 2012-05-22 1.3.2 Improvements to sutime
77
+
78
+ 2012-03-09 1.3.1 Now supports caseless models (available as DLC)
79
+
80
+ 2011-12-16 1.3.0 Threadsafe!
81
+ Bugs in time annotation fixed
82
+
83
+ 2011-09-14 1.2.0 Time expression recognizer added to ner annotator
84
+ Output bugfixes
85
+ Parser can now substitute for tagger
86
+
87
+ 2011-06-19 1.1.0 Improved coref release
88
+
89
+ 2011-05-15 1.0.4 More efficient dcoref data structure
90
+ Supports already-tokenized input text
91
+
92
+ 2011-04-17 1.0.3 Compatible with other releases
93
+ Support loading arbitrary annotators
94
+ Tagger bug fixes, such as "EOS" token
95
+
96
+ 2010-11-11 1.0.2 Remove wn.jar
97
+
98
+ 2010-11-11 1.0.1 Add xml removal
99
+
100
+ 2010-10-07 1.0 Initial release
101
+
lib/SceneGraphParser-1.0.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83a1b7c3f896dd135f9539ba41d65b155827dfc312893bfd5bb835c9f9ae310a
3
+ size 164039
lib/SemgrexDemo.java ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import edu.stanford.nlp.parser.lexparser.TreebankLangParserParams;
3
+ import edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams;
4
+ import edu.stanford.nlp.semgraph.SemanticGraph;
5
+ import edu.stanford.nlp.semgraph.SemanticGraphFactory;
6
+ import edu.stanford.nlp.semgraph.semgrex.SemgrexMatcher;
7
+ import edu.stanford.nlp.semgraph.semgrex.SemgrexPattern;
8
+ import edu.stanford.nlp.trees.GrammaticalStructure;
9
+ import edu.stanford.nlp.trees.GrammaticalStructureFactory;
10
+ import edu.stanford.nlp.trees.Tree;
11
+
12
+ /**
13
+ * A small demo that shows how to convert a tree to a SemanticGraph
14
+ * and then run a SemgrexPattern on it
15
+ *
16
+ * @author John Bauer
17
+ */
18
+ public class SemgrexDemo {
19
+ public static void main(String[] args) {
20
+ String treeString = "(ROOT (S (NP (PRP$ My) (NN dog)) (ADVP (RB also)) (VP (VBZ likes) (S (VP (VBG eating) (NP (NN sausage))))) (. .)))";
21
+ // Typically the tree is constructed by parsing or reading a
22
+ // treebank. This is just for example purposes
23
+ Tree tree = Tree.valueOf(treeString);
24
+
25
+ // This creates English uncollapsed dependencies as a
26
+ // SemanticGraph. If you are creating many SemanticGraphs, you
27
+ // should use a GrammaticalStructureFactory and use it to generate
28
+ // the intermediate GrammaticalStructure instead
29
+ SemanticGraph graph = SemanticGraphFactory.generateUncollapsedDependencies(tree);
30
+
31
+ // Alternatively, this could have been the Chinese params or any
32
+ // other language supported. As of 2014, only English and Chinese
33
+ TreebankLangParserParams params = new EnglishTreebankParserParams();
34
+ GrammaticalStructureFactory gsf = params.treebankLanguagePack().grammaticalStructureFactory(params.treebankLanguagePack().punctuationWordRejectFilter(), params.typedDependencyHeadFinder());
35
+
36
+ GrammaticalStructure gs = gsf.newGrammaticalStructure(tree);
37
+
38
+ System.err.println(graph);
39
+
40
+ SemgrexPattern semgrex = SemgrexPattern.compile("{}=A <<nsubj {}=B");
41
+ SemgrexMatcher matcher = semgrex.matcher(graph);
42
+ // This will produce two results on the given tree: "likes" is an
43
+ // ancestor of both "dog" and "my" via the nsubj relation
44
+ while (matcher.find()) {
45
+ System.err.println(matcher.getNode("A") + " <<nsubj " + matcher.getNode("B"));
46
+ }
47
+ }
48
+ }
lib/ShiftReduceDemo.java ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import java.io.StringReader;
3
+ import java.util.List;
4
+
5
+ import edu.stanford.nlp.ling.HasWord;
6
+ import edu.stanford.nlp.ling.TaggedWord;
7
+ import edu.stanford.nlp.parser.shiftreduce.ShiftReduceParser;
8
+ import edu.stanford.nlp.process.DocumentPreprocessor;
9
+ import edu.stanford.nlp.tagger.maxent.MaxentTagger;
10
+ import edu.stanford.nlp.trees.Tree;
11
+
12
+ /**
13
+ * Demonstrates how to first use the tagger, then use the
14
+ * ShiftReduceParser. Note that ShiftReduceParser will not work
15
+ * on untagged text.
16
+ *
17
+ * @author John Bauer
18
+ */
19
+ public class ShiftReduceDemo {
20
+ public static void main(String[] args) {
21
+ String modelPath = "edu/stanford/nlp/models/srparser/englishSR.ser.gz";
22
+ String taggerPath = "edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger";
23
+
24
+ for (int argIndex = 0; argIndex < args.length; ) {
25
+ switch (args[argIndex]) {
26
+ case "-tagger":
27
+ taggerPath = args[argIndex + 1];
28
+ argIndex += 2;
29
+ break;
30
+ case "-model":
31
+ modelPath = args[argIndex + 1];
32
+ argIndex += 2;
33
+ break;
34
+ default:
35
+ throw new RuntimeException("Unknown argument " + args[argIndex]);
36
+ }
37
+ }
38
+
39
+ String text = "My dog likes to shake his stuffed chickadee toy.";
40
+
41
+ MaxentTagger tagger = new MaxentTagger(taggerPath);
42
+ ShiftReduceParser model = ShiftReduceParser.loadModel(modelPath);
43
+
44
+ DocumentPreprocessor tokenizer = new DocumentPreprocessor(new StringReader(text));
45
+ for (List<HasWord> sentence : tokenizer) {
46
+ List<TaggedWord> tagged = tagger.tagSentence(sentence);
47
+ Tree tree = model.apply(tagged);
48
+ System.err.println(tree);
49
+ }
50
+ }
51
+ }
lib/StanfordCoreNlpDemo.java ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ package edu.stanford.nlp.pipeline.demo;
2
+
3
+ import java.io.*;
4
+ import java.util.*;
5
+
6
+ import edu.stanford.nlp.hcoref.data.CorefChain;
7
+ import edu.stanford.nlp.hcoref.CorefCoreAnnotations;
8
+ import edu.stanford.nlp.io.*;
9
+ import edu.stanford.nlp.ling.*;
10
+ import edu.stanford.nlp.pipeline.*;
11
+ import edu.stanford.nlp.semgraph.SemanticGraph;
12
+ import edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations;
13
+ import edu.stanford.nlp.sentiment.SentimentCoreAnnotations;
14
+ import edu.stanford.nlp.trees.*;
15
+ import edu.stanford.nlp.util.*;
16
+
17
+ /** This class demonstrates building and using a Stanford CoreNLP pipeline. */
18
+ public class StanfordCoreNlpDemo {
19
+
20
+ /** Usage: java -cp "*" StanfordCoreNlpDemo [inputFile [outputTextFile [outputXmlFile]]] */
21
+ public static void main(String[] args) throws IOException {
22
+ // set up optional output files
23
+ PrintWriter out;
24
+ if (args.length > 1) {
25
+ out = new PrintWriter(args[1]);
26
+ } else {
27
+ out = new PrintWriter(System.out);
28
+ }
29
+ PrintWriter xmlOut = null;
30
+ if (args.length > 2) {
31
+ xmlOut = new PrintWriter(args[2]);
32
+ }
33
+
34
+ // Create a CoreNLP pipeline. To build the default pipeline, you can just use:
35
+ // StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
36
+ // Here's a more complex setup example:
37
+ // Properties props = new Properties();
38
+ // props.put("annotators", "tokenize, ssplit, pos, lemma, ner, depparse");
39
+ // props.put("ner.model", "edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz");
40
+ // props.put("ner.applyNumericClassifiers", "false");
41
+ // StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
42
+
43
+ // Add in sentiment
44
+ Properties props = new Properties();
45
+ props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref, sentiment");
46
+
47
+ StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
48
+
49
+ // Initialize an Annotation with some text to be annotated. The text is the argument to the constructor.
50
+ Annotation annotation;
51
+ if (args.length > 0) {
52
+ annotation = new Annotation(IOUtils.slurpFileNoExceptions(args[0]));
53
+ } else {
54
+ annotation = new Annotation("Kosgi Santosh sent an email to Stanford University. He didn't get a reply.");
55
+ }
56
+
57
+ // run all the selected Annotators on this text
58
+ pipeline.annotate(annotation);
59
+
60
+ // this prints out the results of sentence analysis to file(s) in good formats
61
+ pipeline.prettyPrint(annotation, out);
62
+ if (xmlOut != null) {
63
+ pipeline.xmlPrint(annotation, xmlOut);
64
+ }
65
+
66
+ // Access the Annotation in code
67
+ // The toString() method on an Annotation just prints the text of the Annotation
68
+ // But you can see what is in it with other methods like toShorterString()
69
+ out.println();
70
+ out.println("The top level annotation");
71
+ out.println(annotation.toShorterString());
72
+ out.println();
73
+
74
+ // An Annotation is a Map with Class keys for the linguistic analysis types.
75
+ // You can get and use the various analyses individually.
76
+ // For instance, this gets the parse tree of the first sentence in the text.
77
+ List<CoreMap> sentences = annotation.get(CoreAnnotations.SentencesAnnotation.class);
78
+ if (sentences != null && ! sentences.isEmpty()) {
79
+ CoreMap sentence = sentences.get(0);
80
+ out.println("The keys of the first sentence's CoreMap are:");
81
+ out.println(sentence.keySet());
82
+ out.println();
83
+ out.println("The first sentence is:");
84
+ out.println(sentence.toShorterString());
85
+ out.println();
86
+ out.println("The first sentence tokens are:");
87
+ for (CoreMap token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {
88
+ out.println(token.toShorterString());
89
+ }
90
+ Tree tree = sentence.get(TreeCoreAnnotations.TreeAnnotation.class);
91
+ out.println();
92
+ out.println("The first sentence parse tree is:");
93
+ tree.pennPrint(out);
94
+ out.println();
95
+ out.println("The first sentence basic dependencies are:");
96
+ out.println(sentence.get(SemanticGraphCoreAnnotations.BasicDependenciesAnnotation.class).toString(SemanticGraph.OutputFormat.LIST));
97
+ out.println("The first sentence collapsed, CC-processed dependencies are:");
98
+ SemanticGraph graph = sentence.get(SemanticGraphCoreAnnotations.CollapsedCCProcessedDependenciesAnnotation.class);
99
+ out.println(graph.toString(SemanticGraph.OutputFormat.LIST));
100
+
101
+ // Access coreference. In the coreference link graph,
102
+ // each chain stores a set of mentions that co-refer with each other,
103
+ // along with a method for getting the most representative mention.
104
+ // Both sentence and token offsets start at 1!
105
+ out.println("Coreference information");
106
+ Map<Integer, CorefChain> corefChains =
107
+ annotation.get(CorefCoreAnnotations.CorefChainAnnotation.class);
108
+ if (corefChains == null) { return; }
109
+ for (Map.Entry<Integer,CorefChain> entry: corefChains.entrySet()) {
110
+ out.println("Chain " + entry.getKey() + " ");
111
+ for (CorefChain.CorefMention m : entry.getValue().getMentionsInTextualOrder()) {
112
+ // We need to subtract one since the indices count from 1 but the Lists start from 0
113
+ List<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(CoreAnnotations.TokensAnnotation.class);
114
+ // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.
115
+ out.println(" " + m + ", i.e., 0-based character offsets [" + tokens.get(m.startIndex - 1).beginPosition() +
116
+ ", " + tokens.get(m.endIndex - 2).endPosition() + ")");
117
+ }
118
+ }
119
+ out.println();
120
+
121
+ out.println("The first sentence overall sentiment rating is " + sentence.get(SentimentCoreAnnotations.SentimentClass.class));
122
+ }
123
+ IOUtils.closeIgnoringExceptions(out);
124
+ IOUtils.closeIgnoringExceptions(xmlOut);
125
+ }
126
+
127
+ }
lib/StanfordDependenciesManual.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8164af31448961ba4b5a56820c1734428db0d50d823f1a50134eb58d6b8b0a44
3
+ size 199304
lib/build.xml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- build.xml file for ant for Stanford CoreNLP -->
2
+
3
+ <!-- Before using this, unjar the sources' jar file into the src/ directory! -->
4
+
5
+ <!-- A "project" describes a set of targets that may be requested
6
+ when Ant is executed. The "default" attribute defines the
7
+ target which is executed if no specific target is requested,
8
+ and the "basedir" attribute defines the current working directory
9
+ from which Ant executes the requested task. This is normally
10
+ set to the current working directory.
11
+ -->
12
+
13
+ <project name="StanfordCoreNLP" default="compile" basedir=".">
14
+
15
+ <property name="build.home" value="${basedir}/classes"/>
16
+ <property name="build.tests" value="${basedir}/classes"/>
17
+ <property name="src.home" value="${basedir}/src"/>
18
+
19
+
20
+ <!-- ==================== Compilation Control Options ==================== -->
21
+
22
+ <!--
23
+
24
+ These properties control option settings on the Javac compiler when it
25
+ is invoked using the <javac> task.
26
+
27
+ compile.debug Should compilation include the debug option?
28
+
29
+ compile.deprecation Should compilation include the deprecation option?
30
+
31
+ compile.optimize Should compilation include the optimize option?
32
+
33
+ compile.source Source version compatibility
34
+
35
+ compile.target Target class version compatibility
36
+
37
+ -->
38
+
39
+ <property name="compile.debug" value="true"/>
40
+ <property name="compile.deprecation" value="false"/>
41
+ <property name="compile.encoding" value="utf-8" />
42
+ <property name="compile.optimize" value="true"/>
43
+ <property name="compile.source" value="1.8" />
44
+ <property name="compile.target" value="1.8" />
45
+
46
+
47
+
48
+
49
+ <!-- ==================== All Target ====================================== -->
50
+
51
+ <!--
52
+
53
+ The "all" target is a shortcut for running the "clean" target followed
54
+ by the "compile" target, to force a complete recompile.
55
+
56
+ -->
57
+
58
+ <target name="all" depends="clean,compile"
59
+ description="Clean build and dist directories, then compile"/>
60
+
61
+
62
+
63
+ <!-- ==================== Clean Target ==================================== -->
64
+
65
+ <!--
66
+
67
+ The "clean" target deletes any previous "build" and "dist" directory,
68
+ so that you can be ensured the application can be built from scratch.
69
+
70
+ -->
71
+
72
+ <target name="clean" description="Delete old classes">
73
+ <delete dir="${build.home}/edu"/>
74
+ </target>
75
+
76
+
77
+
78
+ <!-- ==================== Compile Target ================================== -->
79
+
80
+ <!--
81
+
82
+ The "compile" target transforms source files (from your "src" directory)
83
+ into object files in the appropriate location in the build directory.
84
+ This example assumes that you will be including your classes in an
85
+ unpacked directory hierarchy under "/WEB-INF/classes".
86
+
87
+ -->
88
+
89
+ <target name="compile" depends="prepare"
90
+ description="Compile Java sources">
91
+
92
+ <!-- Compile Java classes as necessary -->
93
+ <mkdir dir="${build.home}"/>
94
+ <javac srcdir="${src.home}"
95
+ destdir="${build.home}"
96
+ debug="${compile.debug}"
97
+ deprecation="${compile.deprecation}"
98
+ encoding="${compile.encoding}"
99
+ optimize="${compile.optimize}"
100
+ source="${compile.source}"
101
+ target="${compile.target}">
102
+ <compilerarg value="-Xmaxerrs"/>
103
+ <compilerarg value="20"/>
104
+ <classpath>
105
+ <fileset dir="${basedir}">
106
+ <include name="*.jar"/>
107
+ <exclude name="stanford-corenlp*"/>
108
+ </fileset>
109
+ </classpath>
110
+ <!-- <compilerarg value="-Xlint"/> -->
111
+ </javac>
112
+ </target>
113
+
114
+
115
+ <!-- ==================== Prepare Target ================================== -->
116
+
117
+ <!--
118
+
119
+ The "prepare" target is used to create the "build" destination directory,
120
+ and copy the static contents of your web application to it. If you need
121
+ to copy static files from external dependencies, you can customize the
122
+ contents of this task.
123
+
124
+ Normally, this task is executed indirectly when needed.
125
+
126
+ -->
127
+
128
+ <target name="prepare">
129
+
130
+ <!-- Create build directories as needed -->
131
+ <mkdir dir="${build.home}"/>
132
+
133
+ </target>
134
+
135
+ </project>
lib/corenlp.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Runs Stanford CoreNLP.
4
+ # Simple uses for xml and plain text output to files are:
5
+ # ./corenlp.sh -file filename
6
+ # ./corenlp.sh -file filename -outputFormat text
7
+ # Split into sentences, run POS tagger and NER, write CoNLL-style TSV file:
8
+ # ./corenlp.sh -annotators tokenize,ssplit,pos,lemma,ner -outputFormat conll -file input.txt
9
+ # You can also start a simple shell where you can enter sentences to be processed:
10
+ # ./corenlp.sh
11
+
12
+ OS=`uname`
13
+ # Some machines (older OS X, BSD, Windows environments) don't support readlink -e
14
+ if hash readlink 2>/dev/null; then
15
+ scriptdir=`dirname $0`
16
+ else
17
+ scriptpath=$(readlink -e "$0") || scriptpath=$0
18
+ scriptdir=$(dirname "$scriptpath")
19
+ fi
20
+
21
+ echo java -mx5g -cp \"$scriptdir/*\" edu.stanford.nlp.pipeline.StanfordCoreNLP $*
22
+ java -mx5g -cp "$scriptdir/*" edu.stanford.nlp.pipeline.StanfordCoreNLP $*
lib/ejml-0.23-src.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca341328160602c473c76089917c552d46b1f14c045cfe60a9f1e585d50967e3
3
+ size 1227451
lib/ejml-0.23.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0250933fe8cc6a44eb098016d4dadaba7746a27efc3d5a7f4f4c9bf247cfe09
3
+ size 211938
lib/fst-2.47.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c871febc859cf72dbed1c6c1eebc5600c3d93c3e986feccf4623cc5086098cc
3
+ size 380882
lib/guava-19.0.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58d4cc2e05ebb012bbac568b032f75623be1cb6fb096f3c60c72a86f7f057de4
3
+ size 2308517
lib/hamcrest-core-1.3.jar ADDED
Binary file (45 kB). View file
 
lib/input.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Stanford University is located in California. It is a great university, founded in 1891.
lib/input.txt.out ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
3
+ <root>
4
+ <document>
5
+ <sentences>
6
+ <sentence id="1">
7
+ <tokens>
8
+ <token id="1">
9
+ <word>Stanford</word>
10
+ <lemma>Stanford</lemma>
11
+ <CharacterOffsetBegin>0</CharacterOffsetBegin>
12
+ <CharacterOffsetEnd>8</CharacterOffsetEnd>
13
+ <POS>NNP</POS>
14
+ <NER>ORGANIZATION</NER>
15
+ <Speaker>PER0</Speaker>
16
+ </token>
17
+ <token id="2">
18
+ <word>University</word>
19
+ <lemma>University</lemma>
20
+ <CharacterOffsetBegin>9</CharacterOffsetBegin>
21
+ <CharacterOffsetEnd>19</CharacterOffsetEnd>
22
+ <POS>NNP</POS>
23
+ <NER>ORGANIZATION</NER>
24
+ <Speaker>PER0</Speaker>
25
+ </token>
26
+ <token id="3">
27
+ <word>is</word>
28
+ <lemma>be</lemma>
29
+ <CharacterOffsetBegin>20</CharacterOffsetBegin>
30
+ <CharacterOffsetEnd>22</CharacterOffsetEnd>
31
+ <POS>VBZ</POS>
32
+ <NER>O</NER>
33
+ <Speaker>PER0</Speaker>
34
+ </token>
35
+ <token id="4">
36
+ <word>located</word>
37
+ <lemma>located</lemma>
38
+ <CharacterOffsetBegin>23</CharacterOffsetBegin>
39
+ <CharacterOffsetEnd>30</CharacterOffsetEnd>
40
+ <POS>JJ</POS>
41
+ <NER>O</NER>
42
+ <Speaker>PER0</Speaker>
43
+ </token>
44
+ <token id="5">
45
+ <word>in</word>
46
+ <lemma>in</lemma>
47
+ <CharacterOffsetBegin>31</CharacterOffsetBegin>
48
+ <CharacterOffsetEnd>33</CharacterOffsetEnd>
49
+ <POS>IN</POS>
50
+ <NER>O</NER>
51
+ <Speaker>PER0</Speaker>
52
+ </token>
53
+ <token id="6">
54
+ <word>California</word>
55
+ <lemma>California</lemma>
56
+ <CharacterOffsetBegin>34</CharacterOffsetBegin>
57
+ <CharacterOffsetEnd>44</CharacterOffsetEnd>
58
+ <POS>NNP</POS>
59
+ <NER>LOCATION</NER>
60
+ <Speaker>PER0</Speaker>
61
+ </token>
62
+ <token id="7">
63
+ <word>.</word>
64
+ <lemma>.</lemma>
65
+ <CharacterOffsetBegin>44</CharacterOffsetBegin>
66
+ <CharacterOffsetEnd>45</CharacterOffsetEnd>
67
+ <POS>.</POS>
68
+ <NER>O</NER>
69
+ <Speaker>PER0</Speaker>
70
+ </token>
71
+ </tokens>
72
+ <parse>(ROOT (S (NP (NNP Stanford) (NNP University)) (VP (VBZ is) (ADJP (JJ located) (PP (IN in) (NP (NNP California))))) (. .))) </parse>
73
+ <dependencies type="basic-dependencies">
74
+ <dep type="root">
75
+ <governor idx="0">ROOT</governor>
76
+ <dependent idx="4">located</dependent>
77
+ </dep>
78
+ <dep type="compound">
79
+ <governor idx="2">University</governor>
80
+ <dependent idx="1">Stanford</dependent>
81
+ </dep>
82
+ <dep type="nsubj">
83
+ <governor idx="4">located</governor>
84
+ <dependent idx="2">University</dependent>
85
+ </dep>
86
+ <dep type="cop">
87
+ <governor idx="4">located</governor>
88
+ <dependent idx="3">is</dependent>
89
+ </dep>
90
+ <dep type="case">
91
+ <governor idx="6">California</governor>
92
+ <dependent idx="5">in</dependent>
93
+ </dep>
94
+ <dep type="nmod">
95
+ <governor idx="4">located</governor>
96
+ <dependent idx="6">California</dependent>
97
+ </dep>
98
+ <dep type="punct">
99
+ <governor idx="4">located</governor>
100
+ <dependent idx="7">.</dependent>
101
+ </dep>
102
+ </dependencies>
103
+ <dependencies type="collapsed-dependencies">
104
+ <dep type="root">
105
+ <governor idx="0">ROOT</governor>
106
+ <dependent idx="4">located</dependent>
107
+ </dep>
108
+ <dep type="compound">
109
+ <governor idx="2">University</governor>
110
+ <dependent idx="1">Stanford</dependent>
111
+ </dep>
112
+ <dep type="nsubj">
113
+ <governor idx="4">located</governor>
114
+ <dependent idx="2">University</dependent>
115
+ </dep>
116
+ <dep type="cop">
117
+ <governor idx="4">located</governor>
118
+ <dependent idx="3">is</dependent>
119
+ </dep>
120
+ <dep type="case">
121
+ <governor idx="6">California</governor>
122
+ <dependent idx="5">in</dependent>
123
+ </dep>
124
+ <dep type="nmod:in">
125
+ <governor idx="4">located</governor>
126
+ <dependent idx="6">California</dependent>
127
+ </dep>
128
+ <dep type="punct">
129
+ <governor idx="4">located</governor>
130
+ <dependent idx="7">.</dependent>
131
+ </dep>
132
+ </dependencies>
133
+ <dependencies type="collapsed-ccprocessed-dependencies">
134
+ <dep type="root">
135
+ <governor idx="0">ROOT</governor>
136
+ <dependent idx="4">located</dependent>
137
+ </dep>
138
+ <dep type="compound">
139
+ <governor idx="2">University</governor>
140
+ <dependent idx="1">Stanford</dependent>
141
+ </dep>
142
+ <dep type="nsubj">
143
+ <governor idx="4">located</governor>
144
+ <dependent idx="2">University</dependent>
145
+ </dep>
146
+ <dep type="cop">
147
+ <governor idx="4">located</governor>
148
+ <dependent idx="3">is</dependent>
149
+ </dep>
150
+ <dep type="case">
151
+ <governor idx="6">California</governor>
152
+ <dependent idx="5">in</dependent>
153
+ </dep>
154
+ <dep type="nmod:in">
155
+ <governor idx="4">located</governor>
156
+ <dependent idx="6">California</dependent>
157
+ </dep>
158
+ <dep type="punct">
159
+ <governor idx="4">located</governor>
160
+ <dependent idx="7">.</dependent>
161
+ </dep>
162
+ </dependencies>
163
+ </sentence>
164
+ <sentence id="2">
165
+ <tokens>
166
+ <token id="1">
167
+ <word>It</word>
168
+ <lemma>it</lemma>
169
+ <CharacterOffsetBegin>46</CharacterOffsetBegin>
170
+ <CharacterOffsetEnd>48</CharacterOffsetEnd>
171
+ <POS>PRP</POS>
172
+ <NER>O</NER>
173
+ <Speaker>PER0</Speaker>
174
+ </token>
175
+ <token id="2">
176
+ <word>is</word>
177
+ <lemma>be</lemma>
178
+ <CharacterOffsetBegin>49</CharacterOffsetBegin>
179
+ <CharacterOffsetEnd>51</CharacterOffsetEnd>
180
+ <POS>VBZ</POS>
181
+ <NER>O</NER>
182
+ <Speaker>PER0</Speaker>
183
+ </token>
184
+ <token id="3">
185
+ <word>a</word>
186
+ <lemma>a</lemma>
187
+ <CharacterOffsetBegin>52</CharacterOffsetBegin>
188
+ <CharacterOffsetEnd>53</CharacterOffsetEnd>
189
+ <POS>DT</POS>
190
+ <NER>O</NER>
191
+ <Speaker>PER0</Speaker>
192
+ </token>
193
+ <token id="4">
194
+ <word>great</word>
195
+ <lemma>great</lemma>
196
+ <CharacterOffsetBegin>54</CharacterOffsetBegin>
197
+ <CharacterOffsetEnd>59</CharacterOffsetEnd>
198
+ <POS>JJ</POS>
199
+ <NER>O</NER>
200
+ <Speaker>PER0</Speaker>
201
+ </token>
202
+ <token id="5">
203
+ <word>university</word>
204
+ <lemma>university</lemma>
205
+ <CharacterOffsetBegin>60</CharacterOffsetBegin>
206
+ <CharacterOffsetEnd>70</CharacterOffsetEnd>
207
+ <POS>NN</POS>
208
+ <NER>O</NER>
209
+ <Speaker>PER0</Speaker>
210
+ </token>
211
+ <token id="6">
212
+ <word>,</word>
213
+ <lemma>,</lemma>
214
+ <CharacterOffsetBegin>70</CharacterOffsetBegin>
215
+ <CharacterOffsetEnd>71</CharacterOffsetEnd>
216
+ <POS>,</POS>
217
+ <NER>O</NER>
218
+ <Speaker>PER0</Speaker>
219
+ </token>
220
+ <token id="7">
221
+ <word>founded</word>
222
+ <lemma>found</lemma>
223
+ <CharacterOffsetBegin>72</CharacterOffsetBegin>
224
+ <CharacterOffsetEnd>79</CharacterOffsetEnd>
225
+ <POS>VBN</POS>
226
+ <NER>O</NER>
227
+ <Speaker>PER0</Speaker>
228
+ </token>
229
+ <token id="8">
230
+ <word>in</word>
231
+ <lemma>in</lemma>
232
+ <CharacterOffsetBegin>80</CharacterOffsetBegin>
233
+ <CharacterOffsetEnd>82</CharacterOffsetEnd>
234
+ <POS>IN</POS>
235
+ <NER>O</NER>
236
+ <Speaker>PER0</Speaker>
237
+ </token>
238
+ <token id="9">
239
+ <word>1891</word>
240
+ <lemma>1891</lemma>
241
+ <CharacterOffsetBegin>83</CharacterOffsetBegin>
242
+ <CharacterOffsetEnd>87</CharacterOffsetEnd>
243
+ <POS>CD</POS>
244
+ <NER>DATE</NER>
245
+ <NormalizedNER>1891</NormalizedNER>
246
+ <Speaker>PER0</Speaker>
247
+ <Timex tid="t1" type="DATE">1891</Timex>
248
+ </token>
249
+ <token id="10">
250
+ <word>.</word>
251
+ <lemma>.</lemma>
252
+ <CharacterOffsetBegin>87</CharacterOffsetBegin>
253
+ <CharacterOffsetEnd>88</CharacterOffsetEnd>
254
+ <POS>.</POS>
255
+ <NER>O</NER>
256
+ <Speaker>PER0</Speaker>
257
+ </token>
258
+ </tokens>
259
+ <parse>(ROOT (S (NP (PRP It)) (VP (VBZ is) (NP (NP (DT a) (JJ great) (NN university)) (, ,) (VP (VBN founded) (PP (IN in) (NP (CD 1891)))))) (. .))) </parse>
260
+ <dependencies type="basic-dependencies">
261
+ <dep type="root">
262
+ <governor idx="0">ROOT</governor>
263
+ <dependent idx="5">university</dependent>
264
+ </dep>
265
+ <dep type="nsubj">
266
+ <governor idx="5">university</governor>
267
+ <dependent idx="1">It</dependent>
268
+ </dep>
269
+ <dep type="cop">
270
+ <governor idx="5">university</governor>
271
+ <dependent idx="2">is</dependent>
272
+ </dep>
273
+ <dep type="det">
274
+ <governor idx="5">university</governor>
275
+ <dependent idx="3">a</dependent>
276
+ </dep>
277
+ <dep type="amod">
278
+ <governor idx="5">university</governor>
279
+ <dependent idx="4">great</dependent>
280
+ </dep>
281
+ <dep type="punct">
282
+ <governor idx="5">university</governor>
283
+ <dependent idx="6">,</dependent>
284
+ </dep>
285
+ <dep type="acl">
286
+ <governor idx="5">university</governor>
287
+ <dependent idx="7">founded</dependent>
288
+ </dep>
289
+ <dep type="case">
290
+ <governor idx="9">1891</governor>
291
+ <dependent idx="8">in</dependent>
292
+ </dep>
293
+ <dep type="nmod">
294
+ <governor idx="7">founded</governor>
295
+ <dependent idx="9">1891</dependent>
296
+ </dep>
297
+ <dep type="punct">
298
+ <governor idx="5">university</governor>
299
+ <dependent idx="10">.</dependent>
300
+ </dep>
301
+ </dependencies>
302
+ <dependencies type="collapsed-dependencies">
303
+ <dep type="root">
304
+ <governor idx="0">ROOT</governor>
305
+ <dependent idx="5">university</dependent>
306
+ </dep>
307
+ <dep type="nsubj">
308
+ <governor idx="5">university</governor>
309
+ <dependent idx="1">It</dependent>
310
+ </dep>
311
+ <dep type="cop">
312
+ <governor idx="5">university</governor>
313
+ <dependent idx="2">is</dependent>
314
+ </dep>
315
+ <dep type="det">
316
+ <governor idx="5">university</governor>
317
+ <dependent idx="3">a</dependent>
318
+ </dep>
319
+ <dep type="amod">
320
+ <governor idx="5">university</governor>
321
+ <dependent idx="4">great</dependent>
322
+ </dep>
323
+ <dep type="punct">
324
+ <governor idx="5">university</governor>
325
+ <dependent idx="6">,</dependent>
326
+ </dep>
327
+ <dep type="acl">
328
+ <governor idx="5">university</governor>
329
+ <dependent idx="7">founded</dependent>
330
+ </dep>
331
+ <dep type="case">
332
+ <governor idx="9">1891</governor>
333
+ <dependent idx="8">in</dependent>
334
+ </dep>
335
+ <dep type="nmod:in">
336
+ <governor idx="7">founded</governor>
337
+ <dependent idx="9">1891</dependent>
338
+ </dep>
339
+ <dep type="punct">
340
+ <governor idx="5">university</governor>
341
+ <dependent idx="10">.</dependent>
342
+ </dep>
343
+ </dependencies>
344
+ <dependencies type="collapsed-ccprocessed-dependencies">
345
+ <dep type="root">
346
+ <governor idx="0">ROOT</governor>
347
+ <dependent idx="5">university</dependent>
348
+ </dep>
349
+ <dep type="nsubj">
350
+ <governor idx="5">university</governor>
351
+ <dependent idx="1">It</dependent>
352
+ </dep>
353
+ <dep type="cop">
354
+ <governor idx="5">university</governor>
355
+ <dependent idx="2">is</dependent>
356
+ </dep>
357
+ <dep type="det">
358
+ <governor idx="5">university</governor>
359
+ <dependent idx="3">a</dependent>
360
+ </dep>
361
+ <dep type="amod">
362
+ <governor idx="5">university</governor>
363
+ <dependent idx="4">great</dependent>
364
+ </dep>
365
+ <dep type="punct">
366
+ <governor idx="5">university</governor>
367
+ <dependent idx="6">,</dependent>
368
+ </dep>
369
+ <dep type="acl">
370
+ <governor idx="5">university</governor>
371
+ <dependent idx="7">founded</dependent>
372
+ </dep>
373
+ <dep type="case">
374
+ <governor idx="9">1891</governor>
375
+ <dependent idx="8">in</dependent>
376
+ </dep>
377
+ <dep type="nmod:in">
378
+ <governor idx="7">founded</governor>
379
+ <dependent idx="9">1891</dependent>
380
+ </dep>
381
+ <dep type="punct">
382
+ <governor idx="5">university</governor>
383
+ <dependent idx="10">.</dependent>
384
+ </dep>
385
+ </dependencies>
386
+ </sentence>
387
+ </sentences>
388
+ <coreference>
389
+ <coreference>
390
+ <mention representative="true">
391
+ <sentence>1</sentence>
392
+ <start>1</start>
393
+ <end>3</end>
394
+ <head>2</head>
395
+ <text>Stanford University</text>
396
+ </mention>
397
+ <mention>
398
+ <sentence>2</sentence>
399
+ <start>1</start>
400
+ <end>2</end>
401
+ <head>1</head>
402
+ <text>It</text>
403
+ </mention>
404
+ </coreference>
405
+ </coreference>
406
+ </document>
407
+ </root>
lib/input.txt.xml ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
3
+ <root>
4
+ <document>
5
+ <sentences>
6
+ <sentence id="1">
7
+ <tokens>
8
+ <token id="1">
9
+ <word>Stanford</word>
10
+ <lemma>Stanford</lemma>
11
+ <CharacterOffsetBegin>0</CharacterOffsetBegin>
12
+ <CharacterOffsetEnd>8</CharacterOffsetEnd>
13
+ <POS>NNP</POS>
14
+ <NER>ORGANIZATION</NER>
15
+ </token>
16
+ <token id="2">
17
+ <word>University</word>
18
+ <lemma>University</lemma>
19
+ <CharacterOffsetBegin>9</CharacterOffsetBegin>
20
+ <CharacterOffsetEnd>19</CharacterOffsetEnd>
21
+ <POS>NNP</POS>
22
+ <NER>ORGANIZATION</NER>
23
+ </token>
24
+ <token id="3">
25
+ <word>is</word>
26
+ <lemma>be</lemma>
27
+ <CharacterOffsetBegin>20</CharacterOffsetBegin>
28
+ <CharacterOffsetEnd>22</CharacterOffsetEnd>
29
+ <POS>VBZ</POS>
30
+ <NER>O</NER>
31
+ </token>
32
+ <token id="4">
33
+ <word>located</word>
34
+ <lemma>located</lemma>
35
+ <CharacterOffsetBegin>23</CharacterOffsetBegin>
36
+ <CharacterOffsetEnd>30</CharacterOffsetEnd>
37
+ <POS>JJ</POS>
38
+ <NER>O</NER>
39
+ </token>
40
+ <token id="5">
41
+ <word>in</word>
42
+ <lemma>in</lemma>
43
+ <CharacterOffsetBegin>31</CharacterOffsetBegin>
44
+ <CharacterOffsetEnd>33</CharacterOffsetEnd>
45
+ <POS>IN</POS>
46
+ <NER>O</NER>
47
+ </token>
48
+ <token id="6">
49
+ <word>California</word>
50
+ <lemma>California</lemma>
51
+ <CharacterOffsetBegin>34</CharacterOffsetBegin>
52
+ <CharacterOffsetEnd>44</CharacterOffsetEnd>
53
+ <POS>NNP</POS>
54
+ <NER>LOCATION</NER>
55
+ </token>
56
+ <token id="7">
57
+ <word>.</word>
58
+ <lemma>.</lemma>
59
+ <CharacterOffsetBegin>44</CharacterOffsetBegin>
60
+ <CharacterOffsetEnd>45</CharacterOffsetEnd>
61
+ <POS>.</POS>
62
+ <NER>O</NER>
63
+ </token>
64
+ </tokens>
65
+ <parse>(ROOT (S (NP (NNP Stanford) (NNP University)) (VP (VBZ is) (ADJP (JJ located) (PP (IN in) (NP (NNP California))))) (. .))) </parse>
66
+ <basic-dependencies>
67
+ <dep type="nn">
68
+ <governor idx="2">University</governor>
69
+ <dependent idx="1">Stanford</dependent>
70
+ </dep>
71
+ <dep type="nsubj">
72
+ <governor idx="4">located</governor>
73
+ <dependent idx="2">University</dependent>
74
+ </dep>
75
+ <dep type="cop">
76
+ <governor idx="4">located</governor>
77
+ <dependent idx="3">is</dependent>
78
+ </dep>
79
+ <dep type="prep">
80
+ <governor idx="4">located</governor>
81
+ <dependent idx="5">in</dependent>
82
+ </dep>
83
+ <dep type="pobj">
84
+ <governor idx="5">in</governor>
85
+ <dependent idx="6">California</dependent>
86
+ </dep>
87
+ </basic-dependencies>
88
+ <collapsed-dependencies>
89
+ <dep type="nn">
90
+ <governor idx="2">University</governor>
91
+ <dependent idx="1">Stanford</dependent>
92
+ </dep>
93
+ <dep type="nsubj">
94
+ <governor idx="4">located</governor>
95
+ <dependent idx="2">University</dependent>
96
+ </dep>
97
+ <dep type="cop">
98
+ <governor idx="4">located</governor>
99
+ <dependent idx="3">is</dependent>
100
+ </dep>
101
+ <dep type="prep_in">
102
+ <governor idx="4">located</governor>
103
+ <dependent idx="6">California</dependent>
104
+ </dep>
105
+ </collapsed-dependencies>
106
+ <collapsed-ccprocessed-dependencies>
107
+ <dep type="nn">
108
+ <governor idx="2">University</governor>
109
+ <dependent idx="1">Stanford</dependent>
110
+ </dep>
111
+ <dep type="nsubj">
112
+ <governor idx="4">located</governor>
113
+ <dependent idx="2">University</dependent>
114
+ </dep>
115
+ <dep type="cop">
116
+ <governor idx="4">located</governor>
117
+ <dependent idx="3">is</dependent>
118
+ </dep>
119
+ <dep type="prep_in">
120
+ <governor idx="4">located</governor>
121
+ <dependent idx="6">California</dependent>
122
+ </dep>
123
+ </collapsed-ccprocessed-dependencies>
124
+ </sentence>
125
+ <sentence id="2">
126
+ <tokens>
127
+ <token id="1">
128
+ <word>It</word>
129
+ <lemma>it</lemma>
130
+ <CharacterOffsetBegin>46</CharacterOffsetBegin>
131
+ <CharacterOffsetEnd>48</CharacterOffsetEnd>
132
+ <POS>PRP</POS>
133
+ <NER>O</NER>
134
+ </token>
135
+ <token id="2">
136
+ <word>is</word>
137
+ <lemma>be</lemma>
138
+ <CharacterOffsetBegin>49</CharacterOffsetBegin>
139
+ <CharacterOffsetEnd>51</CharacterOffsetEnd>
140
+ <POS>VBZ</POS>
141
+ <NER>O</NER>
142
+ </token>
143
+ <token id="3">
144
+ <word>a</word>
145
+ <lemma>a</lemma>
146
+ <CharacterOffsetBegin>52</CharacterOffsetBegin>
147
+ <CharacterOffsetEnd>53</CharacterOffsetEnd>
148
+ <POS>DT</POS>
149
+ <NER>O</NER>
150
+ </token>
151
+ <token id="4">
152
+ <word>great</word>
153
+ <lemma>great</lemma>
154
+ <CharacterOffsetBegin>54</CharacterOffsetBegin>
155
+ <CharacterOffsetEnd>59</CharacterOffsetEnd>
156
+ <POS>JJ</POS>
157
+ <NER>O</NER>
158
+ </token>
159
+ <token id="5">
160
+ <word>university</word>
161
+ <lemma>university</lemma>
162
+ <CharacterOffsetBegin>60</CharacterOffsetBegin>
163
+ <CharacterOffsetEnd>70</CharacterOffsetEnd>
164
+ <POS>NN</POS>
165
+ <NER>O</NER>
166
+ </token>
167
+ <token id="6">
168
+ <word>,</word>
169
+ <lemma>,</lemma>
170
+ <CharacterOffsetBegin>70</CharacterOffsetBegin>
171
+ <CharacterOffsetEnd>71</CharacterOffsetEnd>
172
+ <POS>,</POS>
173
+ <NER>O</NER>
174
+ </token>
175
+ <token id="7">
176
+ <word>founded</word>
177
+ <lemma>found</lemma>
178
+ <CharacterOffsetBegin>72</CharacterOffsetBegin>
179
+ <CharacterOffsetEnd>79</CharacterOffsetEnd>
180
+ <POS>VBN</POS>
181
+ <NER>O</NER>
182
+ </token>
183
+ <token id="8">
184
+ <word>in</word>
185
+ <lemma>in</lemma>
186
+ <CharacterOffsetBegin>80</CharacterOffsetBegin>
187
+ <CharacterOffsetEnd>82</CharacterOffsetEnd>
188
+ <POS>IN</POS>
189
+ <NER>O</NER>
190
+ </token>
191
+ <token id="9">
192
+ <word>1891</word>
193
+ <lemma>1891</lemma>
194
+ <CharacterOffsetBegin>83</CharacterOffsetBegin>
195
+ <CharacterOffsetEnd>87</CharacterOffsetEnd>
196
+ <POS>CD</POS>
197
+ <NER>DATE</NER>
198
+ <NormalizedNER>1891</NormalizedNER>
199
+ <Timex tid="t1" type="DATE">1891</Timex>
200
+ </token>
201
+ <token id="10">
202
+ <word>.</word>
203
+ <lemma>.</lemma>
204
+ <CharacterOffsetBegin>87</CharacterOffsetBegin>
205
+ <CharacterOffsetEnd>88</CharacterOffsetEnd>
206
+ <POS>.</POS>
207
+ <NER>O</NER>
208
+ </token>
209
+ </tokens>
210
+ <parse>(ROOT (S (NP (PRP It)) (VP (VBZ is) (NP (NP (DT a) (JJ great) (NN university)) (, ,) (VP (VBN founded) (PP (IN in) (NP (CD 1891)))))) (. .))) </parse>
211
+ <basic-dependencies>
212
+ <dep type="nsubj">
213
+ <governor idx="5">university</governor>
214
+ <dependent idx="1">It</dependent>
215
+ </dep>
216
+ <dep type="cop">
217
+ <governor idx="5">university</governor>
218
+ <dependent idx="2">is</dependent>
219
+ </dep>
220
+ <dep type="det">
221
+ <governor idx="5">university</governor>
222
+ <dependent idx="3">a</dependent>
223
+ </dep>
224
+ <dep type="amod">
225
+ <governor idx="5">university</governor>
226
+ <dependent idx="4">great</dependent>
227
+ </dep>
228
+ <dep type="partmod">
229
+ <governor idx="5">university</governor>
230
+ <dependent idx="7">founded</dependent>
231
+ </dep>
232
+ <dep type="prep">
233
+ <governor idx="7">founded</governor>
234
+ <dependent idx="8">in</dependent>
235
+ </dep>
236
+ <dep type="pobj">
237
+ <governor idx="8">in</governor>
238
+ <dependent idx="9">1891</dependent>
239
+ </dep>
240
+ </basic-dependencies>
241
+ <collapsed-dependencies>
242
+ <dep type="nsubj">
243
+ <governor idx="5">university</governor>
244
+ <dependent idx="1">It</dependent>
245
+ </dep>
246
+ <dep type="cop">
247
+ <governor idx="5">university</governor>
248
+ <dependent idx="2">is</dependent>
249
+ </dep>
250
+ <dep type="det">
251
+ <governor idx="5">university</governor>
252
+ <dependent idx="3">a</dependent>
253
+ </dep>
254
+ <dep type="amod">
255
+ <governor idx="5">university</governor>
256
+ <dependent idx="4">great</dependent>
257
+ </dep>
258
+ <dep type="partmod">
259
+ <governor idx="5">university</governor>
260
+ <dependent idx="7">founded</dependent>
261
+ </dep>
262
+ <dep type="prep_in">
263
+ <governor idx="7">founded</governor>
264
+ <dependent idx="9">1891</dependent>
265
+ </dep>
266
+ </collapsed-dependencies>
267
+ <collapsed-ccprocessed-dependencies>
268
+ <dep type="nsubj">
269
+ <governor idx="5">university</governor>
270
+ <dependent idx="1">It</dependent>
271
+ </dep>
272
+ <dep type="cop">
273
+ <governor idx="5">university</governor>
274
+ <dependent idx="2">is</dependent>
275
+ </dep>
276
+ <dep type="det">
277
+ <governor idx="5">university</governor>
278
+ <dependent idx="3">a</dependent>
279
+ </dep>
280
+ <dep type="amod">
281
+ <governor idx="5">university</governor>
282
+ <dependent idx="4">great</dependent>
283
+ </dep>
284
+ <dep type="partmod">
285
+ <governor idx="5">university</governor>
286
+ <dependent idx="7">founded</dependent>
287
+ </dep>
288
+ <dep type="prep_in">
289
+ <governor idx="7">founded</governor>
290
+ <dependent idx="9">1891</dependent>
291
+ </dep>
292
+ </collapsed-ccprocessed-dependencies>
293
+ </sentence>
294
+ </sentences>
295
+ <coreference>
296
+ <coreference>
297
+ <mention representative="true">
298
+ <sentence>1</sentence>
299
+ <start>1</start>
300
+ <end>3</end>
301
+ <head>2</head>
302
+ </mention>
303
+ <mention>
304
+ <sentence>2</sentence>
305
+ <start>1</start>
306
+ <end>2</end>
307
+ <head>1</head>
308
+ </mention>
309
+ <mention>
310
+ <sentence>2</sentence>
311
+ <start>3</start>
312
+ <end>10</end>
313
+ <head>5</head>
314
+ </mention>
315
+ <mention>
316
+ <sentence>2</sentence>
317
+ <start>3</start>
318
+ <end>6</end>
319
+ <head>5</head>
320
+ </mention>
321
+ </coreference>
322
+ </coreference>
323
+ </document>
324
+ </root>
lib/jackson-core-2.5.3.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9a900c30c702d371be2d3714938dfa6de616599c8eb39f8e3cf7aedd62dfd32
3
+ size 229998
lib/javassist-3.19.0-GA.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d19c1ef43ccd9cb1b39466bb2f1c8e45c2b6752f1e13a3dfb60096543d1791fa
3
+ size 749499
lib/javax.json-api-1.0-sources.jar ADDED
Binary file (54.9 kB). View file
 
lib/javax.json.jar ADDED
Binary file (85.1 kB). View file
 
lib/joda-time-2.9-sources.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5ac62b9940457f718604f3bbe145e5f3b62900f5a1255e7022cd923b9494dea
3
+ size 764886
lib/joda-time.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5080c410c82017c9b70a6da8091e2106d31a2bb3f209af3d538a0b65c773651d
3
+ size 625993
lib/jollyday-0.4.7-sources.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11ea15529280b063acfacede664b7baafdf6d6f803deeab2b77182d3e01551c0
3
+ size 186532
lib/jollyday.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc8eb8ab7ecdc98bf72b00ff29b4a9c9f947e2e30d18865fb3aba23c37222ee2
3
+ size 200993
lib/json-simple-1.1.1.jar ADDED
Binary file (23.9 kB). View file
 
lib/junit-4.12.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a
3
+ size 314932
lib/lmdbjni-0.4.6.jar ADDED
Binary file (86 kB). View file
 
lib/lmdbjni-linux64-0.4.6.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b7773db873aaeec399a50113c0a4e121df0eff5e724607f7bc8171452107d94
3
+ size 385952
lib/lmdbjni-osx64-0.4.6.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d66778037b5689e7c6daf22a7140722f2085da4ae479bceda4a4be487d55460
3
+ size 106300
lib/lmdbjni-win64-0.4.6.jar ADDED
Binary file (72.7 kB). View file
 
lib/objenesis-2.4.jar ADDED
Binary file (51.3 kB). View file
 
lib/patterns/example.properties ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### NOTE: for all flags and their description, see the javadoc. Important parameters (in our experience) that you should tune for your dataset are marked with ***. Pay special attention to flags like targetAllowedNERs. Use batchProcesssSents and Lucene based options if you want low memory (but slower) runs.
2
+
3
+ #***Which type of patterns. Options are SURFACE and DEP
4
+ patternType=SURFACE
5
+
6
+ #name for the saved files for the output of the system (useful for comparing results of different experiments with different variables etc.)
7
+ identifier=useNERRestriction
8
+
9
+ #Directory where data lives
10
+ DIR=patterns
11
+
12
+ outDir=SPIEDPatternsout
13
+
14
+ #If you want output in which each labeled phrase has <label> </label> around it
15
+ #markedOutputTextFile=${outDir}/markedtext.txt
16
+
17
+ #Number of threads available on the machine
18
+ numThreads=1
19
+ #***Use these options if you are limited by memory
20
+ batchProcessSents = false
21
+ #This name is a misnomer. Max number of *lines* per batch file. Works only for text file format; ser files cannot be broken down
22
+ numMaxSentencesPerBatchFile=100
23
+ saveInvertedIndex=false
24
+ invertedIndexDirectory=${outDir}/invertedIndex
25
+ #Loading index from invertedIndexDirectory
26
+ #loadInvertedIndex=true
27
+
28
+ #Useful for memory heavy apps.
29
+ #invertedIndexClass=edu.stanford.nlp.patterns.LuceneSentenceIndex
30
+
31
+
32
+ ### Example for running it on presidents biographies. For more data examples, see the bottom of this file
33
+
34
+ #can be text. the code will tokenize it.
35
+ fileFormat=text
36
+ #Input file(s) (default assumed text). Can be one or more of (concatenated by comma or semi-colon): file, directory, files with regex in the filename (for example: "mydir/health-.*-processed.txt")
37
+ file=${DIR}/presidents.txt
38
+
39
+ #to save the serialized sentences into a file - text split into sentences, processed using ner, parse etc (depending on the flags) and labeled with seed set. Existing files will get deleted (if the fileFormat is not ser).
40
+ saveSentencesSerDir=${outDir}/sents
41
+
42
+ #if you use the flag above to save the file, you can use the saved file like this
43
+ #fileFormat=ser
44
+ #file=${outDir}/sents
45
+
46
+ #We are learning names of presidential candidates, places, and other names. In each line, all text after tabs are ignored in these seed files
47
+ seedWordsFiles=NAME,${DIR}/names.txt;PLACE,${DIR}/places.txt;OTHER,${DIR}/otherpeople.txt
48
+ #Useful for matching lemmas or spelling mistakes
49
+ fuzzyMatch=false
50
+ #Used if fuzzyMatch is true. minimum length of words to do fuzzy matching.
51
+ minLen4FuzzyForPattern=6
52
+
53
+ #You can evaluate two ways; both presented here.
54
+ evaluate=true
55
+ goldEntitiesEvalFiles=NAME,${DIR}/goldnames.txt;PLACE,${DIR}/goldplaces.txt
56
+ #evalFileWithGoldLabels=${DIR}/presidents_eval.txt
57
+ #default as true, false if you want scores per token
58
+ evalPerEntity=true
59
+
60
+
61
+ #SAVE n LOAD the model (patterns and phrases) options
62
+ patternsWordsDir=${outDir}/${identifier}/model/
63
+ #save the learned patterns and learned words in patternsWordsDir directory
64
+ savePatternsWordsDir=true
65
+ #load the patterns and words from patternsWordsDir directory
66
+ #loadSavedPatternsWordsDir=true
67
+
68
+ #false if you just want to process the text into sents but not do anything with it, or you want to use loadSavedPatternsWordsDir option. Useful for batch processing and saving text as serialized objects, then running the learning system on all the serialized objects (see saveSentences* and saveEvalSent* flags) or domain adaptation.
69
+ learn=true
70
+
71
+
72
+ #posModelPath=<if you want to use a different Stanford NLP group released POS tagger; e.g. caseless etc>
73
+
74
+ #In case the seeds have overlapping words like "lung" as bodyPart and "lung cancer" as disease. "lung" in "lung cancer" will be labeled as only disease, if the flag is true.
75
+ removeOverLappingLabelsFromSeed=true
76
+
77
+ ######## creating patterns flags ##########
78
+ #***use context on the left
79
+ usePreviousContext=true
80
+
81
+ #***use context on the right
82
+ useNextContext = true
83
+
84
+ #***the context should be at least this long
85
+ minWindow4Pattern = 2
86
+
87
+ #***the context can be at most this long
88
+ maxWindow4Pattern = 4
89
+
90
+ #if the context consists of only stop words, add only if it's more than these many stop words
91
+ numMinStopWordsToAdd = 3
92
+
93
+ #***use POS tag restriction for the target phrase
94
+ usePOS4Pattern = true
95
+
96
+ #Ignore words {a, an, the} while matching the patterns to text (advisable true)
97
+ useFillerWordsInPat = false
98
+
99
+ #***Specific allowed tags' initials for the target phrase for each label while creating the patterns (if not specified, every tag is acceptable to create a pattern). Tag initials can be written as N or NN or J or N,J etc. E.g.: NAME,N,J;PLACE,N. If
100
+ targetAllowedTagsInitialsStr=NAME,N;OTHER,N
101
+
102
+ #You can save all possible patterns for all tokens in the flag allPatternsDir so you wouldn't need to calculate them everytime.
103
+ computeAllPatterns = true
104
+
105
+ #Options: MEMORY, DB, LUCENE. If using SQL for storing patterns for each token --- populate SQLConnection class, that is provide those properties!
106
+ storePatsForEachToken=MEMORY
107
+ #***If your code is running too slow, try to reduce this number. Samples % of sentences for learning patterns
108
+ sampleSentencesForSufficientStats=1.0
109
+
110
+ #Save or read (if computeAllPatterns is false) from here
111
+ allPatternsDir= ${DIR}/${identifier}_allpatterns
112
+
113
+ #***maximum Num of allowed words in the target phrase
114
+ numWordsCompound = 3
115
+
116
+ #***consider patterns without the POS restricion on the target phrase
117
+ addPatWithoutPOS = true
118
+
119
+ #Ignore common stop words occuring just before the target phrase
120
+ useStopWordsBeforeTerm=false
121
+
122
+ #Use lemma instead of words of the context tokens
123
+ useLemmaContextTokens=true
124
+
125
+ #make context matching lowercase (advisable)
126
+ matchLowerCaseContext=true
127
+
128
+ #***use named entity tag (predicted using StanfordCoreNLP NER) restriction of the target phrase
129
+ useTargetNERRestriction=true
130
+
131
+ #***If useTargetNERRestriction is true, you can give NER tags that the target phrase can take. Do not mention anything if you don't want any specific restriction
132
+ targetAllowedNERs=NAME,PERSON;PLACE,LOCATION;OTHER,PERSON
133
+
134
+ #use named entity tag restrictions for the context (neighboring) tokens
135
+ useContextNERRestriction=false
136
+
137
+ #***use the parse tag of the grandparent node as restriction (note that parent node is the POS tag of the word)
138
+ useTargetParserParentRestriction=false
139
+
140
+ #do not extract phrase in which any word is labeled with another class (for example, you don't wanna extract 'HIV patients' as disease)
141
+ doNotExtractPhraseAnyWordLabeledOtherClass = true
142
+
143
+ #### matching patterns to text ######
144
+
145
+ #kinda ignore this flag and use it as true. for those who care this too much: for each token, we use the phrase that originally matched that token instead of the token's word (in case you are using fuzzy matching)
146
+ useMatchingPhrase=true
147
+
148
+ #Use only the tokens that get matched by a pattern (advisable as false)
149
+ restrictToMatched = false
150
+
151
+ #Label the learned words in the text (advisable as true)
152
+ usePatternResultAsLabel=true
153
+
154
+ #remove common stop words from phrases to get clean phrases (for example, "disease" instead of "some disease")
155
+ removeStopWordsFromSelectedPhrases = true
156
+
157
+ #Do not learn phrases that have any stop word
158
+ removePhrasesWithStopWords = false
159
+
160
+
161
+ ### evaluating candidate patterns
162
+
163
+ #***Minimum number of positive phrases a candidate pattern should extract
164
+ minPosPhraseSupportForPat = 1
165
+
166
+ ##### thresholds for selecting paterns and words #####
167
+
168
+ #***threshold for learning a phrase
169
+ thresholdWordExtract=0.01
170
+
171
+ #***thrshold for learning a pattern
172
+ thresholdSelectPattern = 0.01
173
+
174
+ #keep lowering threshold as 0.8*threshold whenever the system doesn't learn any new patterns and phrases
175
+ tuneThresholdKeepRunning=false
176
+
177
+ #***discard phrases that do not have these many patterns extracting it
178
+ thresholdNumPatternsApplied = 1
179
+
180
+ #***max number of words to extract in each iteration
181
+ numWordsToAdd = 5
182
+
183
+ #***max number of words to extract in each pattern
184
+ numPatterns = 5
185
+
186
+ #***max number of iterations
187
+ numIterationsForPatterns = 8
188
+
189
+ #Consider words belonging to other labels as negative (advisable as true)
190
+ useOtherLabelsWordsasNegative=true
191
+
192
+ #***Pattern scoring measure. For more details, see the paper. The options are PhEvalInPatLogP, PhEvalInPat, PosNegUnlabOdds, RlogF, RlogFPosNeg, YanGarber02, PosNegOdds, LOGREG, LOGREGlogP, RatioAll, SqrtAllRatio
193
+ patternScoring=RatioAll
194
+
195
+ #Class to be used to score phrases. The valid options are edu.stanford.nlp.patterns.surface.ScorePhrasesAverageFeatures and edu.stanford.nlp.patterns.surface.ScorePhrasesLearnFeatWt
196
+ phraseScorerClass=edu.stanford.nlp.patterns.ScorePhrasesAverageFeatures
197
+ #phraseScorerClass=edu.stanford.nlp.patterns.ScorePhrasesLearnFeatWt
198
+
199
+ #***Club neighboring labeled words (of the same label) when extracting phrases
200
+ clubNeighboringLabeledWords=true
201
+
202
+ #if you want to sqrt root the pattern score
203
+ sqrtPatScore = false
204
+
205
+ #Phrase scoring measure; ignore.
206
+ wordScoring=WEIGHTEDNORM
207
+
208
+ #For scoring phrases that are OOV, a score is the average of the score of individual words (instead of min, which is default)
209
+ useAvgInsteadofMinPhraseScoring=true
210
+
211
+ #*** what all features to use to evaluate phrases. See the paper for more details on each
212
+ #only if wordClassClusterFile is provided
213
+ usePhraseEvalWordClass=false
214
+
215
+ #tf-idf scoring w.r.t to the domain
216
+ usePhraseEvalDomainNgram=false
217
+
218
+ #use pattern weights in scoring phrases extracted by them, if usePhraseEvalPatWtByFreq is true. otherwise it's just a tfidf like score
219
+ usePatternWeights=true
220
+
221
+ #basically patwt/log(freq), patwt = 1 if usePatternWeights is false
222
+ usePhraseEvalPatWtByFreq=true
223
+
224
+ #if using multiple label dictionaries etc, freq of the phrase in the label dictionary vs other dictionaries
225
+ usePhraseEvalSemanticOdds=true
226
+
227
+ #edit distance from positive entities
228
+ usePhraseEvalEditDistSame=true
229
+
230
+ #edit distance from the negative entities
231
+ usePhraseEvalEditDistOther=true
232
+
233
+ #if you have googlengrams, you can use googlengrams tf-idf scoring.
234
+ usePhraseEvalGoogleNgram=false
235
+
236
+ #% of positive labeled words with the same word class (see WordClassClassifier and chris2 for more details)
237
+ usePhraseEvalWordShape=true
238
+
239
+
240
+ #These flags are not valid if patternScoring is not PhEvalInPat* . Similar meaning as for the phrase ones above
241
+ usePatternEvalWordClass=false
242
+ usePatternEvalGoogleNgram=false
243
+ usePatternEvalSemanticOdds=true
244
+ usePatternEvalEditDistSame=true
245
+ usePatternEvalEditDistOther=true
246
+ usePatternEvalDomainNgram=false
247
+ usePatternEvalWordShape=true
248
+
249
+ #Options are LOG, NONE or SQRT
250
+ wordFreqNorm = NONE
251
+
252
+ ######For logging
253
+
254
+ #4 if you wanna print out every single thing happening in the system, 3 if you want fair amount of debug messages and justification, 2 means some debug msgs, 1 means only necessary msgs and 0 means (almost) no msgs
255
+ debug = 3
256
+
257
+
258
+
259
+ #stop words file
260
+ stopWordsPatternFiles=${DIR}/stopwords.txt
261
+
262
+ englishWordsFiles=${stopWordsPatternFiles}
263
+ commonWordsPatternFiles= ${stopWordsPatternFiles}
264
+ #You can give some common words like this
265
+ #commonWordsPatternFiles =${DIR}/lists/commonEngWords1k.txt
266
+
267
+ #If you are using Google Ngrams TF-IDF feature
268
+ #googleNGramsFile=/u/nlp/scr/google-ngrams/1gms/vocab
269
+ #weightDomainFreq=10
270
+
271
+ #below is optional; comma separated files with list of phrases that def do not belong to any of the labels
272
+ #otherSemanticClassesFiles=${DIR}/nondiseases.txt
273
+
274
+ #The flags below are used when either LOGREG is used for patternScoring or ScorePhrasesLearnFeatWt class is used for phrase scoring
275
+ #% unlabeled tokens selected as negative
276
+ #perSelectRand=0.5
277
+ #% negative tokens selected as negative
278
+ #perSelectNeg=1
279
+
280
+
281
+ ### Example for running the code on BioMed articles and NCBI corpus (instead of the toy example above)
282
+
283
+ #fileFormat=text
284
+ #file=${DIR}/BioMedSample
285
+ #saveSentencesSerFile=${DIR}/biomed_sents.ser
286
+
287
+ #evalFileWithGoldLabels=${DIR}/NCBI_corpus_testing_processed.txt
288
+ #saveEvalSentencesSerFile=${DIR}/ncbi_corpus_testing_sents.ser
289
+ #addEvalSentsToTrain=true
290
+
291
+ #seedWordsFiles=disease,${DIR}/diseases.txt;nondisease,${DIR}/nondiseases.txt
292
+
293
+ #wordClassClusterFile=${DIR}/ncbi_disease_brownclusters_200_min5.txt
294
+
295
+ #externalFeatureWeightsFile = ${DIR}/out/wordclass_weights
296
+
297
+
lib/patterns/goldnames.txt ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Nelson Rockefeller
2
+ Herbert Walker Bush
3
+ contributed#
4
+ Ronald Reagan
5
+ Bush
6
+ John Fitzgerald Kennedy
7
+ Nixon
8
+ Carter
9
+ George Herber Walker Bush
10
+ William Clinton
11
+ William
12
+ Nelle
13
+ George Bush
14
+ James Earl
15
+ John
16
+ Dwight D. Eisenhower
17
+ Prescott Bush
18
+ Wilkes Booth#
19
+ Taft
20
+ Prescott#
21
+ Coolidge
22
+ Kennedy
23
+ W. Bush
24
+ George
25
+ Reagan
26
+ Adams
27
+ Eisenhower
28
+ Ronald Wilson Reagan
29
+ William Jefferson
30
+ Roger#
31
+ Blythe III
32
+ Clinton
33
+ Johnson
34
+ Richard M.
35
+ George W.
36
+ George C. Marshall
37
+ Gibbs McAdoo#
38
+ Lyndon B.
39
+ III
40
+ John Quincy
41
+ agenda#
42
+ Governor Nelson Rockefeller
43
+ President Jimmy
44
+ Warren G. Harding
45
+ promise#
46
+ General Eisenhower
47
+ business#
48
+ Gerald R. Ford
49
+ America#
50
+ family#
51
+ Administration#
52
+ pledge#
53
+ phrases#
54
+ House#
55
+ measures#
56
+ campaign#
57
+ Roosevelt
58
+ Governor Jimmy
59
+ cut taxes#
60
+ Governor Nelson
61
+ Albert Gore Jr.
62
+ Gore Jr.
63
+ Leonid I. Brezhnev#
64
+ Albert Gore
65
+ Bush
66
+ James M. Cox
67
+ Nixon
68
+ George W. Bush
69
+ Michael Dukakisi#
70
+ Ronald Wilson Reagan
71
+ Saddam Hussein#
72
+ Dan Quayle
73
+ Al Gore
74
+ Carter
75
+ John Kerry
76
+ Spiro T. Agnew
77
+ Clinton
78
+ Walter F. Mondale
79
+ Nelson Rockefeller
80
+ Gerald R. Ford
81
+ Taft
82
+ Hubert H. Humphrey
83
+ Mikhail Gorbachev#
84
+ John Kennedy
85
+ Richard M. Nixon
lib/patterns/goldplaces.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ Brookline
2
+ Plymouth
lib/patterns/names.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ President Obama
2
+ President Bush
3
+ Jimmy Carter
lib/patterns/otherpeople.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Sasha
2
+ Michelle
3
+ Laura Welch
4
+ Jenna
lib/patterns/places.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ Hawaii
2
+ New Haven
3
+ Milton
lib/patterns/presidents.txt ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Barack H. Obama is the 44th President of the United States.
2
+
3
+ His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others.
4
+
5
+ With a father from Kenya and a mother from Kansas, President Obama was born in Hawaii on August 4, 1961. He was raised with help from his grandfather, who served in Patton's army, and his grandmother, who worked her way up from the secretarial pool to middle management at a bank.
6
+
7
+ After working his way through college with the help of scholarships and student loans, President Obama moved to Chicago, where he worked with a group of churches to help rebuild communities devastated by the closure of local steel plants.
8
+
9
+ He went on to attend law school, where he became the first African—American president of the Harvard Law Review. Upon graduation, he returned to Chicago to help lead a voter registration drive, teach constitutional law at the University of Chicago, and remain active in his community.
10
+
11
+ President Obama's years of public service are based around his unwavering belief in the ability to unite people around a politics of purpose. In the Illinois State Senate, he passed the first major ethics reform in 25 years, cut taxes for working families, and expanded health care for children and their parents. As a United States Senator, he reached across the aisle to pass groundbreaking lobbying reform, lock up the world's most dangerous weapons, and bring transparency to government by putting federal spending online.
12
+
13
+ He was elected the 44th President of the United States on November 4, 2008, and sworn in on January 20, 2009. He and his wife, Michelle, are the proud parents of two daughters, Malia, 14, and Sasha, 11.
14
+
15
+ The airborne terrorist attacks on the World Trade Center, the Pentagon, and the thwarted flight against the White House or Capitol on September 11, 2001, in which nearly 3,000 Americans were killed, transformed George W. Bush into a wartime president. The attacks put on hold many of Bush’s hopes and plans, and Bush’s father, George Bush, the 41st president, declared that his son “faced the greatest challenge of any president since Abraham Lincoln.”
16
+
17
+ In response, Bush formed a new cabinet-level Department of Homeland Security, sent American forces into Afghanistan to break up the Taliban, a movement under Osama bin Laden that trained financed and exported terrorist teams. The Taliban was successfully disrupted but Bin Laden was not captured and was still on the loose as Bush began his second term. Following the attacks, the president also recast the nation’s intelligence gathering and analysis services, and ordered reform of the military forces to meet the new enemy. At the same time he delivered major tax cuts which had been a campaign pledge. His most controversial act was the invasion of Iraq on the belief that Iraqi President Saddam Hussein posed a grave threat to the United States. Saddam was captured, but the disruption of Iraq and the killing of American servicemen and friendly Iraqis by insurgents became the challenge of Bush’s government as he began his second term. President Bush pledged during his 2005 State of the Union Address that the United States would help the Iraqi people establish a fully democratic government because the victory of freedom in Iraq would strengthen a new ally in the war on terror, bring hope to a troubled region, and lift a threat from the lives of future generations.
18
+
19
+ Bush was born in New Haven, Connecticut while his father was attending Yale University after service in World War II. The family moved to Midland, Texas, where the senior Bush entered the oil exploration business. The son spent formative years there, attended Midland public schools, and formed friendships that stayed with him into the White House. Bush graduated from Yale, received a business degree from Harvard, and then returned to Midland where he too got into the oil business. In Midland he met and married Laura Welch, a teacher and librarian. They had twin daughters, Jenna and Barbara, now out of college and pursuing careers.
20
+
21
+ When George W. Bush, at the age of 54, became the 43rd president of the United States, it was only the second time in American history that a president’s son went on to the White House. John Quincy Adams, elected the sixth president in 1824, was the son of John Adams, the second president. While John Adams had groomed his son to be president, George Bush, the 41st president, insisted he was surprised when the eldest of his six children became interested in politics, became governor of Texas, and then went on to the White House.
22
+
23
+ During the early part of the 2000 campaign for the White House, Bush enjoyed a double-digit lead in the polls over his opponent Vice President Al Gore Jr. But the gap closed as the election approached and though Gore finally won the popular vote by 543,895 votes, victory or loss of the presidency hinged on Florida’s electoral votes. That struggle through recounts and lawsuits worked its way to the Supreme Court. In the end Bush won the electoral count 271 to 266. His new administration was focused on “compassionate conservatism,” which embraced excellence in education, tax relief and volunteerism among faith-based and community organizations.
24
+
25
+ Bush was challenged in his re-election bid in 2004 by Massachusetts Democratic Senator John Kerry. The election was a good contest, but Bush’s contention that the invasion of Iraq had made the world more secure against terrorism won the national political debate. Bush was re-elected with 51 percent to 48 percent.
26
+
27
+ On the inaugural stand, George W. Bush set the theme for his second term: “At this second gathering, our duties are defined not by the words I use, but by the history we have seen together. For half a century, America defended our own freedom by standing watch on distant borders. After the shipwreck of communism came years of relative quiet- and then there came a day of fire. There is only one force of history that can break the reign of hatred and resentment, and expose the pretensions of tyrants, and reward the hopes of the decent and tolerant, and that is the force of human freedom – tested but not weary… we are ready for the greatest achievements in the history of freedom.”
28
+
29
+
30
+
31
+ During the administration of William Jefferson Clinton, the U.S. enjoyed more peace and economic well being than at any time in its history. He was the first Democratic president since Franklin D. Roosevelt to win a second term. He could point to the lowest unemployment rate in modern times, the lowest inflation in 30 years, the highest home ownership in the country's history, dropping crime rates in many places, and reduced welfare rolls. He proposed the first balanced budget in decades and achieved a budget surplus. As part of a plan to celebrate the millennium in 2000, Clinton called for a great national initiative to end racial discrimination.
32
+
33
+ After the failure in his second year of a huge program of health care reform, Clinton shifted emphasis, declaring "the era of big government is over." He sought legislation to upgrade education, to protect jobs of parents who must care for sick children, to restrict handgun sales, and to strengthen environmental rules.
34
+
35
+ President Clinton was born William Jefferson Blythe III on August 19, 1946, in Hope, Arkansas, three months after his father died in a traffic accident. When he was four years old, his mother wed Roger Clinton, of Hot Springs, Arkansas. In high school, he took the family name.
36
+
37
+ He excelled as a student and as a saxophone player and once considered becoming a professional musician. As a delegate to Boys Nation while in high school, he met President John Kennedy in the White House Rose Garden. The encounter led him to enter a life of public service.
38
+
39
+ Clinton was graduated from Georgetown University and in 1968 won a Rhodes Scholarship to Oxford University. He received a law degree from Yale University in 1973, and entered politics in Arkansas.
40
+
41
+ He was defeated in his campaign for Congress in Arkansas's Third District in 1974. The next year he married Hillary Rodham, a graduate of Wellesley College and Yale Law School. In 1980, Chelsea, their only child, was born.
42
+
43
+ Clinton was elected Arkansas Attorney General in 1976, and won the governorship in 1978. After losing a bid for a second term, he regained the office four years later, and served until he defeated incumbent George Bush and third party candidate Ross Perot in the 1992 presidential race.
44
+
45
+ Clinton and his running mate, Tennessee's Senator Albert Gore Jr., then 44, represented a new generation in American political leadership. For the first time in 12 years both the White House and Congress were held by the same party. But that political edge was brief; the Republicans won both houses of Congress in 1994.
46
+
47
+ In 1998, as a result of issues surrounding personal indiscretions with a young woman White House intern, Clinton was the second U.S. president to be impeached by the House of Representatives. He was tried in the Senate and found not guilty of the charges brought against him. He apologized to the nation for his actions and continued to have unprecedented popular approval ratings for his job as president.
48
+
49
+ In the world, he successfully dispatched peace keeping forces to war-torn Bosnia and bombed Iraq when Saddam Hussein stopped United Nations inspections for evidence of nuclear, chemical, and biological weapons. He became a global proponent for an expanded NATO, more open international trade, and a worldwide campaign against drug trafficking. He drew huge crowds when he traveled through South America, Europe, Russia, Africa, and China, advocating U.S. style freedom.
50
+
51
+ George Bush brought to the White House a dedication to traditional American values and a determination to direct them toward making the United States "a kinder and gentler nation." In his Inaugural Address he pledged in "a moment rich with promise" to use American strength as "a force for good."
52
+
53
+ Coming from a family with a tradition of public service, George Herbert Walker Bush felt the responsibility to make his contribution both in time of war and in peace. Born in Milton, Massachusetts, on June 12, 1924, he became a student leader at Phillips Academy in Andover. On his 18th birthday he enlisted in the armed forces. The youngest pilot in the Navy when he received his wings, he flew 58 combat missions during World War II. On one mission over the Pacific as a torpedo bomber pilot he was shot down by Japanese antiaircraft fire and was rescued from the water by a U. S. submarine. He was awarded the Distinguished Flying Cross for bravery in action.
54
+
55
+ Bush next turned his energies toward completing his education and raising a family. In January 1945 he married Barbara Pierce. They had six children-- George, Robin (who died as a child), John (known as Jeb), Neil, Marvin, and Dorothy.
56
+
57
+ At Yale University he excelled both in sports and in his studies; he was captain of the baseball team and a member of Phi Beta Kappa. After graduation Bush embarked on a career in the oil industry of West Texas.
58
+
59
+ Like his father, Prescott Bush, who was elected a Senator from Connecticut in 1952, George became interested in public service and politics. He served two terms as a Representative to Congress from Texas. Twice he ran unsuccessfully for the Senate. Then he was appointed to a series of high-level positions: Ambassador to the United Nations, Chairman of the Republican National Committee, Chief of the U. S. Liaison Office in the People's Republic of China, and Director of the Central Intelligence Agency.
60
+
61
+ In 1980 Bush campaigned for the Republican nomination for President. He lost, but was chosen as a running mate by Ronald Reagan. As Vice President, Bush had responsibility in several domestic areas, including Federal deregulation and anti-drug programs, and visited scores of foreign countries. In 1988 Bush won the Republican nomination for President and, with Senator Dan Quayle of Indiana as his running mate, he defeated Massachusetts Governor Michael Dukakis in the general election.
62
+
63
+ Bush faced a dramatically changing world, as the Cold War ended after 40 bitter years, the Communist empire broke up, and the Berlin Wall fell. The Soviet Union ceased to exist; and reformist President Mikhail Gorbachev, whom Bush had supported, resigned. While Bush hailed the march of democracy, he insisted on restraint in U. S. policy toward the group of new nations.
64
+
65
+ In other areas of foreign policy, President Bush sent American troops into Panama to overthrow the corrupt regime of General Manuel Noriega, who was threatening the security of the canal and the Americans living there. Noriega was brought to the United States for trial as a drug trafficker.
66
+
67
+ Bush's greatest test came when Iraqi President Saddam Hussein invaded Kuwait, then threatened to move into Saudi Arabia. Vowing to free Kuwait, Bush rallied the United Nations, the U. S. people, and Congress and sent 425,000 American troops. They were joined by 118,000 troops from allied nations. After weeks of air and missile bombardment, the 100-hour land battle dubbed Desert Storm routed Iraq's million-man army.
68
+
69
+ Despite unprecedented popularity from this military and diplomatic triumph, Bush was unable to withstand discontent at home from a faltering economy, rising violence in inner cities, and continued high deficit spending. In 1992 he lost his bid for reelection to Democrat William Clinton.
70
+
71
+
72
+ At the end of his two terms in office, Ronald Reagan viewed with satisfaction the achievements of his innovative program known as the Reagan Revolution, which aimed to reinvigorate the American people and reduce their reliance upon Government. He felt he had fulfilled his campaign pledge of 1980 to restore "the great, confident roar of American progress and growth and optimism."
73
+
74
+ On February 6, 1911, Ronald Wilson Reagan was born to Nelle and John Reagan in Tampico, Illinois. He attended high school in nearby Dixon and then worked his way through Eureka College. There, he studied economics and sociology, played on the football team, and acted in school plays. Upon graduation, he became a radio sports announcer. A screen test in 1937 won him a contract in Hollywood. During the next two decades he appeared in 53 films.
75
+
76
+ From his first marriage to actress Jane Wyman, he had two children, Maureen and Michael. Maureen passed away in 2001. In 1952 he married Nancy Davis, who was also an actress, and they had two children, Patricia Ann and Ronald Prescott.
77
+
78
+ As president of the Screen Actors Guild, Reagan became embroiled in disputes over the issue of Communism in the film industry; his political views shifted from liberal to conservative. He toured the country as a television host, becoming a spokesman for conservatism. In 1966 he was elected Governor of California by a margin of a million votes; he was re-elected in 1970.
79
+
80
+ Ronald Reagan won the Republican Presidential nomination in 1980 and chose as his running mate former Texas Congressman and United Nations Ambassador George Bush. Voters troubled by inflation and by the year-long confinement of Americans in Iran swept the Republican ticket into office. Reagan won 489 electoral votes to 49 for President Jimmy Carter.
81
+
82
+ On January 20, 1981, Reagan took office. Only 69 days later he was shot by a would-be assassin, but quickly recovered and returned to duty. His grace and wit during the dangerous incident caused his popularity to soar.
83
+
84
+ Dealing skillfully with Congress, Reagan obtained legislation to stimulate economic growth, curb inflation, increase employment, and strengthen national defense. He embarked upon a course of cutting taxes and Government expenditures, refusing to deviate from it when the strengthening of defense forces led to a large deficit.
85
+
86
+ A renewal of national self-confidence by 1984 helped Reagan and Bush win a second term with an unprecedented number of electoral votes. Their victory turned away Democratic challengers Walter F. Mondale and Geraldine Ferraro.
87
+
88
+ In 1986 Reagan obtained an overhaul of the income tax code, which eliminated many deductions and exempted millions of people with low incomes. At the end of his administration, the Nation was enjoying its longest recorded period of peacetime prosperity without recession or depression.
89
+
90
+ In foreign policy, Reagan sought to achieve "peace through strength." During his two terms he increased defense spending 35 percent, but sought to improve relations with the Soviet Union. In dramatic meetings with Soviet leader Mikhail Gorbachev, he negotiated a treaty that would eliminate intermediate-range nuclear missiles. Reagan declared war against international terrorism, sending American bombers against Libya after evidence came out that Libya was involved in an attack on American soldiers in a West Berlin nightclub.
91
+
92
+ By ordering naval escorts in the Persian Gulf, he maintained the free flow of oil during the Iran-Iraq war. In keeping with the Reagan Doctrine, he gave support to anti-Communist insurgencies in Central America, Asia, and Africa.
93
+
94
+ Overall, the Reagan years saw a restoration of prosperity, and the goal of peace through strength seemed to be within grasp.
95
+
96
+ Jimmy Carter aspired to make Government "competent and compassionate," responsive to the American people and their expectations. His achievements were notable, but in an era of rising energy costs, mounting inflation, and continuing tensions, it was impossible for his administration to meet these high expectations.
97
+
98
+ Carter, who has rarely used his full name--James Earl Carter, Jr.--was born October 1, 1924, in Plains, Georgia. Peanut farming, talk of politics, and devotion to the Baptist faith were mainstays of his upbringing. Upon graduation in 1946 from the Naval Academy in Annapolis, Maryland, Carter married Rosalynn Smith. The Carters have three sons, John William (Jack), James Earl III (Chip), Donnel Jeffrey (Jeff), and a daughter, Amy Lynn.
99
+
100
+ After seven years' service as a naval officer, Carter returned to Plains. In 1962 he entered state politics, and eight years later he was elected Governor of Georgia. Among the new young southern governors, he attracted attention by emphasizing ecology, efficiency in government, and the removal of racial barriers.
101
+
102
+ Carter announced his candidacy for President in December 1974 and began a two-year campaign that gradually gained momentum. At the Democratic Convention, he was nominated on the first ballot. He chose Senator Walter F. Mondale of Minnesota as his running mate. Carter campaigned hard against President Gerald R. Ford, debating with him three times. Carter won by 297 electoral votes to 241 for Ford.
103
+
104
+ Carter worked hard to combat the continuing economic woes of inflation and unemployment. By the end of his administration, he could claim an increase of nearly eight million jobs and a decrease in the budget deficit, measured in percentage of the gross national product. Unfortunately, inflation and interest rates were at near record highs, and efforts to reduce them caused a short recession.
105
+
106
+ Carter could point to a number of achievements in domestic affairs. He dealt with the energy shortage by establishing a national energy policy and by decontrolling domestic petroleum prices to stimulate production. He prompted Government efficiency through civil service reform and proceeded with deregulation of the trucking and airline industries. He sought to improve the environment. His expansion of the national park system included protection of 103 million acres of Alaskan lands. To increase human and social services, he created the Department of Education, bolstered the Social Security system, and appointed record numbers of women, blacks, and Hispanics to Government jobs.
107
+
108
+ In foreign affairs, Carter set his own style. His championing of human rights was coldly received by the Soviet Union and some other nations. In the Middle East, through the Camp David agreement of 1978, he helped bring amity between Egypt and Israel. He succeeded in obtaining ratification of the Panama Canal treaties. Building upon the work of predecessors, he established full diplomatic relations with the People's Republic of China and completed negotiation of the SALT II nuclear limitation treaty with the Soviet Union.
109
+
110
+ There were serious setbacks, however. The Soviet invasion of Afghanistan caused the suspension of plans for ratification of the SALT II pact. The seizure as hostages of the U. S. embassy staff in Iran dominated the news during the last 14 months of the administration. The consequences of Iran's holding Americans captive, together with continuing inflation at home, contributed to Carter's defeat in 1980. Even then, he continued the difficult negotiations over the hostages. Iran finally released the 52 Americans the same day Carter left office.
111
+
112
+
113
+ At 2:30 on the morning of August 3, 1923, while visiting in Vermont, Calvin Coolidge received word that he was President. By the light of a kerosene lamp, his father, who was a notary public, administered the oath of office as Coolidge placed his hand on the family Bible.
114
+
115
+ Coolidge was "distinguished for character more than for heroic achievement," wrote a Democratic admirer, Alfred E. Smith. "His great task was to restore the dignity and prestige of the Presidency when it had reached the lowest ebb in our history ... in a time of extravagance and waste...."
116
+
117
+ Born in Plymouth, Vermont, on July 4, 1872, Coolidge was the son of a village storekeeper. He was graduated from Amherst College with honors, and entered law and politics in Northampton, Massachusetts. Slowly, methodically, he went up the political ladder from councilman in Northampton to Governor of Massachusetts, as a Republican. En route he became thoroughly conservative.
118
+
119
+ As President, Coolidge demonstrated his determination to preserve the old moral and economic precepts amid the material prosperity which many Americans were enjoying. He refused to use Federal economic power to check the growing boom or to ameliorate the depressed condition of agriculture and certain industries. His first message to Congress in December 1923 called for isolation in foreign policy, and for tax cuts, economy, and limited aid to farmers.
120
+
121
+ He rapidly became popular. In 1924, as the beneficiary of what was becoming known as "Coolidge prosperity," he polled more than 54 percent of the popular vote.
122
+
123
+ In his Inaugural he asserted that the country had achieved "a state of contentment seldom before seen," and pledged himself to maintain the status quo. In subsequent years he twice vetoed farm relief bills, and killed a plan to produce cheap Federal electric power on the Tennessee River.
124
+
125
+ The political genius of President Coolidge, Walter Lippmann pointed out in 1926, was his talent for effectively doing nothing: "This active inactivity suits the mood and certain of the needs of the country admirably. It suits all the business interests which want to be let alone.... And it suits all those who have become convinced that government in this country has become dangerously complicated and top-heavy...."
126
+
127
+ Coolidge was both the most negative and remote of Presidents, and the most accessible. He once explained to Bernard Baruch why he often sat silently through interviews: "Well, Baruch, many times I say only 'yes' or 'no' to people. Even that is too much. It winds them up for twenty minutes more."
128
+
129
+ But no President was kinder in permitting himself to be photographed in Indian war bonnets or cowboy dress, and in greeting a variety of delegations to the White House.
130
+
131
+ Both his dry Yankee wit and his frugality with words became legendary. His wife, Grace Goodhue Coolidge, recounted that a young woman sitting next to Coolidge at a dinner party confided to him she had bet she could get at least three words of conversation from him. Without looking at her he quietly retorted, "You lose." And in 1928, while vacationing in the Black Hills of South Dakota, he issued the most famous of his laconic statements, "I do not choose to run for President in 1928."
132
+
133
+ By the time the disaster of the Great Depression hit the country, Coolidge was in retirement. Before his death in January 1933, he confided to an old friend, ". . . I feel I no longer fit in with these times."
134
+
135
+ When Gerald R. Ford took the oath of office on August 9, 1974, he declared, "I assume the Presidency under extraordinary circumstances.... This is an hour of history that troubles our minds and hurts our hearts."
136
+
137
+ It was indeed an unprecedented time. He had been the first Vice President chosen under the terms of the Twenty-fifth Amendment and, in the aftermath of the Watergate scandal, was succeeding the first President ever to resign.
138
+
139
+ Ford was confronted with almost insuperable tasks. There were the challenges of mastering inflation, reviving a depressed economy, solving chronic energy shortages, and trying to ensure world peace.
140
+
141
+ The President acted to curb the trend toward Government intervention and spending as a means of solving the problems of American society and the economy. In the long run, he believed, this shift would bring a better life for all Americans.
142
+
143
+ Ford's reputation for integrity and openness had made him popular during his 25 years in Congress. From 1965 to 1973, he was House Minority Leader. Born in Omaha, Nebraska, in 1913, he grew up in Grand Rapids, Michigan. He starred on the University of Michigan football team, then went to Yale, where he served as assistant coach while earning his law degree. During World War II he attained the rank of lieutenant commander in the Navy. After the war he returned to Grand Rapids, where he began the practice of law, and entered Republican politics. A few weeks before his election to Congress in 1948, he married Elizabeth Bloomer. They have four children: Michael, John, Steven, and Susan.
144
+
145
+ As President, Ford tried to calm earlier controversies by granting former President Nixon a full pardon. His nominee for Vice President, former Governor Nelson Rockefeller of New York, was the second person to fill that office by appointment. Gradually, Ford selected a cabinet of his own.
146
+
147
+ Ford established his policies during his first year in office, despite opposition from a heavily Democratic Congress. His first goal was to curb inflation. Then, when recession became the Nation's most serious domestic problem, he shifted to measures aimed at stimulating the economy. But, still fearing inflation, Ford vetoed a number of non-military appropriations bills that would have further increased the already heavy budgetary deficit. During his first 14 months as President he vetoed 39 measures. His vetoes were usually sustained.
148
+
149
+ Ford continued as he had in his Congressional days to view himself as "a moderate in domestic affairs, a conservative in fiscal affairs, and a dyed-in-the-wool internationalist in foreign affairs." A major goal was to help business operate more freely by reducing taxes upon it and easing the controls exercised by regulatory agencies. "We...declared our independence 200 years ago, and we are not about to lose it now to paper shufflers and computers," he said.
150
+
151
+ In foreign affairs Ford acted vigorously to maintain U. S. power and prestige after the collapse of Cambodia and South Viet Nam. Preventing a new war in the Middle East remained a major objective; by providing aid to both Israel and Egypt, the Ford Administration helped persuade the two countries to accept an interim truce agreement. Detente with the Soviet Union continued. President Ford and Soviet leader Leonid I. Brezhnev set new limitations upon nuclear weapons.
152
+
153
+ President Ford won the Republican nomination for the Presidency in 1976, but lost the election to his Democratic opponent, former Governor Jimmy Carter of Georgia.
154
+
155
+ On Inauguration Day, President Carter began his speech: "For myself and for our Nation, I want to thank my predecessor for all he has done to heal our land." A grateful people concurred.
156
+
157
+ Before his nomination, Warren G. Harding declared, "America's present need is not heroics, but healing; not nostrums, but normalcy; not revolution, but restoration; not agitation, but adjustment; not surgery, but serenity; not the dramatic, but the dispassionate; not experiment, but equipoise; not submergence in internationality, but sustainment in triumphant nationality...."
158
+
159
+ A Democratic leader, William Gibbs McAdoo, called Harding's speeches "an army of pompous phrases moving across the landscape in search of an idea." Their very murkiness was effective, since Harding's pronouncements remained unclear on the League of Nations, in contrast to the impassioned crusade of the Democratic candidates, Governor James M. Cox of Ohio and Franklin D. Roosevelt.
160
+
161
+ Thirty-one distinguished Republicans had signed a manifesto assuring voters that a vote for Harding was a vote for the League. But Harding interpreted his election as a mandate to stay out of the League of Nations.
162
+
163
+ Harding, born near Marion, Ohio, in 1865, became the publisher of a newspaper. He married a divorcee, Mrs. Florence Kling De Wolfe. He was a trustee of the Trinity Baptist Church, a director of almost every important business, and a leader in fraternal organizations and charitable enterprises.
164
+
165
+ He organized the Citizen's Cornet Band, available for both Republican and Democratic rallies; "I played every instrument but the slide trombone and the E-flat cornet," he once remarked.
166
+
167
+ Harding's undeviating Republicanism and vibrant speaking voice, plus his willingness to let the machine bosses set policies, led him far in Ohio politics. He served in the state Senate and as Lieutenant Governor, and unsuccessfully ran for Governor. He delivered the nominating address for President Taft at the 1912 Republican Convention. In 1914 he was elected to the Senate, which he found "a very pleasant place."
168
+
169
+ An Ohio admirer, Harry Daugherty, began to promote Harding for the 1920 Republican nomination because, he later explained, "He looked like a President."
170
+
171
+ Thus a group of Senators, taking control of the 1920 Republican Convention when the principal candidates deadlocked, turned to Harding. He won the Presidential election by an unprecedented landslide of 60 percent of the popular vote.
172
+
173
+ Republicans in Congress easily got the President's signature on their bills. They eliminated wartime controls and slashed taxes, established a Federal budget system, restored the high protective tariff, and imposed tight limitations upon immigration.
174
+
175
+ By 1923 the postwar depression seemed to be giving way to a new surge of prosperity, and newspapers hailed Harding as a wise statesman carrying out his campaign promise--"Less government in business and more business in government."
176
+
177
+ Behind the facade, not all of Harding's Administration was so impressive. Word began to reach the President that some of his friends were using their official positions for their own enrichment. Alarmed, he complained, "My...friends...they're the ones that keep me walking the floors nights!"
178
+
179
+ Looking wan and depressed, Harding journeyed westward in the summer of 1923, taking with him his upright Secretary of Commerce, Herbert Hoover. "If you knew of a great scandal in our administration," he asked Hoover, "would you for the good of the country and the party expose it publicly or would you bury it?" Hoover urged publishing it, but Harding feared the political repercussions.
180
+
181
+ He did not live to find out how the public would react to the scandals of his administration. In August of 1923, he died in San Francisco of a heart attack.
182
+
183
+ Reconciliation was the first goal set by President Richard M. Nixon. The Nation was painfully divided, with turbulence in the cities and war overseas. During his Presidency, Nixon succeeded in ending American fighting in Viet Nam and improving relations with the U.S.S.R. and China. But the Watergate scandal brought fresh divisions to the country and ultimately led to his resignation.
184
+
185
+ His election in 1968 had climaxed a career unusual on two counts: his early success and his comeback after being defeated for President in 1960 and for Governor of California in 1962.
186
+
187
+ Born in California in 1913, Nixon had a brilliant record at Whittier College and Duke University Law School before beginning the practice of law. In 1940, he married Patricia Ryan; they had two daughters, Patricia (Tricia) and Julie. During World War II, Nixon served as a Navy lieutenant commander in the Pacific.
188
+
189
+ On leaving the service, he was elected to Congress from his California district. In 1950, he won a Senate seat. Two years later, General Eisenhower selected Nixon, age 39, to be his running mate.
190
+
191
+ As Vice President, Nixon took on major duties in the Eisenhower Administration. Nominated for President by acclamation in 1960, he lost by a narrow margin to John F. Kennedy. In 1968, he again won his party's nomination, and went on to defeat Vice President Hubert H. Humphrey and third-party candidate George C. Wallace.
192
+
193
+ His accomplishments while in office included revenue sharing, the end of the draft, new anticrime laws, and a broad environmental program. As he had promised, he appointed Justices of conservative philosophy to the Supreme Court. One of the most dramatic events of his first term occurred in 1969, when American astronauts made the first moon landing.
194
+
195
+ Some of his most acclaimed achievements came in his quest for world stability. During visits in 1972 to Beijing and Moscow, he reduced tensions with China and the U.S.S.R. His summit meetings with Russian leader Leonid I. Brezhnev produced a treaty to limit strategic nuclear weapons. In January 1973, he announced an accord with North Viet Nam to end American involvement in Indochina. In 1974, his Secretary of State, Henry Kissinger, negotiated disengagement agreements between Israel and
196
+ its opponents, Egypt and Syria.
197
+
198
+ In his 1972 bid for office, Nixon defeated Democratic candidate George McGovern by one of the widest margins on record.
199
+
200
+ Within a few months, his administration was embattled over the so-called "Watergate" scandal, stemming from a break-in at the offices of the Democratic National Committee during the 1972 campaign. The break-in was traced to officials of the Committee to Re-elect the President. A number of administration officials resigned; some were later convicted of offenses connected with efforts to cover up the affair. Nixon denied any personal involvement, but the courts forced him to
201
+ yield tape recordings which indicated that he had, in fact, tried to divert the investigation.
202
+
203
+ As a result of unrelated scandals in Maryland, Vice President Spiro T. Agnew resigned in 1973. Nixon nominated, and Congress approved, House Minority Leader Gerald R. Ford as Vice President.
204
+
205
+ Faced with what seemed almost certain impeachment, Nixon announced on August 8, 1974, that he would resign the next day to begin "that process of healing which is so desperately needed in America."
206
+
207
+ In his last years, Nixon gained praise as an elder statesman. By the time of his death on April 22, 1994, he had written numerous books on his experiences in public life and on foreign policy.
208
+
209
+ "A Great Society" for the American people and their fellow men elsewhere was the vision of Lyndon B. Johnson. In his first years of office he obtained passage of one of the most extensive legislative programs in the Nation's history. Maintaining collective security, he carried on the rapidly growing struggle to restrain Communist encroachment in Viet Nam.
210
+
211
+ Johnson was born on August 27, 1908, in central Texas, not far from Johnson City, which his family had helped settle. He felt the pinch of rural poverty as he grew up, working his way through Southwest Texas State Teachers College (now known as Texas State University-San Marcos); he learned compassion for the poverty of others when he taught students of Mexican descent.
212
+
213
+ In 1937 he campaigned successfully for the House of Representatives on a New Deal platform, effectively aided by his wife, the former Claudia "Lady Bird" Taylor, whom he had married in 1934.
214
+
215
+ During World War II he served briefly in the Navy as a lieutenant commander, winning a Silver Star in the South Pacific. After six terms in the House, Johnson was elected to the Senate in 1948. In 1953, he became the youngest Minority Leader in Senate history, and the following year, when the Democrats won control, Majority Leader. With rare skill he obtained passage of a number of key Eisenhower measures.
216
+
217
+ In the 1960 campaign, Johnson, as John F. Kennedy's running mate, was elected Vice President. On November 22, 1963, when Kennedy was assassinated, Johnson was sworn in as President.
218
+
219
+ First he obtained enactment of the measures President Kennedy had been urging at the time of his death--a new civil rights bill and a tax cut. Next he urged the Nation "to build a great society, a place where the meaning of man's life matches the marvels of man's labor." In 1964, Johnson won the Presidency with 61 percent of the vote and had the widest popular margin in American history--more than 15,000,000 votes.
220
+
221
+ The Great Society program became Johnson's agenda for Congress in January 1965: aid to education, attack on disease, Medicare, urban renewal, beautification, conservation, development of depressed regions, a wide-scale fight against poverty, control and prevention of crime and delinquency, removal of obstacles to the right to vote. Congress, at times augmenting or amending, rapidly enacted Johnson's recommendations. Millions of elderly people found succor through the 1965
222
+ Medicare amendment to the Social Security Act.
223
+
224
+ Under Johnson, the country made spectacular explorations of space in a program he had championed since its start. When three astronauts successfully orbited the moon in December 1968, Johnson congratulated them: "You've taken ... all of us, all over the world, into a new era. . . . "
225
+
226
+ Nevertheless, two overriding crises had been gaining momentum since 1965. Despite the beginning of new antipoverty and anti-discrimination programs, unrest and rioting in black ghettos troubled the Nation. President Johnson steadily exerted his influence against segregation and on behalf of law and order, but there was no early solution.
227
+
228
+ The other crisis arose from Viet Nam. Despite Johnson's efforts to end Communist aggression and achieve a settlement, fighting continued. Controversy over the war had become acute by the end of March 1968, when he limited the bombing of North Viet Nam in order to initiate negotiations. At the same time, he startled the world by withdrawing as a candidate for re-election so that he might devote his full efforts, unimpeded by politics, to the quest for peace.
229
+
230
+ When he left office, peace talks were under way; he did not live to see them successful, but died suddenly of a heart attack at his Texas ranch on January 22, 1973.
231
+
232
+ On November 22, 1963, when he was hardly past his first thousand days in office, John Fitzgerald Kennedy was killed by an assassin's bullets as his motorcade wound through Dallas, Texas. Kennedy was the youngest man elected President; he was the youngest to die.
233
+
234
+ Of Irish descent, he was born in Brookline, Massachusetts, on May 29, 1917. Graduating from Harvard in 1940, he entered the Navy. In 1943, when his PT boat was rammed and sunk by a Japanese destroyer, Kennedy, despite grave injuries, led the survivors through perilous waters to safety.
235
+
236
+ Back from the war, he became a Democratic Congressman from the Boston area, advancing in 1953 to the Senate. He married Jacqueline Bouvier on September 12, 1953. In 1955, while recuperating from a back operation, he wrote Profiles in Courage, which won the Pulitzer Prize in history.
237
+
238
+ In 1956 Kennedy almost gained the Democratic nomination for Vice President, and four years later was a first-ballot nominee for President. Millions watched his television debates with the Republican candidate, Richard M. Nixon. Winning by a narrow margin in the popular vote, Kennedy became the first Roman Catholic President.
239
+
240
+ His Inaugural Address offered the memorable injunction: "Ask not what your country can do for you--ask what you can do for your country." As President, he set out to redeem his campaign pledge to get America moving again. His economic programs launched the country on its longest sustained expansion since World War II; before his death, he laid plans for a massive assault on persisting pockets of privation and poverty.
241
+
242
+ Responding to ever more urgent demands, he took vigorous action in the cause of equal rights, calling for new civil rights legislation. His vision of America extended to the quality of the national culture and the central role of the arts in a vital society.
243
+
244
+ He wished America to resume its old mission as the first nation dedicated to the revolution of human rights. With the Alliance for Progress and the Peace Corps, he brought American idealism to the aid of developing nations. But the hard reality of the Communist challenge remained.
245
+
246
+ Shortly after his inauguration, Kennedy permitted a band of Cuban exiles, already armed and trained, to invade their homeland. The attempt to overthrow the regime of Fidel Castro was a failure. Soon thereafter, the Soviet Union renewed its campaign against West Berlin. Kennedy replied by reinforcing the Berlin garrison and increasing the Nation's military strength, including new efforts in outer space. Confronted by this reaction, Moscow, after the erection of the Berlin Wall, relaxed its
247
+ pressure in central Europe.
248
+
249
+ Instead, the Russians now sought to install nuclear missiles in Cuba. When this was discovered by air reconnaissance in October 1962, Kennedy imposed a quarantine on all offensive weapons bound for Cuba. While the world trembled on the brink of nuclear war, the Russians backed down and agreed to take the missiles away. The American response to the Cuban crisis evidently persuaded Moscow of the futility of nuclear blackmail.
250
+
251
+ Kennedy now contended that both sides had a vital interest in stopping the spread of nuclear weapons and slowing the arms race--a contention which led to the test ban treaty of 1963. The months after the Cuban crisis showed significant progress toward his goal of "a world of law and free choice, banishing the world of war and coercion." His administration thus saw the beginning of new hope for both the equal rights of Americans and the peace of the world.
252
+
253
+ Bringing to the Presidency his prestige as commanding general of the victorious forces in Europe during World War II, Dwight D. Eisenhower obtained a truce in Korea and worked incessantly during his two terms to ease the tensions of the Cold War. He pursued the moderate policies of "Modern Republicanism," pointing out as he left office, "America is today the strongest, most influential, and most productive nation in the world."
254
+
255
+ Born in Texas in 1890, brought up in Abilene, Kansas, Eisenhower was the third of seven sons. He excelled in sports in high school, and received an appointment to West Point. Stationed in Texas as a second lieutenant, he met Mamie Geneva Doud, whom he married in 1916.
256
+
257
+ In his early Army career, he excelled in staff assignments, serving under Generals John J. Pershing, Douglas MacArthur, and Walter Krueger. After Pearl Harbor, General George C. Marshall called him to Washington for a war plans assignment. He commanded the Allied Forces landing in North Africa in November 1942; on D-Day, 1944, he was Supreme Commander of the troops invading France.
258
+
259
+ After the war, he became President of Columbia University, then took leave to assume supreme command over the new NATO forces being assembled in 1951. Republican emissaries to his headquarters near Paris persuaded him to run for President in 1952.
260
+
261
+ "I like Ike" was an irresistible slogan; Eisenhower won a sweeping victory.
262
+
263
+ Negotiating from military strength, he tried to reduce the strains of the Cold War. In 1953, the signing of a truce brought an armed peace along the border of South Korea. The death of Stalin the same year caused shifts in relations with Russia.
264
+
265
+ New Russian leaders consented to a peace treaty neutralizing Austria. Meanwhile, both Russia and the United States had developed hydrogen bombs. With the threat of such destructive force hanging over the world, Eisenhower, with the leaders of the British, French, and Russian governments, met at Geneva in July 1955.
266
+
267
+ The President proposed that the United States and Russia exchange blueprints of each other's military establishments and "provide within our countries facilities for aerial photography to the other country." The Russians greeted the proposal with silence, but were so cordial throughout the meetings that tensions relaxed.
268
+
269
+ Suddenly, in September 1955, Eisenhower suffered a heart attack in Denver, Colorado. After seven weeks he left the hospital, and in February 1956 doctors reported his recovery. In November he was elected for his second term.
270
+
271
+ In domestic policy the President pursued a middle course, continuing most of the New Deal and Fair Deal programs, emphasizing a balanced budget. As desegregation of schools began, he sent troops into Little Rock, Arkansas, to assure compliance with the orders of a Federal court; he also ordered the complete desegregation of the Armed Forces. "There must be no second class citizens in this country," he wrote.
272
+
273
+ Eisenhower concentrated on maintaining world peace. He watched with pleasure the development of his "atoms for peace" program--the loan of American uranium to "have not" nations for peaceful purposes.
274
+
275
+ Before he left office in January 1961, for his farm in Gettysburg, he urged the necessity of maintaining an adequate military strength, but cautioned that vast, long-continued military expenditures could breed potential dangers to our way of life. He concluded with a prayer for peace "in the goodness of time." Both themes remained timely and urgent when he died, after a long illness, on March 28, 1969.
lib/patterns/stopwords.txt ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !!
2
+ ?!
3
+ ??
4
+ !?
5
+ `
6
+ ``
7
+ ''
8
+ -lrb-
9
+ -rrb-
10
+ -lsb-
11
+ -rsb-
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
+ 'll
40
+ 's
41
+ 'm
42
+ a
43
+ about
44
+ above
45
+ after
46
+ again
47
+ against
48
+ all
49
+ am
50
+ an
51
+ and
52
+ any
53
+ are
54
+ aren't
55
+ as
56
+ at
57
+ be
58
+ because
59
+ been
60
+ before
61
+ being
62
+ below
63
+ between
64
+ both
65
+ but
66
+ by
67
+ can
68
+ can't
69
+ cannot
70
+ could
71
+ couldn't
72
+ did
73
+ didn't
74
+ do
75
+ does
76
+ doesn't
77
+ doing
78
+ don't
79
+ down
80
+ during
81
+ each
82
+ few
83
+ for
84
+ from
85
+ further
86
+ had
87
+ hadn't
88
+ has
89
+ hasn't
90
+ have
91
+ haven't
92
+ having
93
+ he
94
+ he'd
95
+ he'll
96
+ he's
97
+ her
98
+ here
99
+ here's
100
+ hers
101
+ herself
102
+ him
103
+ himself
104
+ his
105
+ how
106
+ how's
107
+ i
108
+ i'd
109
+ i'll
110
+ i'm
111
+ i've
112
+ if
113
+ in
114
+ into
115
+ is
116
+ isn't
117
+ it
118
+ it's
119
+ its
120
+ itself
121
+ let's
122
+ me
123
+ more
124
+ most
125
+ mustn't
126
+ my
127
+ myself
128
+ no
129
+ nor
130
+ not
131
+ of
132
+ off
133
+ on
134
+ once
135
+ only
136
+ or
137
+ other
138
+ ought
139
+ our
140
+ ours
141
+ ourselves
142
+ out
143
+ over
144
+ own
145
+ same
146
+ shan't
147
+ she
148
+ she'd
149
+ she'll
150
+ she's
151
+ should
152
+ shouldn't
153
+ so
154
+ some
155
+ such
156
+ than
157
+ that
158
+ that's
159
+ the
160
+ their
161
+ theirs
162
+ them
163
+ themselves
164
+ then
165
+ there
166
+ there's
167
+ these
168
+ they
169
+ they'd
170
+ they'll
171
+ they're
172
+ they've
173
+ this
174
+ those
175
+ through
176
+ to
177
+ too
178
+ under
179
+ until
180
+ up
181
+ very
182
+ was
183
+ wasn't
184
+ we
185
+ we'd
186
+ we'll
187
+ we're
188
+ we've
189
+ were
190
+ weren't
191
+ what
192
+ what's
193
+ when
194
+ when's
195
+ where
196
+ where's
197
+ which
198
+ while
199
+ who
200
+ who's
201
+ whom
202
+ why
203
+ why's
204
+ with
205
+ won't
206
+ would
207
+ wouldn't
208
+ you
209
+ you'd
210
+ you'll
211
+ you're
212
+ you've
213
+ your
214
+ yours
215
+ yourself
216
+ yourselves
217
+ ###
218
+ return
219
+ arent
220
+ cant
221
+ couldnt
222
+ didnt
223
+ doesnt
224
+ dont
225
+ hadnt
226
+ hasnt
227
+ havent
228
+ hes
229
+ heres
230
+ hows
231
+ im
232
+ isnt
233
+ its
234
+ lets
235
+ mustnt
236
+ shant
237
+ shes
238
+ shouldnt
239
+ thats
240
+ theres
241
+ theyll
242
+ theyre
243
+ theyve
244
+ wasnt
245
+ were
246
+ werent
247
+ whats
248
+ whens
249
+ wheres
250
+ whos
251
+ whys
252
+ wont
253
+ wouldnt
254
+ youd
255
+ youll
256
+ youre
257
+ youve
lib/pom.xml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
+ <modelVersion>4.0.0</modelVersion>
3
+ <groupId>edu.stanford.nlp</groupId>
4
+ <artifactId>stanford-corenlp</artifactId>
5
+ <version>3.6.0</version>
6
+ <packaging>jar</packaging>
7
+ <name>Stanford CoreNLP</name>
8
+ <description>Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.</description>
9
+ <url>http://nlp.stanford.edu/software/corenlp.shtml</url>
10
+ <licenses>
11
+ <license>
12
+ <name>GNU General Public License Version 3</name>
13
+ <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
14
+ </license>
15
+ </licenses>
16
+ <scm>
17
+ <url>http://nlp.stanford.edu/software/stanford-corenlp-2015-12-06.zip</url>
18
+ <connection>http://nlp.stanford.edu/software/stanford-corenlp-2015-12-06.zip</connection>
19
+ </scm>
20
+ <developers>
21
+ <developer>
22
+ <id>christopher.manning</id>
23
+ <name>Christopher Manning</name>
24
+ <email>manning@stanford.edu</email>
25
+ </developer>
26
+ <developer>
27
+ <id>jason.bolton</id>
28
+ <name>Jason Bolton</name>
29
+ <email>jebolton@stanford.edu</email>
30
+ </developer>
31
+ </developers>
32
+ <properties>
33
+ <maven.compiler.source>1.8</maven.compiler.source>
34
+ <maven.compiler.target>1.8</maven.compiler.target>
35
+ <encoding>UTF-8</encoding>
36
+ </properties>
37
+ <dependencies>
38
+ <dependency>
39
+ <groupId>com.io7m.xom</groupId>
40
+ <artifactId>xom</artifactId>
41
+ <version>1.2.10</version>
42
+ </dependency>
43
+ <dependency>
44
+ <groupId>joda-time</groupId>
45
+ <artifactId>joda-time</artifactId>
46
+ <version>2.9</version>
47
+ </dependency>
48
+ <dependency>
49
+ <groupId>de.jollyday</groupId>
50
+ <artifactId>jollyday</artifactId>
51
+ <version>0.4.7</version>
52
+ </dependency>
53
+ <dependency>
54
+ <groupId>com.googlecode.efficient-java-matrix-library</groupId>
55
+ <artifactId>ejml</artifactId>
56
+ <version>0.23</version>
57
+ </dependency>
58
+ <dependency>
59
+ <groupId>javax.json</groupId>
60
+ <artifactId>javax.json-api</artifactId>
61
+ <version>1.0</version>
62
+ </dependency>
63
+ <dependency>
64
+ <groupId>org.slf4j</groupId>
65
+ <artifactId>slf4j-api</artifactId>
66
+ <version>1.7.12</version>
67
+ </dependency>
68
+ </dependencies>
69
+ <build>
70
+ <sourceDirectory>src</sourceDirectory>
71
+ <plugins>
72
+ <plugin>
73
+ <groupId>org.codehaus.mojo</groupId>
74
+ <artifactId>build-helper-maven-plugin</artifactId>
75
+ <version>1.7</version>
76
+ <executions>
77
+ <execution>
78
+ <id>attach-models</id>
79
+ <phase>package</phase>
80
+ <goals>
81
+ <goal>attach-artifact</goal>
82
+ </goals>
83
+ <configuration>
84
+ <artifacts>
85
+ <artifact>
86
+ <file>${project.basedir}/stanford-corenlp-3.6.0-models.jar</file>
87
+ <type>jar</type>
88
+ <classifier>models</classifier>
89
+ </artifact>
90
+ </artifacts>
91
+ </configuration>
92
+ </execution>
93
+ </executions>
94
+ </plugin>
95
+ </plugins>
96
+ </build>
97
+ </project>
lib/protobuf.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3860d33afd5a88bb3276fc7adf297e9328164f025f5b8f8c73e82876653daad
3
+ size 593982
lib/slf4j-api-1.7.12.jar ADDED
Binary file (32.1 kB). View file