2 Star 1 Fork 1

SciSharp STACK/TensorFlow.NET

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TextInterface.cs 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
一剑 提交于 2020-12-19 23:31 +08:00 . Add Tensorflow.Text project.
using System;
using System.Collections.Generic;
using System.Text;
using Tensorflow.Text.Tokenizers;
namespace Tensorflow.Text
{
public class TextInterface
{
public ITokenizer WhitespaceTokenizer()
=> new WhitespaceTokenizer();
public Tensor wordshape(Tensor input, WordShape pattern, string name = null)
=> TextOps.wordshape(input, pattern, name: name);
/// <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);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/scisharp/TensorFlow.NET.git
git@gitee.com:scisharp/TensorFlow.NET.git
scisharp
TensorFlow.NET
TensorFlow.NET
master

搜索帮助