/** * Returns the mean of all the counts (totalCount/size). */ public double averageCount() { return totalCount() / map.size(); }
/** * This has been de-deprecated in order to reduce compilation warnings, but * really you should create a {@link edu.stanford.nlp.stats.Distribution} instead of using this method. */ public double getNormalizedCount(E key) { return getCount(key) / (totalCount()); }
public IntCounter<K1> totalCounts() { IntCounter<K1> tc = new IntCounter<>(); for (K1 k1:map.keySet()) { tc.setCount(k1, map.get(k1).totalCount()); } return tc; }
/** */ public int getCount(K1 o1, K2 o2) { IntCounter<K2> c = getCounter(o1); if (c.totalCount() == 0 && !c.keySet().contains(o2)) { return defaultReturnValue(); } return c.getIntCount(o2); }
if (! wordTag.firstKeySet().contains(wordId) || wordTag.getCounter(wordId).totalCount() < 2) { wordTagUnseen.incrementCount(tagId); if (! lemmaTag.firstKeySet().contains(lemmaId) || lemmaTag.getCounter(lemmaId).totalCount() < 2) { lemmaTagUnseen.incrementCount(tagId); if (! morphTag.firstKeySet().contains(morphId) || morphTag.getCounter(morphId).totalCount() < 2) { morphTagUnseen.incrementCount(tagId);
/** * Returns the mean of all the counts (totalCount/size). */ public double averageCount() { return totalCount() / map.size(); }
/** * Returns the mean of all the counts (totalCount/size). */ public double averageCount() { return totalCount() / map.size(); }
/** * Returns the mean of all the counts (totalCount/size). */ public double averageCount() { return totalCount() / map.size(); }
/** * Returns the mean of all the counts (totalCount/size). */ public double averageCount() { return totalCount() / map.size(); }
/** * This has been de-deprecated in order to reduce compilation warnings, but * really you should create a {@link edu.stanford.nlp.stats.Distribution} instead of using this method. */ public double getNormalizedCount(E key) { return getCount(key) / (totalCount()); }
/** * This has been de-deprecated in order to reduce compilation warnings, but * really you should create a {@link edu.stanford.nlp.stats.Distribution} instead of using this method. */ public double getNormalizedCount(E key) { return getCount(key) / (totalCount()); }
/** * This has been de-deprecated in order to reduce compilation warnings, but * really you should create a {@link edu.stanford.nlp.stats.Distribution} instead of using this method. */ public double getNormalizedCount(E key) { return getCount(key) / (totalCount()); }
/** * This has been de-deprecated in order to reduce compilation warnings, but * really you should create a {@link edu.stanford.nlp.stats.Distribution} instead of using this method. */ public double getNormalizedCount(E key) { return getCount(key) / (totalCount()); }
public IntCounter<K1> totalCounts() { IntCounter<K1> tc = new IntCounter<K1>(); for (K1 k1:map.keySet()) { tc.setCount(k1, map.get(k1).totalCount()); } return tc; }
public IntCounter<K1> totalCounts() { IntCounter<K1> tc = new IntCounter<>(); for (K1 k1:map.keySet()) { tc.setCount(k1, map.get(k1).totalCount()); } return tc; }
public IntCounter<K1> totalCounts() { IntCounter<K1> tc = new IntCounter<>(); for (K1 k1:map.keySet()) { tc.setCount(k1, map.get(k1).totalCount()); } return tc; }
/** */ public int getCount(K1 o1, K2 o2) { IntCounter<K2> c = getCounter(o1); if (c.totalCount() == 0 && !c.keySet().contains(o2)) { return defaultReturnValue(); } return c.getIntCount(o2); }
/** */ public int getCount(K1 o1, K2 o2) { IntCounter<K2> c = getCounter(o1); if (c.totalCount() == 0 && !c.keySet().contains(o2)) { return defaultReturnValue(); } return c.getIntCount(o2); }
/** */ public int getCount(K1 o1, K2 o2) { IntCounter<K2> c = getCounter(o1); if (c.totalCount() == 0 && !c.keySet().contains(o2)) { return defaultReturnValue(); } return c.getIntCount(o2); }
if (! wordTag.firstKeySet().contains(wordId) || wordTag.getCounter(wordId).totalCount() < 2) { wordTagUnseen.incrementCount(tagId); if (! lemmaTag.firstKeySet().contains(lemmaId) || lemmaTag.getCounter(lemmaId).totalCount() < 2) { lemmaTagUnseen.incrementCount(tagId); if (! morphTag.firstKeySet().contains(morphId) || morphTag.getCounter(morphId).totalCount() < 2) { morphTagUnseen.incrementCount(tagId);