7 instantiations of IngestionDocumentImage
Microsoft.Extensions.DataIngestion.Markdig (1)
MarkdownParser.cs (1)
119IngestionDocumentImage result = new(elementMarkdown);
Microsoft.Extensions.DataIngestion.MarkItDown (1)
src\Libraries\Microsoft.Extensions.DataIngestion.Markdig\MarkdownParser.cs (1)
119IngestionDocumentImage result = new(elementMarkdown);
Microsoft.Extensions.DataIngestion.Tests (5)
Processors\AlternativeTextEnricherTests.cs (5)
67IngestionDocumentImage documentImage = new($"![](nonExisting.png)") 74IngestionDocumentImage tableCell = new($"![](another.png)") 81IngestionDocumentImage imageWithAltText = new($"![](noChangesNeeded.png)") 88IngestionDocumentImage imageWithNoContent = new($"![](noImage.png)") 189IngestionDocumentImage image = new($"![](image{i}.png)")
26 references to IngestionDocumentImage
Microsoft.Extensions.DataIngestion (10)
Chunkers\ElementsChunker.cs (2)
61IngestionDocumentImage image => image.AlternativeText ?? image.Text, 245IngestionDocumentImage img => img.AlternativeText ?? img.Text,
Chunkers\SemanticSimilarityChunker.cs (1)
66string? semanticContent = element is IngestionDocumentImage img
Processors\ImageAlternativeTextEnricher.cs (7)
15/// Enriches <see cref="IngestionDocumentImage"/> elements with alternative text using an AI service, 40List<IngestionDocumentImage>? batch = null; 44if (element is IngestionDocumentImage image) 62if (cell is IngestionDocumentImage cellImage && ShouldProcess(cellImage)) 85private static bool ShouldProcess(IngestionDocumentImage img) => 88private async Task ProcessAsync(List<IngestionDocumentImage> batch, CancellationToken cancellationToken) 91foreach (var image in batch)
Microsoft.Extensions.DataIngestion.Abstractions (1)
IngestionDocumentElement.cs (1)
203/// Initializes a new instance of the <see cref="IngestionDocumentImage"/> class.
Microsoft.Extensions.DataIngestion.Markdig (2)
MarkdownParser.cs (2)
117private static IngestionDocumentImage MapImage(string elementMarkdown, LinkInline link) 119IngestionDocumentImage result = new(elementMarkdown);
Microsoft.Extensions.DataIngestion.MarkItDown (2)
src\Libraries\Microsoft.Extensions.DataIngestion.Markdig\MarkdownParser.cs (2)
117private static IngestionDocumentImage MapImage(string elementMarkdown, LinkInline link) 119IngestionDocumentImage result = new(elementMarkdown);
Microsoft.Extensions.DataIngestion.Tests (11)
IngestionPipelineTests.cs (1)
180.OfType<IngestionDocumentImage>()
Processors\AlternativeTextEnricherTests.cs (5)
67IngestionDocumentImage documentImage = new($"![](nonExisting.png)") 74IngestionDocumentImage tableCell = new($"![](another.png)") 81IngestionDocumentImage imageWithAltText = new($"![](noChangesNeeded.png)") 88IngestionDocumentImage imageWithNoContent = new($"![](noImage.png)") 189IngestionDocumentImage image = new($"![](image{i}.png)")
Readers\DocumentReaderConformanceTests.cs (2)
123Assert.Contains(elements, element => element is IngestionDocumentImage img && img.Content.HasValue && !string.IsNullOrEmpty(img.MediaType)); 209Assert.All(elements.Where(element => element is not IngestionDocumentImage), element => Assert.NotEmpty(element.GetMarkdown()));
Readers\MarkdownReaderTests.cs (3)
91var images = document.EnumerateContent().OfType<IngestionDocumentImage>().ToArray(); 129IngestionDocumentImage img = Assert.IsType<IngestionDocumentImage>(table.Cells[1, 1]);