Package org.apache.sysds.utils.stats
Class NGramBuilder<T,U>
- java.lang.Object
-
- org.apache.sysds.utils.stats.NGramBuilder<T,U>
-
public class NGramBuilder<T,U> extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NGramBuilder.NGramEntry<T,U>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(T element, U stat)
int
getSize()
List<NGramBuilder.NGramEntry<T,U>>
getTopK(int k)
List<NGramBuilder.NGramEntry<T,U>>
getTopK(int k, Comparator<NGramBuilder.NGramEntry<T,U>> comparator, boolean reversed)
void
merge(NGramBuilder<T,U> builder)
static <T,U>
StringtoCSV(String[] columnNames, List<NGramBuilder.NGramEntry<T,U>> entries, Function<NGramBuilder.NGramEntry<T,U>,String> statsMapper)
-
-
-
Method Detail
-
toCSV
public static <T,U> String toCSV(String[] columnNames, List<NGramBuilder.NGramEntry<T,U>> entries, Function<NGramBuilder.NGramEntry<T,U>,String> statsMapper)
-
getSize
public int getSize()
-
merge
public void merge(NGramBuilder<T,U> builder)
-
getTopK
public List<NGramBuilder.NGramEntry<T,U>> getTopK(int k)
-
getTopK
public List<NGramBuilder.NGramEntry<T,U>> getTopK(int k, Comparator<NGramBuilder.NGramEntry<T,U>> comparator, boolean reversed)
-
-