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

📄 docnodewpos.java

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

import java.util.LinkedList;

import searchingEngine.dataPreprocessing.invertedFile.DocNode;

public class DocNodeWpos extends DocNode {
	public final LinkedList<Integer> wpos_list;
	
	public DocNodeWpos(int fileid){
		super(fileid);
		this.wpos_list = new LinkedList<Integer>();
	}
	
	public DocNodeWpos(int fileid,LinkedList<Integer> wpos_list){
		super(fileid);
		this.wpos_list = wpos_list;
	}
	
	public DocNodeWpos(int fileid,double tf,double term_doc_wt, LinkedList<Integer> wpos_list){
		super(fileid,tf,term_doc_wt);
		this.wpos_list = wpos_list;
	}
	public DocNodeWpos(int fileid,double tf,double term_doc_wt){
		super(fileid,tf,term_doc_wt);
		this.wpos_list = new LinkedList<Integer>();
	}
	
	public DocNodeWpos(DocNode docNode, LinkedList<Integer> wpos_list){
		super(docNode.fileid,docNode.getTf(),docNode.getTermDocWt());
		this.wpos_list = wpos_list;
	}
	
	public DocNodeWpos(DocNode docNode){
		super(docNode.fileid,docNode.getTf(),docNode.getTermDocWt());
		this.wpos_list = new LinkedList<Integer>();
	}
	
	public String toString(){
		StringBuffer temp = new StringBuffer(fileid + " " + getTf() + " " +  getTermDocWt() +" [ ");
		for (int i =0;i<wpos_list.size();i++) {
			temp.append(wpos_list.get(i)+ " ");
		}
		temp.append("]");
		return temp.toString();
	}
	
	public void increTf() {
	}
	
	public double getTf() {
		return (double)wpos_list.size();
	}
	
	public void setTf(double tf) {
	}
	
	public void setTermDocWt(double term_doc_wt) {
	}
	
	public double getTermDocWt() {
		return 0;
	}
}

⌨️ 快捷键说明

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