Example #1
0
 public TextVectorization(TextVectorizationArgs args)
     : base(args)
 {
     this.args  = args;
     args.DType = TF_DataType.TF_STRING;
     // string standardize = "lower_and_strip_punctuation",
 }
Example #2
0
        public TextVectorization(TextVectorizationArgs args)
            : base(args)
        {
            this.args  = args;
            args.DType = TF_DataType.TF_STRING;
            // string standardize = "lower_and_strip_punctuation",

            var mask_token = args.OutputMode == "int" ? "" : null;

            _index_lookup_layer = new StringLookup(max_tokens: args.MaxTokens,
                                                   mask_token: mask_token,
                                                   vocabulary: args.Vocabulary);
        }