|
Carrot2 v3.5.2
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.text.preprocessing.SparseArray
public final class SparseArray
Sparse array encoding utilities. Sparse means an index and its value are kept in an array as a pair.
| Constructor Summary | |
|---|---|
SparseArray()
|
|
| Method Summary | |
|---|---|
static int |
countUnique(int[] buffer,
int fromIndex,
int toIndex)
Count unique values in the sorted array. |
static int[] |
mergeSparseArrays(Iterable<int[]> source)
Merge data from one or more sparse arrays. |
static String |
sparseToString(int[] intIntArray)
Convert an int-int compact mapping array to a string. |
static int[] |
toSparseEncoding(com.carrotsearch.hppc.IntStack documents)
Convert a list of documents to sparse document-count representation. |
static int[] |
toSparseEncodingByHash(com.carrotsearch.hppc.IntStack documents)
Convert to sparse encoding using a hash map. |
static int[] |
toSparseEncodingBySort(com.carrotsearch.hppc.IntStack documents)
Convert to sparse encoding using sorting and counting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SparseArray()
| Method Detail |
|---|
public static int[] toSparseEncoding(com.carrotsearch.hppc.IntStack documents)
public static int[] toSparseEncodingByHash(com.carrotsearch.hppc.IntStack documents)
public static int[] toSparseEncodingBySort(com.carrotsearch.hppc.IntStack documents)
public static int countUnique(int[] buffer,
int fromIndex,
int toIndex)
public static int[] mergeSparseArrays(Iterable<int[]> source)
public static String sparseToString(int[] intIntArray)
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||