parameters: (self, texts)
return_statement: return tensor, words_length
docstring: 文本输入转为Paddle输入的Tensor
docstring_summary: 文本输入转为Paddle输入的Tensor
docstring_tokens: 文本输入转为Paddle输入的Tensor
function: def texts2tensor(self, texts):
          """文本输入转为Paddle输入的Tensor"""
          lod, data, words_length = [0], [], []
          for i, text in enumerate(texts):
  
              text_inds = self.dataset.word_to_ids(text)
              data += text_inds
              lod.append(len(text_inds) + lod[i])
  
          tensor = self.to_tensor(data, lod) if len(data) != 0 else None
  
          return tensor, words_length
function_tokens: def texts2tensor ( self , texts ) : lod , data , words_length = [ 0 ] , [ ] , [ ] for i , text in enumerate ( texts ) : text_inds = self . dataset . word_to_ids ( text ) data += text_inds lod . append ( len ( text_inds ) + lod [ i ] ) tensor = self . to_tensor ( data , lod ) if len ( data ) != 0 else None return tensor , words_length