Skip to content

Instantly share code, notes, and snippets.

View KevinDanikowski's full-sized avatar
💭
Codin ;)

Kevin Danikowski KevinDanikowski

💭
Codin ;)
  • Chicago
View GitHub Profile
@KevinDanikowski
KevinDanikowski / multi-lingual-url-formatter.js
Last active June 23, 2021 14:41
formats text into correct url format for any language
const noHyphenLangs = ['ko', 'ja', 'zh-cn', 'zh-tw', 'ar', 'th']
const formatTranslationIntoPath = (text, symbol) => { // utf-8 encoding
let t = text
const replaceChar = noHyphenLangs.includes(symbol) ? '' : '-'
t = t.replace(/-/g, ' ')
t = t.replace(/\s/g, replaceChar)
t = t.replace(/['`’]/g, '') // remove quotes
t = t.replace(/[,,()]/g, '') // remove junk
t = t.normalize('NFD').replace(/\p{Diacritic}/gu, '') // simplify letters for url https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript
@KevinDanikowski
KevinDanikowski / helsinki_language_code_options.json
Last active August 13, 2021 03:51
To and From directions for helsinki language model codes as of Aug 12, 2021 (to and from are sorted by level of estimated success)
{
"aav": {
"to": [{ "symbol": "en", "model": "Helsinki-NLP/opus-mt-aav-en" }],
"from": [{ "symbol": "en", "model": "Helsinki-NLP/opus-mt-en-aav" }]
},
"aed": {
"to": [{ "symbol": "es", "model": "Helsinki-NLP/opus-mt-aed-es" }],
"from": [{ "symbol": "es", "model": "Helsinki-NLP/opus-mt-es-aed" }]
},
"af": {
A wide variety of people use summary tools for different reasons. Students use tools of this kind because it’s generally required that a student must read a large quantity of text. Simply put, there’s not enough time to cover all texts required in rigorous study courses. Therefore, a text summary tool can help students to complete assignments on time while ensuring they understand the content. Students also use these tools to ensure their own written content covers the necessary topic. Teachers also have a lot of content to read, whether it’s for grading papers and reviewing student assignments, or creating lesson plans. A summarizer can quickly create an overview of any text, allowing teachers to avoid reviewing content that’s unrelated to the topic or focuses on assignments that need more attention than others. Journalists and editors use tools of this kind to condense information into bite-sized pieces. This improves the legibility of headlines and introductory paragraphs. Journalists also need to quote ma
Une grande variété de personnes utilisent des outils de synthèse pour différentes raisons. Les étudiants utilisent des outils de ce genre car il est généralement demandé à un étudiant de lire une grande quantité de texte. En termes simples, il n'y a pas assez de temps pour couvrir tous les textes requis dans des cours d'études rigoureux. Par conséquent, un outil de résumé de texte peut aider les étudiants à terminer leurs devoirs à temps tout en s'assurant qu'ils comprennent le contenu. Les étudiants utilisent également ces outils pour s'assurer que leur propre contenu écrit couvre le sujet nécessaire. Les enseignants ont également beaucoup de contenu à lire, que ce soit pour noter des copies et réviser les devoirs des élèves, ou pour créer des plans de cours. Un résumé peut rapidement créer une vue d'ensemble de n'importe quel texte, ce qui permet aux enseignants d'éviter de revoir du contenu sans rapport avec le sujet ou de se concentrer sur des devoirs qui nécessitent plus d'attention que d'autres. Les jou