class_docstr: TextSet wraps a set of texts with status.
class_docstr_tok: ["TextSet","wraps","a","set","of","texts","with","status","."]
docstr: Generate BigDL Sample.
  Need to word2idx first.
  See TextFeatureToSample for more details.
  
  :return: TextSet with Samples.
docstr_tok: ["Generate","BigDL","Sample",".","Need","to","word2idx","first",".","See","TextFeatureToSample","for","more","details",".",":","return",":","TextSet","with","Samples","."]
code: def generate_sample(self):
      """
      Generate BigDL Sample.
      Need to word2idx first.
      See TextFeatureToSample for more details.
  
      :return: TextSet with Samples.
      """
      jvalue = callZooFunc(
          self.bigdl_type, "textSetGenerateSample", self.value
      )
      return TextSet(jvalue=jvalue)
  
imports: import six
  from bigdl.util.common import JavaValue
  from zoo.common.utils import callZooFunc
  from pyspark import RDD
label_desc: Use image node_id 21 for calling the TextSet obj's underlying member method code with example usage: obj.generate_sample() and returns: TextSet