From 5e3f5651b804d582816ad548c34851b6a6c36365 Mon Sep 17 00:00:00 2001 From: BobLd <38405645+BobLd@users.noreply.github.com> Date: Fri, 27 Dec 2019 11:14:40 +0000 Subject: [PATCH] Update NearestNeighbourWordExtractor .cs Removing the font name check (`string.Equals(l1.FontName, l2.FontName, StringComparison.OrdinalIgnoreCase)`) because some special characters or ligature may belong to different subsets. --- .../DocumentLayoutAnalysis/NearestNeighbourWordExtractor .cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyToad.PdfPig/DocumentLayoutAnalysis/NearestNeighbourWordExtractor .cs b/src/UglyToad.PdfPig/DocumentLayoutAnalysis/NearestNeighbourWordExtractor .cs index 559e4228..e9eed907 100644 --- a/src/UglyToad.PdfPig/DocumentLayoutAnalysis/NearestNeighbourWordExtractor .cs +++ b/src/UglyToad.PdfPig/DocumentLayoutAnalysis/NearestNeighbourWordExtractor .cs @@ -117,7 +117,7 @@ namespace UglyToad.PdfPig.DocumentLayoutAnalysis distMeasure, maxDistanceFunction, l => l.EndBaseLine, l => l.StartBaseLine, l => !string.IsNullOrWhiteSpace(l.Value), - (l1, l2) => string.Equals(l1.FontName, l2.FontName, StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(l2.Value), + (l1, l2) => !string.IsNullOrWhiteSpace(l2.Value), maxDegreeOfParallelism).ToList(); List words = new List();