jzohrab / bidiread Goto Github PK
View Code? Open in Web Editor NEWA dead-simple github pages util to create a bidirectional reader
A dead-simple github pages util to create a bidirectional reader
Would be super to have a button to create simple machine translations of text using DeepL's service
DeepL has a paid API, but this could potentially just use their regular web page, called via javascript. They throttle excessive calls, so calls would need to be timed/throttled/limited.
Add js methods with tape tests:
makeChunks(srctext, maxsize=5000)
: take paragraphs from srctext, and join them into chunks of maxsize, breaking on paragraphs. Returns array of paras, eg "a \n b \n c"
=> [ "a \n b", "c" ]
for maxsize 2. Could potentiallyyield
results.getSingleTranslation(txt, srclang, destlang)
: call DeepL web page with some text, scrape the result, and return the text. src and dest langs are the deepL available languages.getTranslation(txt, srclang, destlang, updateCallback)
: main method, breaks txt into chunks and translates each. Needs to throttle the calls to getSingleTranslation, perhaps limit them. updateCallback is to update some UI or console, to track progress.If we need to use a node library, that should be ok, Parcel should hopefully be able to bundle things correctly.
Add UI:
Translating ... 90% done ("Cuando era niño, mi madre siempre me decía ...")
, and append the data to the destination boxA 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.