@Override public void seal() { sealed = true; sortedStringList = new String[rawStringSet.size()]; rawStringSet.toArray(sortedStringList); Arrays.sort(sortedStringList); if (sortedStringList.length == 0) { min = null; max = null; return; } // Update min/max based on raw docs. min = sortedStringList[0]; max = sortedStringList[sortedStringList.length - 1]; // Merge the raw and aggregated docs, so stats for dictionary creation are collected correctly. int numAggregated = aggregatedStringSet.size(); if (numAggregated > 0) { rawStringSet.addAll(aggregatedStringSet); sortedStringList = new String[rawStringSet.size()]; rawStringSet.toArray(sortedStringList); Arrays.sort(sortedStringList); } } }
public Object[] getLabels() { return labelMap.keySet().toArray(); }
public Object[] getLabels() { return labelMap.keySet().toArray(); }
public String[] getTagset() { return tagset.keySet().toArray(new String[tagset.size()]); } }
/** Returns the terms associated with the given index. * * @param index an index. * @return the terms associated with <code>index</code>, in the same order in which * they appeared during the visit, skipping duplicates, if some nonzero-frequency iterator * based on <code>index</code> was found; <code>null</code> otherwise. */ public String[] terms( final Index index ) { final Object2IntMap<String> termMap = index2termMap.get( index ); return termMap == null ? null : termMap.keySet().toArray( new String[ termMap.size() ] ); }
/** Returns the terms associated with the given index. * * @param index an index. * @return the terms associated with <code>index</code>, in the same order in which * they appeared during the visit, skipping duplicates, if some nonzero-frequency iterator * based on <code>index</code> was found; <code>null</code> otherwise. */ public String[] terms( final Index index ) { final Object2IntMap<String> termMap = index2termMap.get( index ); return termMap == null ? null : termMap.keySet().toArray( new String[ termMap.size() ] ); }
/** Returns the terms associated with the given index. * * @param index an index. * @return the terms associated with <code>index</code>, in the same order in which * they appeared during the visit, skipping duplicates, if some nonzero-frequency iterator * based on <code>index</code> was found; <code>null</code> otherwise. */ public String[] terms( final Index index ) { final Object2IntMap<String> termMap = index2termMap.get( index ); return termMap == null ? null : termMap.keySet().toArray( new String[ termMap.size() ] ); }
/** Returns the terms associated with the given index. * * @param index an index. * @return the terms associated with <code>index</code>, in the same order in which * they appeared during the visit, skipping duplicates, if some nonzero-frequency iterator * based on <code>index</code> was found; <code>null</code> otherwise. */ public String[] terms( final Index index ) { final Object2IntMap<String> termMap = index2termMap.get( index ); return termMap == null ? null : termMap.keySet().toArray( new String[ termMap.size() ] ); }
final MutableString[] termArray = termMap.keySet().toArray(new MutableString[ numTermsInRAM ]);
final MutableString[] docArray = docMap.keySet().toArray(new MutableString[ docMap.size() ]);
MutableString[] termArray = termMap.keySet().toArray( new MutableString[ numTerms ] );
MutableString[] termArray = termMap.keySet().toArray( new MutableString[ numTerms ] );
MutableString[] termArray = termMap.keySet().toArray( new MutableString[ numTerms ] );
MutableString[] termArray = termMap.keySet().toArray( new MutableString[ numTerms ] );