sschmidtu / anki-frequency-inserter Goto Github PK
View Code? Open in Web Editor NEWInserts Japanese word frequencies from the InnocentCorpus into your Anki notes/cards.
Inserts Japanese word frequencies from the InnocentCorpus into your Anki notes/cards.
An important addition will be inserting frequencies for (individual) Kanji, there’s separate frequency data for kanji as opposed to vocab, also from InnocentCorpus.
Since Kanji and Vocab cards are difficult to separate, we’ll probably have to make the user say what their kanji deck is named, so that it doesn’t accidentally use the vocab frequency.
see https://developer.chrome.com/blog/private-network-access-preflight/
Looks like they finally updated Chrome to block private network access if the request answerer (AnkiConnect) doesn't add the header to allow it.
It still works offline in Chrome, and online in Firefox and Edge, see the readme -> Troubleshooting section.
A solution to this would be patching AnkiConnect to add a setting in the config to set the Access-Control-Allow-Private-Network
header to true.
There are already a few issues in AnkiConnect about similar things related to CORS:
https://github.com/FooSoft/anki-connect/issues?q=is%3Aissue+CORS
e.g. this one:
FooSoft/anki-connect#201
They seem to recommend not using the API on a webpage due to the possibility of malicious websites changing your decks, though that is a pretty unlikely event (and not possible on my website, since it's open source and only doing very specific requests).
So, it would at least be nice to have the option to allow this.
Previously, the frequency field name (in your Anki cards) had to be "FrequencyInnocent", and the field from which a frequency was searched had to be "Front".
This is now customizable by e.g.:
ankiInserter.setExpressionFieldName("Expression");
ankiInserter.setFrequencyFieldName("FreqInnocent");
InnocentCampus is great, but with sourcing ~5000 novels, it's a little small (though mostly sufficient), and specific to books.
Alternatives would be sources using News, Movies, Wikipedia, Twitter, etc.
Ideally, we would be able to use any of these frequencies, by user choice (or insert all of them into different fields).
There's a popular Anime/J-Drama corpus -> research. (see next comment)
(It ranks words differently though, 1 = most common word, 2 = 2nd most common word, etc. - inverse relationship to InnocentCampus frequency, which is number of occurences. This actually lead to confusions in forums)
It's easy enough to exchange the corpus, right now it's just a Javascript object (Hashmap) called innocent_terms_complete
inserted as a global variable through a <script>
tag in the index.html.
It was generated via tools/parseCorpus.js
.
So currently frequency = innocent_terms_complete[word]
. (more or less)
Note for Latin nerds: the Latin plural is corpora, but corpuses is also an allowed plural in English. I love Latin, but English is not Latin.
Also, the plural of octopus is octopuses, not octopi, because it's a Greek word, not Latin, the Greek plural being octopodes. But the dictionary is generous and accepts all 3, reflecting common usage.
e.g. currently BCCWJ gives 536048 (very rare) for それとも, because it only has entries for 其れとも (995) and ソレトモ (536048), for some reason. Looks like a mistake to me, because それとも is usually written using kana alone.
Same for いよいよ / 愈.
I’ve put a lot of Wanikani items into Anki because i burned them on WK and forgot them, for example, and i’d like to know how many. I already have both fields for my notes, it’s just a hassle to fill them out. It’s also interesting to know whether a kanji or vocab is on WK or not. If it’s not, I put 0 in the level field.
(btw jisho.org’s WK information is outdated, but still an indication i guess)
so you can e.g. undo frequencies added with the "try reading" option
-> add new section "Notes where frequency will be removed:"
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.