Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ParametersTokenizer.cs
1using System;
2using System.Collections.Generic;
3using System.Reflection;
4using System.Threading.Tasks;
8
10{
15 {
20 {
21 }
22
28 public Grade Supports(Type Type)
29 {
30 if (typeInfo.IsAssignableFrom(Type))
31 return Grade.Ok;
32 else
33 return Grade.NotAtAll;
34 }
35
36 private static readonly TypeInfo typeInfo = typeof(IEnumerable<Parameter>).GetTypeInfo();
37
43 public async Task Tokenize(object Value, TokenizationProcess Process)
44 {
45 if (Value is IEnumerable<Parameter> Parameters)
46 await Tokenize(Parameters, null, Process);
47 }
48
55 public static async Task Tokenize(IEnumerable<Parameter> Parameters,
57 {
58 if (!(Parameters is null))
59 {
60 foreach (Parameter Parameter in Parameters)
61 {
63 Process.DocumentIndexOffset++; // Make sure sequences of keywords don't cross element boundaries.
64 }
65 }
66 }
67 }
68}
Contains information about a tokenization process.
uint DocumentIndexOffset
Document Index Offset. Used to identify sequences of tokens in a document.
Interface for full-text-search tokenizers
Definition: ITokenizer.cs:12
Grade
Grade enumeration
Definition: Grade.cs:7