-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
145 lines (122 loc) · 8.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html class="no-js" lang="vi">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Inserts Japanese word frequencies into your Anki notes/cards."/>
<meta property="og:description" content="Inserts Japanese word frequencies into your Anki notes/cards."/>
<meta property="og:image" content="https://github.com/sschmidTU/anki-frequency-inserter/blob/main/assets/img/favicon_256.png?raw=true"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="256"/>
<meta property="og:image:height" content="256"/>
<meta property="og:title" content="Anki Frequency Inserter"/>
<meta property="og:type" content="website"/>
<meta property="og:updated_time" content="1631042980"/>
<title>Anki Frequency Inserter</title>
<link href="assets/img/favicon.ico" rel="icon">
<link href="assets/css/style.css" media="screen, projection" rel="stylesheet" type="text/css">
</head>
<body>
<div role="main" class="main">
<h1><img src="assets/img/favicon.ico" height="32"/> Anki Frequency Inserter</h1>
<div id="subtitle" style="text-align: center" title="The frequencies are from InnocentCorpus, a corpus of ~5000 books, in absolute frequency. Frequency 1000 means the word occured 1000 times in these 5000 books.
Anything over 1000 is common, over 10000 very common (see Usage information link below).">
Inserts Japanese word frequencies into a preexisting field (<i>FrequencyInnocent</i>) in your <a href="https://apps.ankiweb.net/" class="a-blue">Anki</a> notes/cards.<br>
<a href="https://github.com/sschmidTU/anki-frequency-inserter#anki-frequency-inserter" class="a-blue">Usage information and disclaimer</a></div>
<hr>
<p title="Options">Options:</p>
<!--form id="optionsForm"-->
<label for="expressionFieldName" title="Name of the field in your Anki cards that has the word/expression for which the frequency should be searched. 'Front' by default, but depends on your Anki Note Types.">Name of expression field:</label>
<input type="text" id="expressionFieldName" name="expressionFieldName"><br>
<label for="freqFieldName" title="Name of the field in your Anki Cards where the frequency should be stored/inserted. You need to already have this field in your note types, see usage information above">Name of frequency field:</label>
<input type="text" id="freqFieldName" name="freqFieldName"><br>
<input type="checkbox" id="checkboxTryReading" name="checkboxTryReading" value="false">
<label for="checkboxTryReading" id="labelTryReading"
title="Try the reading field of your notes if no frequency was found for the Front/Expression field.
This finds more frequencies, but in a few cases can be misleading, e.g. 盗る (uncommon form of 取る/とる, 'steal' nuance of 'to take') maybe shouldn't show the frequency of 取る/とる (2396th most common word).">
Try Reading field for frequency (if none found for expression)</label>
<br>
<input type="checkbox" id="checkboxRemoveInvalidEntries" name="checkboxRemoveInvalidEntries" value="false">
<label for="checkboxRemoveInvalidEntries" id="labelRemoveInvalidEntries"
title="Delete the contents of the frequency field for notes that don't have a frequency found using current settings.
This could happen if you for example used the 'Try Reading field' option in the past, but want to revert that.">
Remove frequency entries that are not found using current settings</label>
<br>
<input type="checkbox" id="checkboxUpdateIncorrectEntries" name="checkboxUpdateIncorrectEntries" checked="true">
<label for="checkboxUpdateIncorrectEntries" id="labelUpdateIncorrectEntries"
title="Update frequencies that are a correctly formatted number but incorrect according to the frequency found using current settings.
For example, we will anyways update a frequency like '* FrequencyInnocent: 520' as returned by Yomichan,
but a frequency like '520' will only be changed with this option enabled.">
Update frequency entries that are incorrect according to current settings</label>
<br>
<input type="checkbox" id="checkboxTakeMostFrequent" name="checkboxTakeMostFrequent" checked="true">
<label for="checkboxTakeMostFrequent" id="labelTakeMostFrequent"
title="Take the most frequent frequency found among the forms of the word enabled via options (base form, reading field, furigana, hiragana/katakana, etc), instead of the first found.
For example, for the BCCWJ corpus, this will return 995 for それとも, instead of only 536048 (very rare), because BCCWJ for some reason has this as 其れとも.">
Take the most frequent frequency out of all forms of the word that are enabled</label>
<br>
<hr>
<a class="btn btn-blue" id="connectBtn" title='
Establish a connection to AnkiConnect, which will NOT change your Anki cards yet, but tell you which notes should have their frequency updated.
Changes are only done to your cards when you click "Update cards".'>Connect to AnkiConnect</a><!-- <i>(doesn't update your cards yet. Please accept the connection in Anki.)</i-->
<p title="Messages from Anki Inserter, or AnkiConnect responses">Information:</p>
<div class="logbox" id="infoBox">Loading, please wait...</div>
<p id="notesFreqNewBoxHeader">Notes where frequency will be newly added:</p>
<div class="logbox" id="notesFreqNewBox"></div>
<p id="changesBoxHeader">Notes where frequency will be changed:</p>
<div class="logbox" id="changesBox"></div>
<p id="removalsBoxHeader">Notes where frequency will be removed:</p>
<div class="logbox" id="removalsBox"></div>
<p id="noFreqFoundBoxHeader">Notes where no frequency was found in InnocentCorpus:</p>
<div class="logbox" id="noFreqFoundBox"></div>
<p id="noChangesBoxHeader">Notes that already have the correct frequency:</p>
<div class="logbox" id="noChangesBox"></div>
<a class="btn btn-blue" id="updateCardsBtn" title="
Sends the changes above to AnkiConnect, finally updating your Anki cards (notes).">Update cards</a>
<p id="updatedBoxHeader">Updated:</p>
<div class="logbox" id="updatedBox"></div>
<hr>
<div id="foot">
<p>@ 2022-06 <a href="https://github.com/sschmidTU/anki-frequency-inserter">
Anki Frequency Inserter v1.2.9.4</a> by <a href="https://community.wanikani.com/t/anki-word-frequency-inserter-learn-most-common-words-first/53407">Saimin@WK</a>
<br><span title="The frequencies are from InnocentCorpus, a corpus of ~5000 books, in absolute frequency. Frequency 1000 means the word occured 1000 times in these 5000 books.
Anything over 1000 is common, over 10000 very common (see Usage information link below).">
using InnocentCorpus (~5000 books)
</span>
<br>
<label for="testFrequencyFieldName" title="Test field to show the frequency for an expression you enter">Test: Show frequency for</label>
<input type="text" id="testFrequencyFieldName" name="testFrequencyFieldName" lang="ja" value="知る" size="6">:
<span class="testFrequencyAnswer" id="testFrequencyAnswer">Loading...</span>
<br><a href="https://sschmidtu.github.io/anki-frequency-inserter/index_BCCWJ.html?expressionFieldName=Front&frequencyFieldName=FrequencyBCCWJ"
title="Link to version of Frequency Inserter using BCCWJ corpus (Contemporary Written Japanese, relative frequency: 100 = 100th most common word), ~5.8MB to download on first visit">
Alternative: Version using BCCWJ corpus (~5.8MB)
</a>
</div>
</div>
<!-- show missing words -->
<div class="main" id="showMissingWordsDiv">
<br>
<script src="assets/js/wk_vocab_short.js"></script>
<div>
<p><i>Bonus: Show words missing in your Anki cards</i></p>
<br>
Show words between frequency <input type="text" id="missingWordsStartFreqInput" value="3500" size="4"> and <input type="text" id="missingWordsEndFreqInput" value="3510" size="4">:
<br>
<input type="checkbox" id="filterWKWordsCheckbox"/>
<label for="filterWKWordsCheckbox" title="Filter out vocabulary taught by wanikani.com">Don't show WK vocab</label>
<br>
<input type="checkbox" id="showExistingWordsCheckbox" value="false"/>
<label for="showExistingWordsCheckbox">Show words you have Anki cards for as well</label>
<br>
<a class="btn btn-blue" id="missingWordsBtn" title=''>Show Missing Words (Connect)</a>
<label id="missingWordsProgressLabel"></label>
<br>
<div class="logbox" id="missingWordsBox"></div>
<br>
</div>
<!-- /show missing words-->
<script src="assets/js/wanakana.min.js"></script><!-- for kana conversion, 24KB. needs to be loaded before frequencyInserter.js -->
<script src="assets/js/innocent_terms_complete.js"></script><!-- needs to be loaded before frequencyInserter.js -->
<script src="assets/js/frequencyInserter.js"></script>
</body>
</html>