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)