Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CaseInsensitiveStringCollectionTokenizer.cs
1using System;
2using System.Collections.Generic;
3using System.Reflection;
4using System.Threading.Tasks;
6
8{
13 {
18 {
19 }
20
26 public Grade Supports(Type Type)
27 {
28 if (typeInfo.IsAssignableFrom(Type))
29 return Grade.Ok;
30 else
31 return Grade.NotAtAll;
32 }
33
34 private static readonly TypeInfo typeInfo = typeof(IEnumerable<CaseInsensitiveString>).GetTypeInfo();
35
41 public Task Tokenize(object Value, TokenizationProcess Process)
42 {
43 if (Value is IEnumerable<CaseInsensitiveString> Strings)
44 {
45 foreach (CaseInsensitiveString cis in Strings)
46 {
48 Process.DocumentIndexOffset++; // Make sure sequences of keywords don't cross element boundaries.
49 }
50 }
51
52 return Task.CompletedTask;
53 }
54
55 }
56}
Represents a case-insensitive string.
string LowerCase
Lower-case representation of the case-insensitive string.
Grade Supports(Type Type)
How well the tokenizer can tokenize objects of type Type .
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.
Interface for full-text-search tokenizers
Definition: ITokenizer.cs:12
Grade
Grade enumeration
Definition: Grade.cs:7