This repository has been archived on 2024-06-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thesis-src/Ocr/Ocr.Tesseract/ToLowerProcessor.cs
2023-08-10 09:04:36 +02:00

25 lines
509 B
C#

using Ocr.Tesseract.Models;
using Process.Abstract;
using System.Collections.Generic;
namespace Ocr.Tesseract;
/// <summary>
/// Converts the <see cref="Word.Text"/> strings to lowercase
/// </summary>
public class ToLowerProcessor
: Processor<ScanResult, ScanResult>
{
/// <inheritdoc />
public override IEnumerable<ScanResult> Process(
IEnumerable<ScanResult> inputs
)
{
foreach (var kv in inputs)
{
kv.Word.Text = kv.Word.Text.ToLower();
yield return kv;
}
}
}