Giter Site home page Giter Site logo

infuse's Introduction

Infuse

This project aims to create a pdf-processing Rust library, ร  la Grobid, which can be used to read scientific pdfs as if they were normal web pages. It will then be integrated in a webapp by compiling the whole thing to Wasm.

The implementation is still embryonic. But there is an interesting presentation (37m talk, 18m questions), and associated slides!

Status

Reading pdfs works, in the browser also.

Current work is focused on piecing together the various objects encoded in the pdf in orderto reconstruct the tree of content, including full body text, while also classifying those pieces into the various types we're interested in (footnote, caption, metadata, body, ...).

Read more in the issues!

infuse's People

Contributors

wehlutyk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

infuse's Issues

Sequence assembly

Sequence assembly (thank you bioinformatics, again!) could be adapted to piece objects together using probabilities that they follow each other.

Ideas on what this could use:

  • n-grams
  • positioning heuristics (or learned):
    • if two blocks are positioned such that really follow each other, it's highly probable that they follow each other in content
    • a block NW of another block can't be the subsequent piece of content (you can only move in the NE, SE, SW quadrants)
  • formatting: content blocks that follow each other should have similar formatting (except cases like when it's a title that comes next)
  • linking figures and footnotes to the main text could be done using the numbers that appear in the main text, assuming we can classify figures and footnotes as such before (or at the same time as) inferring the body text sequence.

PDF decompression

On compressed pdfs, miniz actually needs miniz_oxide_c_api::libc::malloc, which is currently stubbed out to a panic!(). Figure out how to implement it.

Preliminary explorations

xml-rs and lopdf seem useful to bootstrap a pdfalto project.

Boilerplate wasm-bindgen hello world with added deps for those crates compiles: https://gist.github.com/wehlutyk/90836084cf85e3c98ca71556d1f03968

It needs modifications for lopdf, flate2-rs, and miniz_oxide to make it not use system libc or system miniz. This compiles.

Next step: load a test file with drag-and-drop, pass it to Rust, and output a few pieces of information using lopdf. Then, encode that information as xml using xml-rs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.