tokeninfo.java
来自「这是一个用于测试用的搜索引擎的案例」· Java 代码 · 共 29 行
JAVA
29 行
package ir.vsr;import java.util.*;/** A lightweight object for storing information about a token (a.k.a word, term) * in an inverted index. * * @author Ray Mooney */public class TokenInfo{ /** The IDF (inverse document frequency) factor for this token * which indicates how much to weight an occurence. Tokens that * appear in many documents are not very discriminative and therefore * weighted less. */ public double idf; /** A list of TokenOccurences giving documents where this * token occurs */ public ArrayList<TokenOccurrence> occList; /** Create an initially empty data structure */ public TokenInfo() { occList = new ArrayList<TokenOccurrence>(); idf = 0.0; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?