From c5807938689f26b54f75c5a20f2412ff0ec05a69 Mon Sep 17 00:00:00 2001 From: Michael Aigner Date: Fri, 11 Sep 2020 09:23:27 +0200 Subject: [PATCH] fix test --- PDFSegmenter/util/GraphUtil.py | 2 +- test/Tester.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/PDFSegmenter/util/GraphUtil.py b/PDFSegmenter/util/GraphUtil.py index aaa066f..fd03e56 100644 --- a/PDFSegmenter/util/GraphUtil.py +++ b/PDFSegmenter/util/GraphUtil.py @@ -1,6 +1,6 @@ import networkx as nx import numpy as np -from util import constants +from PDFSegmenter.util import constants def get_graph_bounding_box(graph): diff --git a/test/Tester.py b/test/Tester.py index c2b6aaa..17a87ff 100644 --- a/test/Tester.py +++ b/test/Tester.py @@ -1,3 +1,9 @@ from PDFSegmenter.PDFSegmenter import PDFSegmenter segmenter = PDFSegmenter("../pdf/eu-001.pdf") +segmenter.segment_document() +text = segmenter.segments2text(annotate=True) +plain_text = segmenter.segments2text(annotate=False) +json = segmenter.segments2json() +graphs = segmenter.get_labeled_graphs() +print(graphs)