Skip to content

Commit

Permalink
Merge branch 'master' of jamie:/u/nlp/git/javanlp
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor Angeli authored and Stanford NLP committed Dec 4, 2015
1 parent aa82c49 commit 52ca828
Show file tree
Hide file tree
Showing 15 changed files with 479 additions and 950 deletions.
2 changes: 1 addition & 1 deletion doc/corenlp/pom-full.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<version>2.1</version> <version>2.9</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.jollyday</groupId> <groupId>de.jollyday</groupId>
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public void testSimpleSentenceCoNLL() throws IOException {
"2\tcat\tcat\tNN\tO\t4\tnsubj\n" + "2\tcat\tcat\tNN\tO\t4\tnsubj\n" +
"3\tis\tbe\tVBZ\tO\t4\tcop\n" + "3\tis\tbe\tVBZ\tO\t4\tcop\n" +
"4\tfat\tfat\tJJ\tO\t0\tROOT\n" + "4\tfat\tfat\tJJ\tO\t0\tROOT\n" +
"5\t.\t.\t.\tO\t_\t_\n" + "5\t.\t.\t.\tO\t4\tpunct\n" +
"\n" + "\n" +
"1\tThe\tthe\tDT\tO\t2\tdet\n" + "1\tThe\tthe\tDT\tO\t2\tdet\n" +
"2\tdog\tdog\tNN\tO\t4\tnsubj\n" + "2\tdog\tdog\tNN\tO\t4\tnsubj\n" +
"3\tis\tbe\tVBZ\tO\t4\tcop\n" + "3\tis\tbe\tVBZ\tO\t4\tcop\n" +
"4\tlazy\tlazy\tJJ\tO\t0\tROOT\n" + "4\tlazy\tlazy\tJJ\tO\t0\tROOT\n" +
"5\t.\t.\t.\tO\t_\t_\n" + "5\t.\t.\t.\tO\t4\tpunct\n" +
"\n"; "\n";
assertEquals(expected, actual); assertEquals(expected, actual);
} }
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void testSaveSize() throws IOException {
assertNotNull(compressedProto); assertNotNull(compressedProto);


// Check size // Check size
assertTrue("" + compressedProto.length, compressedProto.length < 330000); assertTrue("" + compressedProto.length, compressedProto.length < 340000);
assertTrue("" + uncompressedProto.length, uncompressedProto.length < 1700000); assertTrue("" + uncompressedProto.length, uncompressedProto.length < 1700000);
} }


Expand Down
2 changes: 2 additions & 0 deletions src/edu/stanford/nlp/classify/WeightedRVFDataset.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/ */
public class WeightedRVFDataset<L, F> extends RVFDataset<L, F> { public class WeightedRVFDataset<L, F> extends RVFDataset<L, F> {


private static final long serialVersionUID = 1L;

float[] weights = new float[16]; float[] weights = new float[16];


public WeightedRVFDataset() { public WeightedRVFDataset() {
Expand Down
4 changes: 2 additions & 2 deletions src/edu/stanford/nlp/hcoref/README.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ which can be used in pipeline by adding 'hcoref' annotator.
It includes all deterministic sieves used in dcoref system It includes all deterministic sieves used in dcoref system
(however, some behaviors might be changed to make the system simpler), (however, some behaviors might be changed to make the system simpler),
machine learning sieves based on random forest, machine learning sieves based on random forest,
and Oracle sieves for the system analysis. and oracle sieves for the system analysis.


System training requires hcoref.train package in research, System training requires hcoref.train package in research,
weka 3.7.12 (http://www.cs.waikato.ac.nz/ml/weka/documentation.html), weka 3.7.12 (http://www.cs.waikato.ac.nz/ml/weka/documentation.html),
Expand Down Expand Up @@ -53,7 +53,7 @@ Here is an example code to use the system (See pipeline.HybridCorefAnnotator).
import edu.stanford.nlp.hcoref.data.CorefChain; import edu.stanford.nlp.hcoref.data.CorefChain;
import edu.stanford.nlp.hcoref.data.CorefChain.CorefMention; import edu.stanford.nlp.hcoref.data.CorefChain.CorefMention;
import edu.stanford.nlp.hcoref.data.Document; import edu.stanford.nlp.hcoref.data.Document;

CorefSystem corefSystem = new CorefSystem(props); CorefSystem corefSystem = new CorefSystem(props);
Document corefDoc = corefSystem.docMaker.makeDocument(annotation); Document corefDoc = corefSystem.docMaker.makeDocument(annotation);
Map<Integer, CorefChain> result = corefSystem.coref(corefDoc); Map<Integer, CorefChain> result = corefSystem.coref(corefDoc);
Expand Down
13 changes: 3 additions & 10 deletions src/edu/stanford/nlp/pipeline/CoreNLP.proto
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ message Mention {
optional IndexedWord headIndexedWord = 30; optional IndexedWord headIndexedWord = 30;
optional IndexedWord dependingVerb = 31; optional IndexedWord dependingVerb = 31;
optional IndexedWord headWord = 32; optional IndexedWord headWord = 32;
optional SpeakerInfo speakerInfo = 33;


repeated IndexedWord sentenceWords = 50; repeated IndexedWord sentenceWords = 50;
repeated IndexedWord originalSpan = 51; repeated IndexedWord originalSpan = 51;
Expand Down Expand Up @@ -293,16 +294,8 @@ message IndexedWord {
// //


message SpeakerInfo { message SpeakerInfo {
optional string speakerId = 1; optional string speakerName = 1;
optional string speakerName = 2; repeated int32 mentions = 2;
optional string speakerDesc = 3;
optional bool speakerIdIsNumber = 4;
optional bool speakerIdIsAutoDetermined = 5;


repeated string speakerNameStrings = 6;
repeated int32 mentions = 7;

} }


// //
Expand Down
Loading

0 comments on commit 52ca828

Please sign in to comment.