Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NeuroFeatureTokenizer.cs
1using System;
2using System.Threading.Tasks;
8
10{
15 {
20 {
21 }
22
28 public Grade Supports(Type Type)
29 {
30 if (Type == typeof(Token))
31 return Grade.Ok;
32 else
33 return Grade.NotAtAll;
34 }
35
41 public async Task Tokenize(object Value, TokenizationProcess Process)
42 {
43 if (Value is Token Token)
44 await Tokenize(Token, Process);
45 }
46
52 public static async Task Tokenize(Token Token, TokenizationProcess Process)
53 {
54 if (!(Token is null) &&
55 Token.Visibility == ContractVisibility.PublicSearchable)
56 {
58 Process.DocumentIndexOffset++;
60 Process.DocumentIndexOffset++;
61
62 if (!string.IsNullOrEmpty(Token.Description))
63 {
65 string Text = await Doc.GeneratePlainText();
66
67 StringTokenizer.Tokenize(Text, Process);
68 }
69 }
70 }
71 }
72}
Contains a markdown document. This markdown document class supports original markdown,...
async Task< string > GeneratePlainText()
Generates Plain Text from the markdown text.
static Task< MarkdownDocument > CreateAsync(string MarkdownText, params Type[] TransparentExceptionTypes)
Contains a markdown document. This markdown document class supports original markdown,...
Task Tokenize(object Value, TokenizationProcess Process)
Tokenizes an object.
Contains information about a tokenization process.
uint DocumentIndexOffset
Document Index Offset. Used to identify sequences of tokens in a document.
string Category
A category for the token.
Definition: Token.cs:481
ContractVisibility Visibility
Visibility of token
Definition: Token.cs:167
string FriendlyName
A friendly name for the token.
Definition: Token.cs:472
string Description
Description Markdown for the token.
Definition: Token.cs:491
Tokenizes (for full-text-search) a Neuro-Feature token.
async Task Tokenize(object Value, TokenizationProcess Process)
Tokenizes an object.
static async Task Tokenize(Token Token, TokenizationProcess Process)
Tokenizes a set of strings.
Grade Supports(Type Type)
How well the tokenizer can tokenize objects of type Type .
NeuroFeatureTokenizer()
Tokenizes (for full-text-search) a Neuro-Feature token.
Interface for full-text-search tokenizers
Definition: ITokenizer.cs:12
Grade
Grade enumeration
Definition: Grade.cs:7