/** * Equivalent to incrementCount2D(first,second,1.0). */ public void incrementCount2D(K first, K second) { incrementCount2D(first, second, 1.0); }
/** * Equivalent to incrementCount( new Object[] { first, second, third }, count ). * Makes the special case easier, and also more efficient. */ public void incrementCount3D(K first, K second, K third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter<K> next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); }
@Override public void train(List<TaggedWord> sentence) { lex.train(sentence, 1.0); String last = null; for (TaggedWord tagLabel : sentence) { String tag = tagLabel.tag(); tagIndex.add(tag); if (last == null) { initial.incrementCount(tag); } else { ruleCounter.incrementCount2D(last, tag); } last = tag; } }
gc1.incrementCount2D("j", "z"); GeneralizedCounter<String> gc2 = gc1.conditionalize(Arrays.asList(new String[]{"j"})); gc2.incrementCount1D("x");
/** * Equivalent to incrementCount2D(first,second,1.0). */ public void incrementCount2D(K first, K second) { incrementCount2D(first, second, 1.0); }
/** * Equivalent to incrementCount2D(first,second,1.0). */ public void incrementCount2D(K first, K second) { incrementCount2D(first, second, 1.0); }
/** * Equivalent to incrementCount2D(first,second,1.0). */ public void incrementCount2D(K first, K second) { incrementCount2D(first, second, 1.0); }
/** * Equivalent to incrementCount2D(first,second,1.0). */ public void incrementCount2D(K first, K second) { incrementCount2D(first, second, 1.0); }
/** * Equivalent to incrementCount( new Object[] { first, second, third }, count ). * Makes the special case easier, and also more efficient. */ public void incrementCount3D(K first, K second, K third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter<K> next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); }
/** * Equivalent to incrementCount( new Object[] { first, second, third }, count ). * Makes the special case easier, and also more efficient. */ public void incrementCount3D(K first, K second, K third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter<K> next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); }
/** * Equivalent to incrementCount( new Object[] { first, second, third }, count ). * Makes the special case easier, and also more efficient. */ public void incrementCount3D(K first, K second, K third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter<K> next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); }
/** * Equivalent to incrementCount( new Object[] { first, second, third }, count ). * Makes the special case easier, and also more efficient. */ public void incrementCount3D(K first, K second, K third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter<K> next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); }
@Override public void train(List<TaggedWord> sentence) { lex.train(sentence, 1.0); String last = null; for (TaggedWord tagLabel : sentence) { String tag = tagLabel.tag(); tagIndex.add(tag); if (last == null) { initial.incrementCount(tag); } else { ruleCounter.incrementCount2D(last, tag); } last = tag; } }
@Override public void train(List<TaggedWord> sentence) { lex.train(sentence, 1.0); String last = null; for (TaggedWord tagLabel : sentence) { String tag = tagLabel.tag(); tagIndex.add(tag); if (last == null) { initial.incrementCount(tag); } else { ruleCounter.incrementCount2D(last, tag); } last = tag; } }
gc1.incrementCount2D("j", "z"); GeneralizedCounter<String> gc2 = gc1.conditionalize(Arrays.asList(new String[]{"j"})); gc2.incrementCount1D("x");
gc1.incrementCount2D("j", "z"); GeneralizedCounter<String> gc2 = gc1.conditionalize(Arrays.asList(new String[]{"j"})); gc2.incrementCount1D("x");
gc1.incrementCount2D("j", "z"); GeneralizedCounter<String> gc2 = gc1.conditionalize(Arrays.asList(new String[]{"j"})); gc2.incrementCount1D("x");
gc1.incrementCount2D("j", "z"); GeneralizedCounter<String> gc2 = gc1.conditionalize(Arrays.asList(new String[]{"j"})); gc2.incrementCount1D("x");