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 |
uid()
An immutable unique ID for the object and its derivatives.
|
copy, setInputCol, setOutputCol, transform, transformSchema
transform, transform, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
save
getInputCol, inputCol
getOutputCol, outputCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
toString
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
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()