Class EmailChunkingRules
- Namespace
- MailFathom.Application.Emails.Chunking
- Assembly
- MailFathom.Application.dll
The boundaries one message's extracted text is cut along, and the version those boundaries are known by.
public sealed class EmailChunkingRules
- Inheritance
-
EmailChunkingRules
- Inherited Members
Remarks
These rules are the whole of what a chunker may vary, which is what lets EmailChunkContentHash cover them: a chunk's identity states the text it holds and the rules that produced it, so a vector hanging on that chunk is attributable to both. See ADR 0006, which places the boundary rules here rather than in the embedding profile, so re-cutting a mailbox costs local computation instead of a provider bill.
RuleSetVersion is not what makes the rules take effect and nothing reads it to decide correctness — the hash already covers every field below. It exists so a backfill can be asked how much of a mailbox is still cut to the previous rules, which is a question a hash has no answer to. Change any other member and increment it in the same edit.
Deliberately not a record: two rule sets are never compared, and the value equality a record would publish would compare the separator ladder by reference and report two identical rule sets as different.
Properties
- BoundarySeparators
Gets the separators a chunk is preferably ended after, from the strongest to the weakest.
- Current
Gets the rules every chunk MailFathom derives today is cut to.
- MinimumCharacterCount
Gets the number of characters a chunk must reach before a separator inside the window may end it.
- OverlapCharacterCount
Gets how far back into the previous chunk the next one starts.
- RuleSetVersion
Gets the version these rules are recorded under, which a chunk carries beside its hash.
- SourceForm
Gets which reading of the message body the chunks are cut from.
- TargetCharacterCount
Gets the greatest number of characters one chunk may hold.
Methods
- Create(int, int, int, int, IReadOnlyList<string>, EmailChunkSourceForm)
Builds a rule set, refusing one that could not cut text into chunks that make progress.