public int[] tmpTags(int count, int s) { if (tmp == null || tmp.length < s) { //tmp = new int[1024*128]; tmp = new int[s]; } TagList tl = info; int i = size() - 1; while (tl != null && count >= 0) { tmp[i] = tl.tag; i--; count--; tl = tl.last; } return tmp; }
public int[] tmpTags(int count, int s) { if (tmp == null || tmp.length < s) { //tmp = new int[1024*128]; tmp = new int[s]; } TagList tl = info; int i = size() - 1; while (tl != null && count >= 0) { tmp[i] = tl.tag; i--; count--; tl = tl.last; } return tmp; }
public int[] tmpTags(int count, int s) { if (tmp == null || tmp.length < s) { //tmp = new int[1024*128]; tmp = new int[s]; } TagList tl = info; int i = size() - 1; while (tl != null && count >= 0) { tmp[i] = tl.tag; i--; count--; tl = tl.last; } return tmp; }
public void extendWith(int tag, SequenceModel ts, int s) { extendWith(tag); int[] tags = tmpTags(ts.leftWindow() + 1 + ts.rightWindow(), s); score += ts.scoreOf(tags, size() - ts.rightWindow() - 1); //for (int i=0; i<tags.length; i++) //System.out.print(tags[i]+" "); //System.out.println("\nWith "+tag+" score was "+score); }
public void extendWith(int tag, SequenceModel ts, int s) { extendWith(tag); int[] tags = tmpTags(ts.leftWindow() + 1 + ts.rightWindow(), s); score += ts.scoreOf(tags, size() - ts.rightWindow() - 1); //for (int i=0; i<tags.length; i++) //System.out.print(tags[i]+" "); //System.out.println("\nWith "+tag+" score was "+score); }
public void extendWith(int tag, SequenceModel ts, int s) { extendWith(tag); int[] tags = tmpTags(ts.leftWindow() + 1 + ts.rightWindow(), s); score += ts.scoreOf(tags, size() - ts.rightWindow() - 1); //for (int i=0; i<tags.length; i++) //System.out.print(tags[i]+" "); //System.out.println("\nWith "+tag+" score was "+score); }
public int[] tmpTags(int count, int s) { if (tmp == null || tmp.length < s) { //tmp = new int[1024*128]; tmp = new int[s]; } TagList tl = info; int i = size() - 1; while (tl != null && count >= 0) { tmp[i] = tl.tag; i--; count--; tl = tl.last; } return tmp; }
public void extendWith(int tag, SequenceModel ts, int s) { extendWith(tag); int[] tags = tmpTags(ts.leftWindow() + 1 + ts.rightWindow(), s); score += ts.scoreOf(tags, size() - ts.rightWindow() - 1); //for (int i=0; i<tags.length; i++) //System.out.print(tags[i]+" "); //System.out.println("\nWith "+tag+" score was "+score); }