Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 579 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 314 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,022 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 516 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 320 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,495 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 465 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 306 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 2,187 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 2,170 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 976 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 1,074 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 512 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 4,594 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 1,192 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 3,633 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 330 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 544 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 3,118 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,526 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 203 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,257 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | 449 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 892 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 406 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 342 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,316 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 461 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 480 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 623 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 525 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 3,220 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 1,425 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 4,393 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicab... | 395 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for Web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 257 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 243 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 6,971 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 1,820 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 384 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 193 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 487 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | 2,534 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 350 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 1,150 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 1,692 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 272 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 801 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 3,244 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 794 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 321 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 196 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 563 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class Max extends Operator {
@Override public double getFinalScore() {
double s = Double.NEGATIVE_INFINITY;
for(double f: scores) {
if(f > s) {
s = f;
}
}
return s;
}
@Override public Operator newInstance() {
return new Max();
}
}
| 78 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
import java.util.List;
import com.google.common.collect.Lists;
/**
* Holds and computes the final value of a feature
*
* @author Nima Asadi
*/
public abstract class Operator {
protected List<Double> scores;
protected Operator() {
scores = Lists.newArrayList();
}
/**
*... | 171 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class Variance extends Operator {
@Override public double getFinalScore() {
if(scores.size() == 0) {
return 0;
}
double mean = 0;
for(double f: scores) {
mean += f;
}
mean /= scores.size();
double var = 0;
for(double f: scores) {
... | 124 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class Min extends Operator {
@Override public double getFinalScore() {
double s = Double.POSITIVE_INFINITY;
for(double f: scores) {
if(f < s) {
s = f;
}
}
return s;
}
@Override public Operator newInstance() {
return new Min();
}
}
| 77 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class Sum extends Operator {
@Override public double getFinalScore() {
double s = 0;
for(double f: scores) {
s += f;
}
return s;
}
@Override public Operator newInstance() {
return new Sum();
}
}
| 66 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class Mean extends Operator {
@Override public double getFinalScore() {
if(scores.size() == 0) {
return 0;
}
double s = 0;
for(double f: scores) {
s += f;
}
return (s / scores.size());
}
@Override public Operator newInstance() {
return... | 87 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
import java.io.InputStream;
import java.io.IOException;
import java.io.File;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
im... | 499 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class BooleanRatio extends Operator {
@Override public double getFinalScore() {
if(scores.size() == 0) {
return 0;
}
int s = 0;
for(double f: scores) {
if(f > 0) {
s++;
}
}
return ((double) s) / scores.size();
}
@Override publ... | 100 |
github-java-corpus | 2,012 | package ivory.ltr.operator;
public class BooleanCount extends Operator {
@Override public double getFinalScore() {
int s = 0;
for(double f: scores) {
if(f > 0) {
s++;
}
}
return ((double) s);
}
@Override public Operator newInstance() {
return new BooleanCount();
}
}
| 79 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 295 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 330 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 560 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | 379 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class Pmra extends ScoringModel {
private double lambda = 0.022;
private double mu = 0.013;
private double lmu = lambda - mu;
private double mol = mu / lambda;
public float computeScore(int q_tf, int d_tf, int q_len, int doc_len) {
float e1 = 1 / (1 + (float... | 235 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class Lucene extends ScoringModel {
public float computeScore(int qtf, int dtf, int qlen, int dlen) {
return computeLuceneTF(dtf) * computeLuceneIDF() * (float) (1 / Math.sqrt(dlen));
}
public float computeDocumentWeight(int dtf, int dlen) {
throw new UnsupportedOper... | 172 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class Jaccard extends ScoringModel {
public float computeScore(int qtf, int dtf, int qlen, int dlen) {
return 1.0f / (qlen + dlen);
}
public float computeDocumentWeight(int dtf, int dlen) {
return 1.0f;
}
public float computeQueryWeight(int qtf, int qlen) {
... | 105 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class TfIdf extends ScoringModel {
public float computeScore(int qtf, int dtf, int qlen, int dlen) {
float idf = (float) Math.log((mDocCount - mDF + 0.5f) / (mDF + 0.5f));
return qtf * dtf * idf;
}
public float computeDocumentWeight(int dtf, int dlen) {
float idf ... | 170 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class Bm25 extends ScoringModel {
private float k_1 = 1.2f;
private float k_3 = 1000f;
private float b = 0.75f;
public float computeScore(int q_tf, int doc_tf, int q_len, int doc_len) {
// This definition of K is different from standard BM25: it has an
// add... | 505 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public class Bm25S extends ScoringModel {
public float computeScore(int qtf, int dtf, int qlen, int dlen) {
float idf = (float) Math.log((mDocCount - mDF + 0.5f) / (mDF + 0.5f));
return qtf / (qtf + 0.5f + 1.5f * qlen / mAvgDocLength) * dtf
/ (dtf + 0.5f + 1.5f * dlen / mAvg... | 313 |
github-java-corpus | 2,012 | package ivory.pwsim.score;
public abstract class ScoringModel {
protected float mAvgDocLength;
protected int mDocCount;
protected int mDF;
public void setAvgDocLength(float avgdl) {
mAvgDocLength = avgdl;
}
public void setDocCount(int n) {
mDocCount = n;
}
public void setDF(int df) {
... | 243 |
github-java-corpus | 2,012 | package ivory.pwsim;
import ivory.core.RetrievalEnvironment;
import ivory.core.data.index.Posting;
import ivory.core.data.index.PostingsList;
import ivory.core.data.index.PostingsReader;
import ivory.core.data.stat.DocLengthTable;
import ivory.core.data.stat.DocLengthTable2B;
import ivory.pwsim.score.ScoringMo... | 2,786 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for Web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | 666 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import org.apache.hadoop.io.WritableComparable;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
/**
* Abstract class for signatures.
* @author ferhanture
*
*/
@SuppressWarnings("unchecked")
public abstract class Signature implements WritableComparable {
public Signature() {
... | 415 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.util.Comparator;
import edu.umd.cloud9.io.pair.PairOfFloatInt;
public class PairComparator implements Comparator<PairOfFloatInt>{
public int compare(PairOfFloatInt p1, PairOfFloatInt p2) {
if(p1.getLeftElement()<p2.getLeftElement()){
return -1;
}else if(p1.getLeft... | 107 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.io.Writable;
import edu.umd.cloud9.io.pair.PairOfInts;
import edu.umd.cloud9.util.array.ArrayListOfInts;
public class ListOfIntPairs impl... | 374 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for Web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | 1,122 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.IOException;
public class PairOfIntMinhashSignature extends PairOfIntSignature {
public PairOfIntMinhashSignature() {
super();
}
public PairOfIntMinhashSignature(int i, Signature permutedSign) {
permNo = i;
signature = permutedSign;
... | 361 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
/**
*
* A version of BitsSignature specifically tuned for 64 bits. Uses an array of 8 bytes instead of the Bits object.
*
* @see ivory.lsh.data.NBitSi... | 1,559 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
/**
*
* A ver... | 2,221 |
github-java-corpus | 2,012 | /*
* Ivory: A Hadoop toolkit for Web-scale information retrieval
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | 381 |
github-java-corpus | 2,012 | /**
*
*/
package ivory.lsh.data;
/**
* @author Tamer
*
*/
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.lang.reflect.Array;
import org.apache.hadoop.io.Writable;
public class BitsSignatureTable implements Writable{
Signature[] signaturesArra... | 874 |
github-java-corpus | 2,012 | package ivory.lsh.data;
/*
Copyright (c) 2004 Pablo Bleyer Kocik.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and th... | 2,624 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.Writable;
/**
* A data structure to optimize space when storing an array of floats.
* Floats are quantized into byte values and stored as a BytesWritable.
* maxNorm is a maxNormaliz... | 440 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.IOException;
public class PairOfInt64BitSignature extends PairOfIntSignature {
public PairOfInt64BitSignature() {
super();
}
public PairOfInt64BitSignature(int i, Signature permutedSign) {
permNo = i;
signature = permutedSign;
}
... | 243 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
/**
*
* A space and time-efficient implementation of Signature.
* This class is basically a WritableComparable wrapper around the Bits class with many... | 2,121 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import edu.umd.cloud9.io.array.ArrayListWritable;
import edu.umd.cloud9.io.map.HMapSFW;
public class WikiDocInfo implements Writable {
int l... | 477 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.hadoop.io.WritableComparable;
@SuppressWarnings("unchecked")
public abstract class PairOfIntSignature implements WritableComparable {
public int permNo;
Signature signature;
public Pair... | 301 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import ivory.core.util.CLIRUtils;
import java.io.DataInput;
import java.io.IOException;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
public class PairOfIntNBitSignature extends PairOfIntSignature {
private static final Logger logger = Logger.getLogger(PairOfIntNBitSignatu... | 421 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import ivory.lsh.data.Permutation;
import java.util.ArrayList;
import java.util.Collections;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
import edu.umd.cloud9.util.array.ArrayListOfInts;
/**
* Permute a list of ints, block-by-block, as described in WWW07 paper by Manku et al
*... | 719 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import static org.junit.Assert.*;
import ivory.lsh.data.Permutation;
import java.util.Random;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
public class PermutationByBit extends Permutation {
private Random rand;
private ArrayListOfIntsWritable randPerm;
private int length;
... | 512 |
github-java-corpus | 2,012 | package ivory.lsh.data;
import java.io.IOException;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.mapred.JobConf;
import edu.umd.cloud9.io.array.ArrayListOfIntsWritable;
@SuppressW... | 200 |
github-java-corpus | 2,012 | package ivory.lsh.bitext;
import ivory.core.RetrievalEnvironment;
import ivory.core.util.CLIRUtils;
import ivory.lsh.data.WikiDocInfo;
import java.io.IOException;
import java.net.URI;
import java.util.Iterator;
import opennlp.model.RealValueFileEventStream;
import org.apache.hadoop.conf.Configured;
import org.apache.h... | 4,642 |
github-java-corpus | 2,012 | package ivory.lsh.bitext;
import ivory.core.RetrievalEnvironment;
import ivory.core.data.dictionary.DefaultFrequencySortedDictionary;
import ivory.core.data.stat.DfTableArray;
import ivory.core.data.stat.PrefixEncodedGlobalStats;
import ivory.core.tokenize.Tokenizer;
import ivory.core.tokenize.TokenizerFactory;
import... | 3,471 |
github-java-corpus | 2,012 | package ivory.lsh.bitext;
import ivory.core.RetrievalEnvironment;
import ivory.core.tokenize.Tokenizer;
import ivory.core.util.CLIRUtils;
import java.io.IOException;
import java.net.URI;
import opennlp.model.RealValueFileEventStream;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.filecache.Distribu... | 2,341 |
github-java-corpus | 2,012 | package ivory.lsh.bitext;
import java.io.IOException;
import java.io.InputStream;
import opennlp.maxent.io.GISModelReader;
import opennlp.model.AbstractModel;
import opennlp.model.AbstractModelReader;
import opennlp.model.DataReader;
import opennlp.model.PlainTextFileDataReader;
import opennlp.perceptron.PerceptronMod... | 326 |
github-java-corpus | 2,012 | package ivory.lsh.driver;
import ivory.core.RetrievalEnvironment;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
/**
* Runner class for pairwise similarity algorithms.
*
* @author ferhanture
*
*/
public abstract class PwsimEnviro... | 3,274 |
github-java-corpus | 2,012 | package ivory.lsh.driver;
import ivory.core.RetrievalEnvironment;
import ivory.lsh.projection.ComputeSignaturesMinhash;
import ivory.lsh.projection.ComputeSignaturesRandom;
import ivory.lsh.projection.ComputeSignaturesSimhash;
import ivory.lsh.projection.WriteRandomVectors;
import org.apache.hadoop.conf.Configuration... | 813 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.