Get the label of the TextFeature.
Get the label of the TextFeature. If no label is stored, -1 will be returned.
Get the prediction probability distribution of the TextFeature.
Get the prediction probability distribution of the TextFeature. If the TextFeature hasn't been predicted by a model, null will be returned.
Get the Sample representation of the TextFeature.
Get the Sample representation of the TextFeature. If the TextFeature hasn't been transformed to Sample, null will be returned.
Get the text content of the TextFeature.
Get the tokens of the TextFeature.
Get the tokens of the TextFeature. If text hasn't been segmented, null will be returned.
Whether the TextFeature contains label.
Set the label for the TextFeature.
Set the label for the TextFeature.
Integer.
The TextFeature with label.
Each TextFeature keeps information of a single text record. It can include various status of a text, e.g. original text content, category label, tokens, index representation of tokens, BigDL Sample representation, prediction result and so on. It uses a HashMap to store all these data. Each key is a string that can be used to identify the corresponding value.