FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/src/TensorFlowNET.Text/TextInterface.cs at master · AhmedZero/TensorFlow.NET · GitHub
AhmedZero
/
TensorFlow.NET
Public
forked from
SciSharp/TensorFlow.NET
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Text
/
TextInterface.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (34 loc) · 1.22 KB
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Text
/
TextInterface.cs
Copy path
File metadata and controls
37 lines (34 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL