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

📄 fixedngram.java

📁 Boosting算法软件包
💻 JAVA
字号:
package jboost.examples.ngram;import java.util.Arrays;/** * Class for fixed ngrams * * @author Rob Schapire (rewritten by Aaron Arvey) */public class FixedNgram extends AbstractNgram {    /**     * Ngrams are constructed from the string s and have     * size n.     * @param s string from which ngrams are constructed     * @param n size of all ngrams returned     */    public FixedNgram(String s, int n) {	super(s);	boolean[] pat = new boolean[n];	Arrays.fill(pat, true);	enumer = new PatternNgram(words, pat);    }    public boolean hasMoreElements() {	return enumer.hasMoreElements();    }}

⌨️ 快捷键说明

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