archie-mckenzie / ltt Goto Github PK
View Code? Open in Web Editor NEWLarge text translator using vector embeddings and GPT-3.5
License: MIT License
Large text translator using vector embeddings and GPT-3.5
License: MIT License
Add a cost optimizer mode (not for code or text that includes code).
In this mode:
[ ] Remove all new lines and line breaks characters. Everything on a single line.
[ ] Remove all empy lines containing only space characters.
[ ] Remove all repeated spaces.
[ ] Replace repeated points (more than 2 times) with … (1 char)
[ ] Replace repeated punctuations used for q»uot»e and unquote with a single char version ('' becomes ", >> becomes »).
[ ] Replace the single quote character with double quote character (Example: 'Welcome' becomes "Welcome").
[ ] Remove all repeated punctuations (more than one time) (Example: "Yes!!!" becomes "Yes!").
[ ] Convert dates in numerical format (Example: "Fifteen December 1789" becomes "15/10/1789").
[ ] Convert numbers in numerical format (Example: "One Hundred Two Thousands" becomes "102000").
[ ] Convert times in numerical format when convenient (Example: "twelve past five" becomes "05:12").
[ ] Abbreviate titles (Example: "Mister, Missus and Missis" becomes "Mr, Mrs and Ms").
[ ] Replace 'and' with '&'
[ ] Remove all symbols except for punctuation, mathematical or economical (like asterisks, #, symbols, borders, lines, arrows, etc.).
[ ] Use the character - for bullet lists and remove all other symbols.
[ ] Replace the accent character after a letter with the corresponding accented letter (example: e' becomes è or é)
[ ] Remove all emojies, both literal and graphic (Example: "Hello! :-DDD" becomes "Hello!")
The user can enable or disable each one of those options.
The same options can be used for reducing the GPT answer tokens simply adding the above list in the Prompt (example:"You must always use the following rules when writing the answer: ..." )
When the program receive the translated text, it can reverse some of those shortening modifications. For example restoring '&' with 'and', adding line breaks and new lines to ease the reading, making the numbers more readable (example: 102000 becomes 102,000, etc.)
This can provide significants costs reduction when translating a long novel.
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.