-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from BobLd/nurminen-detect
Implement Simple Nurminen Detection Algorithm
- Loading branch information
Showing
12 changed files
with
974 additions
and
1,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Tabula.Detectors; | ||
using Tabula.Extractors; | ||
using UglyToad.PdfPig; | ||
using Xunit; | ||
|
||
namespace Tabula.Tests | ||
{ | ||
public class TestsNurminenDetector | ||
{ | ||
[Fact(Skip = "TO DO")] | ||
public void TestLinesToCells() | ||
{ | ||
using (PdfDocument document = PdfDocument.Open(@"test3.pdf", new ParsingOptions() { ClipPaths = true })) | ||
{ | ||
ObjectExtractor oe = new ObjectExtractor(document); | ||
PageArea page = oe.Extract(1); | ||
|
||
SimpleNurminenDetectionAlgorithm detector = new SimpleNurminenDetectionAlgorithm(); | ||
var regions = detector.Detect(page); | ||
|
||
foreach (var a in regions) | ||
{ | ||
IExtractionAlgorithm ea = new BasicExtractionAlgorithm(); | ||
var newArea = page.GetArea(a.BoundingBox); | ||
List<Table> tables = ea.Extract(newArea); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.