Skip to content

Commit 8785a00

Browse files
committed
Version 1.0
1 parent 3e8a460 commit 8785a00

6 files changed

+10
-10
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>it.cnr.isti.hpc</groupId>
66
<artifactId>word2vec-compress</artifactId>
7-
<version>1.0-SNAPSHOT</version>
7+
<version>1.0</version>
88
<packaging>jar</packaging>
99

1010
<name>word2vec-compress</name>

src/main/java/it/cnr/isti/hpc/CentroidEntityScorer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public CentroidScorerContext(float[] word_vecs, int[] word_counts) {
3333
}
3434

3535
@Override
36-
float compute_score() {
36+
public float compute_score() {
3737
int word_size = centroid_vec.length;
3838
return LinearAlgebra.inner(word_size, entity_vec, 0, centroid_vec, 0) / norm;
3939
}
4040

4141
}
4242

4343
@Override
44-
ScorerContext create_context(float[] word_vecs, int[] word_counts) {
44+
public ScorerContext create_context(float[] word_vecs, int[] word_counts) {
4545
return new CentroidScorerContext(word_vecs, word_counts);
4646
}
4747

src/main/java/it/cnr/isti/hpc/EntityScorer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public float score(String entity) {
4444
return score(entity_model.word_id(entity));
4545
}
4646

47-
abstract float compute_score();
47+
public abstract float compute_score();
4848
}
4949

50-
abstract ScorerContext create_context(float[] word_vecs, int[] word_counts);
50+
public abstract ScorerContext create_context(float[] word_vecs, int[] word_counts);
5151

5252
public ScorerContext context(List<String> words) {
5353
Multiset<String> counter = TreeMultiset.create();

src/main/java/it/cnr/isti/hpc/FastInputBitStream.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class FastInputBitStream {
2020
private long current;
2121
private int fill;
2222

23-
FastInputBitStream(byte[] a) {
23+
public FastInputBitStream(byte[] a) {
2424
buf = ByteBuffer.wrap(a);
2525
buf.order(ByteOrder.BIG_ENDIAN); // should be default anyway
2626
fill = 0;

src/main/java/it/cnr/isti/hpc/LREntityScorer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public LRScorerContext(float[] word_vecs, int[] word_counts) {
1818
}
1919

2020
@Override
21-
float compute_score() {
21+
public float compute_score() {
2222
int n_words = word_counts.length;
2323
int word_size = word_model.dimensions();
2424
float s = 0;
@@ -36,7 +36,7 @@ float compute_score() {
3636
}
3737

3838
@Override
39-
ScorerContext create_context(float[] word_vecs, int[] word_counts) {
39+
public ScorerContext create_context(float[] word_vecs, int[] word_counts) {
4040
return new LRScorerContext(word_vecs, word_counts);
4141
}
4242

src/main/java/it/cnr/isti/hpc/NopEntityScorer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ public NopScorerContext(float[] word_vecs, int[] word_counts) {
1313
}
1414

1515
@Override
16-
float compute_score() {
16+
public float compute_score() {
1717
return 0;
1818
}
1919
}
2020

2121
@Override
22-
ScorerContext create_context(float[] word_vecs, int[] word_counts) {
22+
public ScorerContext create_context(float[] word_vecs, int[] word_counts) {
2323
return new NopScorerContext(word_vecs, word_counts);
2424
}
2525

0 commit comments

Comments
 (0)