public class NGram extends UnaryTransformer<scala.collection.Seq<String>,scala.collection.Seq<String>,NGram> implements DefaultParamsWritable
When the input is empty, an empty array is returned. When the input array length is less than n (number of elements per n-gram), no n-grams are returned.
Modifier and Type | Method and Description |
---|---|
int |
getN() |
static NGram |
load(String path) |
IntParam |
n()
Minimum n-gram length, greater than or equal to 1.
|
static MLReader<T> |
read() |
NGram |
setN(int value) |
String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
copy, inputCol, outputCol, setInputCol, setOutputCol, transform, transformSchema
transform, transform, transform
params
write
save
getInputCol
getOutputCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public static NGram load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public IntParam n()
public NGram setN(int value)
public int getN()
public String toString()
toString
in interface Identifiable
toString
in class Object