Table of Contents

Method DeriveAttachmentChunks

Namespace
MailFathom.Application.Emails.Chunking
Assembly
MailFathom.Application.dll

DeriveAttachmentChunks(string, EmailChunkingRules, EmbeddingInputBound, EmailChunkAttachmentSource)

Cuts the text one attachment yielded into chunks, in reading order, stopping at what one attachment may cost.

EmailChunkingResult DeriveAttachmentChunks(string text, EmailChunkingRules rules, EmbeddingInputBound bound, EmailChunkAttachmentSource source)

Parameters

text string

The text an extraction or a description derived from one attachment.

rules EmailChunkingRules

The boundaries to cut along, which are the message body's boundaries and not a second set.

bound EmbeddingInputBound

How much of the text to cut, beyond which the attachment's remainder yields no passage.

source EmailChunkAttachmentSource

The attachment the passages are spans of.

Returns

EmailChunkingResult

The chunks in reading order and what the ceiling left out, or an empty result when the attachment yielded no text.

Remarks

The same walk, the same rules, and the same determinism as the body cut, which is the whole of what ADR 0029 means by one kind of passage: a passage out of a contract and a passage out of the note that carried it are comparable because they were cut the same way and are embedded into the same space. What differs is the identity each passage is stored under, which source supplies, and the text being cut — the ordinals and offsets returned here index this attachment's text and nothing else.

Exceptions

ArgumentNullException

Thrown when any argument is null.