How to use the dataprep.Page function in dataprep

To help you get started, we’ve selected a few dataprep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allenai / spv2 / dataprep.py View on Github external
def from_json(cls, json_page):
        return Page(
            width=float(json_page["width"]),
            height=float(json_page["height"]),
            tokens=[Token.from_json(t) for t in json_page.get("tokens", [])]
        )