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

📄 featuretypesmulti.java

📁 CRF1.2
💻 JAVA
字号:
/* * Created on Dec 4, 2004 * */package iitb.Model;import iitb.CRF.DataSequence;/** * @author Sunita Sarawagi * *//* * Implements the bag of features model for a given input sequence */public class FeatureTypesMulti extends FeatureTypesWrapper {    private static final long serialVersionUID = 10L;    int currPos;    int segEnd;    transient DataSequence dataSeq;        public FeatureTypesMulti(FeatureTypes s) {        super(s);    }    void advance() {        while (true) {            if (ftype.hasNext())                return;            currPos++;            if (currPos > segEnd)                return;            ftype.startScanFeaturesAt(dataSeq,currPos-1,currPos);        }    }    public  boolean startScanFeaturesAt(DataSequence data, int prevPos, int pos) {        currPos = prevPos+1;        segEnd = pos;        dataSeq = data;        ftype.startScanFeaturesAt(data,prevPos,prevPos+1);        advance();        return ftype.hasNext();    }    public boolean hasNext() {        return (currPos <= segEnd) && ftype.hasNext();    }    public void next(FeatureImpl f) {        ftype.next(f);        advance();    }};

⌨️ 快捷键说明

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