Scan companion.
Serving at https://chaya.shreevatsa.net/
Scan companion.
Serving at https://chaya.shreevatsa.net/
Maybe we can add a mark (ProseMirror term for things like "bold" and "italic") that can be used for end-of-line hyphens — in reading view or when chunks wrap, they should be hidden.
Right now, all the text from each page of OCR is processed into a single blob of text. We should instead use the line-level information and make smaller regions.
For now / MVP, it would be a good start to just get paragraphs into the output, rather than a single paragraph with all the text:
Lines 308 to 309 in d60d4d2
Lines 344 to 346 in d60d4d2
Also maybe the text/image zoom sliders?
Will likely need this
Add to the Prosemirror menu with three options:
I think the Ambuda one had it (even after my changes).
It should be possible to change the sizes.
(And also of course where the text is displayed: side-by-side, or below the image.)
Option to use Google OCR (bring your own key) instead of Tesseract.js
Before getting further into the code, would be good to implement the feature to:
.sc
file, andPart of this is UI work, and part is the actual serialization / deserialization.
Like the button to group lines into chunks, there should be a button to ungroup a chunk into single-line chunks.
This was implemented for #15 and is working. But I'm having second thoughts about this feature:
Some alternative ways to show which words were recognized:
Using line-widths, example. Idea by Andrew Ollett.
Edit: Even a heuristic of "group together adjacent lines if they have (roughly) the same xmin and xmax" may work.
Before making this public:
/versions/
that links to several index.html
files (chaya-202401.html
etc)
Looks like I need to install the package etc:
corepack enable
yarn init -2
yarn add prosemirror-state
yarn add pdfjs-dist
and build it:
# Build JS.
js-dev:
npx esbuild main.ts --outfile=main.js --bundle --watch --format=esm
# Build JS for production.
js-prod:
npx esbuild main.ts --outfile=main.js --bundle --minify --format=esm
Suggested by Suhas: when words get skipped by the OCR, would be useful to know.
Maybe we can draw rectangles around recognized words, or increase their relative brightness/opacity (or whatever), so that unrecognized words get noticed
Had mentioned it earlier in #17 but tracking it separately as that issue got closed.
A user (my mother) did a few pages, saved them, then (on a later day) opened the PDF file and ended up re-doing OCR, not knowing that she should have loaded from the saved file. I think we can be more prominent about "saved" v/s "new", then have the OCR options under New.
Continuing discussion from #7 (comment) — we want at least these types:
h1
, h2
etc)inline-block
or whatever, with wrapping) (unless in line-by-line mode)and a "footnote label", which is blank by default. (The point is that a single footnote may have multiple chunks, like paragraphs and verses.)
Sometimes a line
can span multiple lines, and right now there's no way to insert a line break within a line.
We could either:
line
be a <p>
, so that it contain line breaks internally.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.