Example #1
0
 /// <summary>
 /// Create a tensor of n-grams based on the input data `data`.
 /// </summary>
 /// <param name="input"></param>
 /// <param name="width"></param>
 /// <param name="axis"></param>
 /// <param name="reduction_type"></param>
 /// <param name="string_separator"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static Tensor ngrams(Tensor input, int width,
                             int axis = -1,
                             Reduction reduction_type = Reduction.None,
                             string string_separator  = " ",
                             string name = null)
 => TextOps.ngrams(input, width,
                   axis: axis,
                   reduction_type: reduction_type,
                   string_separator: string_separator,
                   name: name);
Example #2
0
 public Tensor wordshape(Tensor input, WordShape pattern, string name = null)
 => TextOps.wordshape(input, pattern, name: name);