/** * Returns a set of entries, where each key is a read-only {@link * List} of size one less than the depth of the GeneralizedCounter, and * each value is a {@link ClassicCounter}. Each entry is a {@link java.util.Map.Entry} object, but these objects * do not support the {@link java.util.Map.Entry#setValue} method; attempts to call that method with result * in an {@link UnsupportedOperationException} being thrown. */ public Set<Map.Entry<List<K>, ClassicCounter<K>>> lowestLevelCounterEntrySet() { return ErasureUtils.<Set<Map.Entry<List<K>, ClassicCounter<K>>>>uncheckedCast(lowestLevelCounterEntrySet(new HashSet<>(), zeroKey, true)); }
@Override public void finishTraining() { lex.finishTraining(); int numTags = tagIndex.size(); POSes = Generics.newHashSet(tagIndex.objectsList()); initialPOSDist = Distribution.laplaceSmoothedDistribution(initial, numTags, 0.5); markovPOSDists = Generics.newHashMap(); Set entries = ruleCounter.lowestLevelCounterEntrySet(); for (Object entry1 : entries) { Map.Entry entry = (Map.Entry) entry1; // Map.Entry<List<String>, Counter> entry = (Map.Entry<List<String>, Counter>) iter.next(); Distribution d = Distribution.laplaceSmoothedDistribution((ClassicCounter) entry.getValue(), numTags, 0.5); markovPOSDists.put(((List<String>) entry.getKey()).get(0), d); } }
conditionalizeHelper(o).lowestLevelCounterEntrySet(s, newKey, true);
Set<Map.Entry<List<Serializable>, ClassicCounter<Symbol>>> counterEntries = POSspecificCharNGrams[i].lowestLevelCounterEntrySet(); Timing.tick("Creating " + counterEntries.size() + " character " + (i + 1) + "-gram distributions..."); for (Map.Entry<List<Serializable>, ClassicCounter<Symbol>> entry : counterEntries) {
/** * Returns a set of entries, where each key is a read-only {@link * List} of size one less than the depth of the GeneralizedCounter, and * each value is a {@link ClassicCounter}. Each entry is a {@link java.util.Map.Entry} object, but these objects * do not support the {@link java.util.Map.Entry#setValue} method; attempts to call that method with result * in an {@link UnsupportedOperationException} being thrown. */ public Set<Map.Entry<List<K>, ClassicCounter<K>>> lowestLevelCounterEntrySet() { return ErasureUtils.<Set<Map.Entry<List<K>, ClassicCounter<K>>>>uncheckedCast(lowestLevelCounterEntrySet(new HashSet<>(), zeroKey, true)); }
/** * Returns a set of entries, where each key is a read-only {@link * List} of size one less than the depth of the GeneralizedCounter, and * each value is a {@link ClassicCounter}. Each entry is a {@link java.util.Map.Entry} object, but these objects * do not support the {@link java.util.Map.Entry#setValue} method; attempts to call that method with result * in an {@link UnsupportedOperationException} being thrown. */ public Set<Map.Entry<List<K>, ClassicCounter<K>>> lowestLevelCounterEntrySet() { return ErasureUtils.<Set<Map.Entry<List<K>, ClassicCounter<K>>>>uncheckedCast(lowestLevelCounterEntrySet(new HashSet<>(), zeroKey, true)); }
/** * Returns a set of entries, where each key is a read-only {@link * List} of size one less than the depth of the GeneralizedCounter, and * each value is a {@link ClassicCounter}. Each entry is a {@link java.util.Map.Entry} object, but these objects * do not support the {@link java.util.Map.Entry#setValue} method; attempts to call that method with result * in an {@link UnsupportedOperationException} being thrown. */ public Set<Map.Entry<List<K>, ClassicCounter<K>>> lowestLevelCounterEntrySet() { return ErasureUtils.<Set<Map.Entry<List<K>, ClassicCounter<K>>>>uncheckedCast(lowestLevelCounterEntrySet(new HashSet<Map.Entry<Object, ClassicCounter<K>>>(), zeroKey, true)); }
/** * Returns a set of entries, where each key is a read-only {@link * List} of size one less than the depth of the GeneralizedCounter, and * each value is a {@link ClassicCounter}. Each entry is a {@link java.util.Map.Entry} object, but these objects * do not support the {@link java.util.Map.Entry#setValue} method; attempts to call that method with result * in an {@link UnsupportedOperationException} being thrown. */ public Set<Map.Entry<List<K>, ClassicCounter<K>>> lowestLevelCounterEntrySet() { return ErasureUtils.<Set<Map.Entry<List<K>, ClassicCounter<K>>>>uncheckedCast(lowestLevelCounterEntrySet(new HashSet<Map.Entry<Object, ClassicCounter<K>>>(), zeroKey, true)); }
@Override public void finishTraining() { lex.finishTraining(); int numTags = tagIndex.size(); POSes = Generics.newHashSet(tagIndex.objectsList()); initialPOSDist = Distribution.laplaceSmoothedDistribution(initial, numTags, 0.5); markovPOSDists = Generics.newHashMap(); Set entries = ruleCounter.lowestLevelCounterEntrySet(); for (Object entry1 : entries) { Map.Entry entry = (Map.Entry) entry1; // Map.Entry<List<String>, Counter> entry = (Map.Entry<List<String>, Counter>) iter.next(); Distribution d = Distribution.laplaceSmoothedDistribution((ClassicCounter) entry.getValue(), numTags, 0.5); markovPOSDists.put(((List<String>) entry.getKey()).get(0), d); } }
conditionalizeHelper(o).lowestLevelCounterEntrySet(s, newKey, true);
@Override public void finishTraining() { lex.finishTraining(); int numTags = tagIndex.size(); POSes = Generics.newHashSet(tagIndex.objectsList()); initialPOSDist = Distribution.laplaceSmoothedDistribution(initial, numTags, 0.5); markovPOSDists = Generics.newHashMap(); Set entries = ruleCounter.lowestLevelCounterEntrySet(); for (Object entry1 : entries) { Map.Entry entry = (Map.Entry) entry1; // Map.Entry<List<String>, Counter> entry = (Map.Entry<List<String>, Counter>) iter.next(); Distribution d = Distribution.laplaceSmoothedDistribution((ClassicCounter) entry.getValue(), numTags, 0.5); markovPOSDists.put(((List<String>) entry.getKey()).get(0), d); } }
conditionalizeHelper(o).lowestLevelCounterEntrySet(s, newKey, true);
conditionalizeHelper(o).lowestLevelCounterEntrySet(s, newKey, true);
conditionalizeHelper(o).lowestLevelCounterEntrySet(s, newKey, true);
Set counterEntries = POSspecificCharNGrams[i].lowestLevelCounterEntrySet(); Timing.tick("Creating " + counterEntries.size() + " character " + (i + 1) + "-gram distributions..."); for (Iterator it = counterEntries.iterator(); it.hasNext();) {
Set counterEntries = POSspecificCharNGrams[i].lowestLevelCounterEntrySet(); Timing.tick("Creating " + counterEntries.size() + " character " + (i + 1) + "-gram distributions..."); for (Iterator it = counterEntries.iterator(); it.hasNext();) {
Set<Map.Entry<List<Serializable>, ClassicCounter<Symbol>>> counterEntries = POSspecificCharNGrams[i].lowestLevelCounterEntrySet(); Timing.tick("Creating " + counterEntries.size() + " character " + (i + 1) + "-gram distributions..."); for (Map.Entry<List<Serializable>, ClassicCounter<Symbol>> entry : counterEntries) {
Set<Map.Entry<List<Serializable>, ClassicCounter<Symbol>>> counterEntries = POSspecificCharNGrams[i].lowestLevelCounterEntrySet(); Timing.tick("Creating " + counterEntries.size() + " character " + (i + 1) + "-gram distributions..."); for (Map.Entry<List<Serializable>, ClassicCounter<Symbol>> entry : counterEntries) {