Skip to content

Commit 7bd7f2f

Browse files
author
Daniel Khashabi
authored
Merge pull request #583 from cowchipkid/master
Single Precision DVector
2 parents a48a4f1 + 6c07e59 commit 7bd7f2f

File tree

48 files changed

+938
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+938
-364
lines changed

big-data-utils/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>illinois-cogcomp-nlp</artifactId>
55
<groupId>edu.illinois.cs.cogcomp</groupId>
6-
<version>3.1.36</version>
6+
<version>4.0.0</version>
77
</parent>
88

99
<modelVersion>4.0.0</modelVersion>
@@ -23,7 +23,7 @@
2323
<dependency>
2424
<groupId>edu.illinois.cs.cogcomp</groupId>
2525
<artifactId>illinois-core-utilities</artifactId>
26-
<version>3.1.36</version>
26+
<version>4.0.0</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>org.xeustechnologies.google-api</groupId>

chunker/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<artifactId>illinois-cogcomp-nlp</artifactId>
44
<groupId>edu.illinois.cs.cogcomp</groupId>
5-
<version>3.1.36</version>
5+
<version>4.0.0</version>
66
</parent>
77

88
<modelVersion>4.0.0</modelVersion>
@@ -13,7 +13,7 @@
1313
<dependency>
1414
<groupId>edu.illinois.cs.cogcomp</groupId>
1515
<artifactId>illinois-core-utilities</artifactId>
16-
<version>3.1.36</version>
16+
<version>4.0.0</version>
1717
</dependency>
1818

1919
<dependency>
@@ -24,12 +24,12 @@
2424
<dependency>
2525
<groupId>edu.illinois.cs.cogcomp</groupId>
2626
<artifactId>LBJava-NLP-tools</artifactId>
27-
<version>3.1.36</version>
27+
<version>4.0.0</version>
2828
</dependency>
2929
<dependency>
3030
<groupId>edu.illinois.cs.cogcomp</groupId>
3131
<artifactId>illinois-pos</artifactId>
32-
<version>3.1.36</version>
32+
<version>4.0.0</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>edu.illinois.cs.cogcomp</groupId>

commasrl/pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>illinois-cogcomp-nlp</artifactId>
66
<groupId>edu.illinois.cs.cogcomp</groupId>
7-
<version>3.1.36</version>
7+
<version>4.0.0</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

@@ -35,48 +35,48 @@
3535
<dependency>
3636
<groupId>edu.illinois.cs.cogcomp</groupId>
3737
<artifactId>illinois-core-utilities</artifactId>
38-
<version>3.1.36</version>
38+
<version>4.0.0</version>
3939
<optional>true</optional>
4040
</dependency>
4141
<dependency>
4242
<groupId>edu.illinois.cs.cogcomp</groupId>
4343
<artifactId>illinois-curator</artifactId>
44-
<version>3.1.36</version>
44+
<version>4.0.0</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>edu.illinois.cs.cogcomp</groupId>
4848
<artifactId>illinois-tokenizer</artifactId>
49-
<version>3.1.36</version>
49+
<version>4.0.0</version>
5050
</dependency>
5151
<dependency>
5252
<groupId>edu.illinois.cs.cogcomp</groupId>
5353
<artifactId>illinois-corpusreaders</artifactId>
54-
<version>3.1.36</version>
54+
<version>4.0.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>edu.illinois.cs.cogcomp</groupId>
5858
<artifactId>illinois-inference</artifactId>
59-
<version>3.1.36</version>
59+
<version>4.0.0</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>edu.illinois.cs.cogcomp</groupId>
6363
<artifactId>stanford_3.3.1</artifactId>
64-
<version>3.1.36</version>
64+
<version>4.0.0</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>edu.illinois.cs.cogcomp</groupId>
6868
<artifactId>illinois-pos</artifactId>
69-
<version>3.1.36</version>
69+
<version>4.0.0</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>edu.illinois.cs.cogcomp</groupId>
7373
<artifactId>illinois-ner</artifactId>
74-
<version>3.1.36</version>
74+
<version>4.0.0</version>
7575
</dependency>
7676
<dependency>
7777
<groupId>edu.illinois.cs.cogcomp</groupId>
7878
<artifactId>illinois-chunker</artifactId>
79-
<version>3.1.36</version>
79+
<version>4.0.0</version>
8080
</dependency>
8181
<dependency>
8282
<groupId>edu.illinois.cs.cogcomp</groupId>

core-utilities/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
56
<parent>
67
<artifactId>illinois-cogcomp-nlp</artifactId>
78
<groupId>edu.illinois.cs.cogcomp</groupId>
8-
<version>3.1.36</version>
9+
<version>4.0.0</version>
910
</parent>
10-
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>illinois-core-utilities</artifactId>
1313

core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/datastructures/textannotation/SpanLabelView.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ public SpanLabelView(String viewName, String viewGenerator, TextAnnotation text,
6262
public void addConstituent(Constituent constituent) {
6363
super.addConstituent(constituent);
6464

65-
Collections.sort(this.constituents, TextAnnotationUtilities.constituentStartComparator);
65+
// this sort is grossly inefficient when appending contiguous tokens one at a time.
66+
// we add a check so we only do the sort if the constituents are added out of order.
67+
// Better yet use an ordered tree map representation, do an insertion sort.
68+
int size = this.constituents.size();
69+
if (size > 1) {
70+
Constituent before = this.constituents.get(size-2);
71+
Constituent after = this.constituents.get(size-1);
72+
if (before.getStartSpan() > after.getStartSpan()) {
73+
Collections.sort(this.constituents, TextAnnotationUtilities.constituentStartComparator);
74+
}
75+
}
6676
}
6777

6878
/**

0 commit comments

Comments
 (0)