Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Render" token level bounding boxes for a given paper sha #3

Closed
DeNeutoy opened this issue Aug 13, 2020 · 1 comment
Closed

"Render" token level bounding boxes for a given paper sha #3

DeNeutoy opened this issue Aug 13, 2020 · 1 comment
Assignees

Comments

@DeNeutoy
Copy link

Given a PDF which has been ingested into the pdf structure service using Grobid, we will then want to fetch the lowest level of token stream annotation to display "invisibly" on top of the PDF. This will allow functionality such as as "snapping" to a span, and also make it easy to correlate new annotations to the raw token stream.

An example response from this low level service would be:

GET /raw/{sha}/{page}/

Response:

                "pages": [
                    {
                        "page": {
                            "index": 0,
                            "width": 612.0,
                            "height": 792.0
                        },
                        "tokens": [
                            {
                                "text": "Journal",
                                "x": 90.0,
                                "y": 41.97740173339844,
                                "width": 27.878599166870117,
                                "height": 7.970099925994873,
                                "styleName": "style167"
                            },
                            {
                                "text": "of",
                                "x": 120.69999694824219,
                                "y": 41.97740173339844,
                                "width": 6.8224101066589355,
                                "height": 7.970099925994873,
                                "styleName": "style167"
                            },
                  ]
         }
]
@codeviking
Copy link
Contributor

A first pass at this is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants