⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 docnode.java

📁 自己写的search engine, 有 boolean search, fuzzy search
💻 JAVA
字号:
package searchingEngine.dataPreprocessing.invertedFile;

import java.util.*;
import java.io.Serializable;

public class DocNode implements Serializable, Comparable<DocNode> {
	public final int fileid;
	private double tf;
	private double term_doc_wt;
	
	public DocNode(int fileid) {
		this.fileid = fileid;
		this.tf = 0;
		this.term_doc_wt = 0;
	}
	
	public DocNode(int fileid, double tf,double term_doc_wt){
		this.fileid = fileid;
		this.tf = tf;
		this.term_doc_wt = term_doc_wt;
	}
	
	public void increTf() {
		tf++;
	}
	
	public double getTf() {
		return tf;
	}
	
	public void setTf(double tf) {
		this.tf = tf;
	}
	
	public void setTermDocWt(double term_doc_wt) {
		this.term_doc_wt = term_doc_wt;
	}
	
	public double getTermDocWt() {
		return term_doc_wt;
	}
	public int compareTo(int arg0) {
		return (new Integer(fileid)).compareTo(arg0);
	}
	public int compareTo(DocNode arg0) {
		return (new Integer(fileid)).compareTo(arg0.fileid);
	}
	public String toString(){
		return fileid + " " + tf + " " + term_doc_wt;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -