Commit 931321ec authored by Panagiotis Papadakos's avatar Panagiotis Papadakos
Browse files

[DocInfoEssential] A class that holds all information we need from the index...

[DocInfoEssential] A class that holds all information we need from the index to implement the vector space and okapi-bm25 models.
parent 621e5d70
/*
* themis - A fair search engine for scientific articles
*
* Currently over the Semantic Scholar Open Research Corpus
* http://s2-public-api-prod.us-west-2.elasticbeanstalk.com/corpus/
*
* Collaborative work with the undergraduate/graduate students of
* Information Retrieval Systems (hy463) course
* Spring Semester 2020
*
* -- Writing code during COVID-19 pandemic times :-( --
*
* Aiming to participate in TREC 2020 Fair Ranking Track
* https://fair-trec.github.io/
*
* Computer Science Department http://www.csd.uoc.gr
* University of Crete
* Greece
*
* LICENCE: TO BE ADDED
*
* Copyright 2020
*
*/
package gr.csd.uoc.hy463.themis.model;
/**
* This class holds any information we might want to communicate with the
* retrieval model we are implementing about a specific document
*
* Currently just holds the important things.
*
* Can also be extended by another class, DocInfoFull, that will be used
* whenever we want to get all information related with a document, i.e. the
* entry of a document in the Documents file
*
* @author Panagiotis Papadakos <papadako at ics.forth.gr>
*/
public class DocInfoEssential {
private String id = ""; // the 40 byte id
private double weight = 0.0; // weight (norm) of document (vector space)
private double pagerank = 0.0; // pagerank score for 2nd phase
private int length = 0; // for OkapiBM25
private long offset = 0; // offset in documents file
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
public double getPagerank() {
return pagerank;
}
public void setPagerank(double pagerank) {
this.pagerank = pagerank;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public long getOffset() {
return offset;
}
public void setOffset(long offset) {
this.offset = offset;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment