Closed lfoppiano closed 5 months ago
is it possible to add two more methods:
set_annotations(annotations=[])
: set the annotations and draw them on the PDFclear_annotations()
: remove the annotations from the pdfIn this document there seems to be a problem with the annotations.
We could ask each page heights and width as an optional argument of the main method
This is what grobid could provide as information about pages:
<facsimile>
<surface n="1" ulx="0.0" uly="0.0" lrx="634.32" lry="833.04"/>
<surface n="2" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="3" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="4" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="5" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="6" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="7" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="8" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="9" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="10" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="11" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="12" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="13" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="14" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="15" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="16" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
<surface n="17" ulx="0.0" uly="0.0" lrx="595.276" lry="841.89"/>
</facsimile>
To show annotations generated by GROBID, which branch or environment are you using?
What I use is below
Now, I am trying to integrate the show annotations
button.
https://github.com/lfoppiano/document-qa/commit/b325c610c654505266d5a7dbef11439015bf4eed
The branch show-annotations
was already merged, so you can keep using it or create a new one.
For testing or development, at this stage, please use the https://github.com/lfoppiano/structure-vision project instead of document-qa.
The usage should be something like:
annotations should contains data in the following format:
Tasks:
add two more methodsset_annotations(annotations=[]): set the annotations and draw them on the PDFclear_annotations(): remove the annotations from the pdf