Increase max distance for TextDirection.Other in NearestNeighbourWordExtractor

This commit is contained in:
BobLd
2020-01-17 11:49:21 +00:00
committed by Eliot Jones
parent a326d7e9d9
commit bc69376743

View File

@@ -64,7 +64,7 @@
List<Word> wordsU = GetWords( List<Word> wordsU = GetWords(
letters.Where(l => l.TextDirection == TextDirection.Other), letters.Where(l => l.TextDirection == TextDirection.Other),
(l1, l2) => Math.Max(Math.Abs(l1.GlyphRectangle.Width), Math.Abs(l2.GlyphRectangle.Width)) * 0.2, (l1, l2) => Math.Max(Math.Abs(l1.GlyphRectangle.Width), Math.Abs(l2.GlyphRectangle.Width)) * 0.5,
Distances.Euclidean, MaxDegreeOfParallelism) Distances.Euclidean, MaxDegreeOfParallelism)
.OrderByDescending(x => x.BoundingBox.Bottom) .OrderByDescending(x => x.BoundingBox.Bottom)
.ThenBy(x => x.BoundingBox.Left).ToList(); .ThenBy(x => x.BoundingBox.Left).ToList();