Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
TextFileTokenizer.cs
1using System;
2using System.IO;
3using System.Threading.Tasks;
4using Waher.Content;
7
9{
14 {
19 {
20 }
21
27 public Grade Supports(string Extension)
28 {
29 if (Extension == "txt")
30 return Grade.Ok;
31 else
32 return Grade.NotAtAll;
33 }
34
40 public async Task Tokenize(FileReference Reference, TokenizationProcess Process)
41 {
42 string Text = await Resources.ReadAllTextAsync(Reference.FileName);
43 StringTokenizer.Tokenize(Text, Process);
44 }
45 }
46}
Static class managing loading of resources stored as embedded resources or in content files.
Definition: Resources.cs:15
static async Task< string > ReadAllTextAsync(string FileName)
Reads a text file asynchronously.
Definition: Resources.cs:205
Contains a reference to an indexed file.
CaseInsensitiveString FileName
Name of collection hosting object.
async Task Tokenize(FileReference Reference, TokenizationProcess Process)
Tokenizes an object.
Grade Supports(string Extension)
How well the file tokenizer supports files of a given extension.
Task Tokenize(object Value, TokenizationProcess Process)
Tokenizes an object.
Contains information about a tokenization process.
Interface for file tokenizers. Best tokenizer is selected
Grade
Grade enumeration
Definition: Grade.cs:7