Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractTokenizer.cs
1using System;
2using System.Threading.Tasks;
6
8{
13 {
18 {
19 }
20
26 public Grade Supports(Type Type)
27 {
28 if (Type == typeof(Contract))
29 return Grade.Ok;
30 else
31 return Grade.NotAtAll;
32 }
33
39 public async Task Tokenize(object Value, TokenizationProcess Process)
40 {
41 if (Value is Contract Contract)
42 await Tokenize(Contract, Process);
43 }
44
50 public static async Task Tokenize(Contract Contract, TokenizationProcess Process)
51 {
52 if (!(Contract is null) &&
53 (Contract.State == ContractState.Signed ||
54 Contract.State == ContractState.Proposed ||
55 Contract.State == ContractState.Approved ||
56 Contract.State == ContractState.BeingSigned))
57 {
58 await RolesTokenizer.Tokenize(Contract.Roles, Contract, Process);
59 Process.DocumentIndexOffset++;
60 await ParametersTokenizer.Tokenize(Contract.Parameters, Contract, Process);
61 Process.DocumentIndexOffset++;
62 await HumanReadableTextsTokenizer.Tokenize(Contract.ForHumans, Contract, Process);
63 }
64 }
65 }
66}
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