contrib/fugounashi

scripts to support RTK and Japanese sentences in anki

contents

readme

the following file types are used:

franki

field replacement for anki

franki-1.4.py

Usage: franki options
-h for help
see http://ichi2.net/anki/ContribFugounashi#franki for more info

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -q, --quiet           don't print status messges
  -v, --verbose         print modified records

  Required Options:
    Each of the following options must be specified.

    -d DECK, --deck=DECK
                        anki deck file
    -f FILE, --file=FILE
                        replacement data file, utf-8, tab separated fields
                        numbered from 1
    -m MODEL, --model=MODEL
                        model name in DECK
    -k NAME NUMBER, --key=NAME NUMBER
                        field name NAME in DECK to be matched with field
                        number NUMBER in FILE
    -r NAME NUMBER, --replace=NAME NUMBER
                        field name NAME in DECK to be replaced with field
                        number NUMBER from FILE, can be specified multiple
                        times

if you'd like a gui alternative see this ticket

swanki

suspend words in anki

swanki-1.22.py

sample additional question card template:

<!--fon--><span style='font-size: larger'>%(swanki-seen-prompt)s</span>
%(swanki-new-prompt)s<!--foff-->

kore

core2k+core6k complete, enhanced and sorted by kanji

download import file: kore-1.7.txt

discussion on revtk forums

Fields

number

name

example

1

vocab-expression

嗅ぐ

2

vocab-kana

かぐ

3

vocab-meaning

smell, sniff

4

vocab-sound-remote

[sound:http://assets3.smart.fm/assets/legacy/JLL/audio/Int/JW03341A.mp3]

5

vocab-sound-local

[sound:JLL-audio-Int-JW03341A.mp3]

6

vocab-pos

Verb

7

vocab-id

439323

8

sentence-expression

犬がお皿の匂いをクンクン<b>嗅いでいる</b>ね。

9

sentence-kana

いぬ が おさら の におい を くんくん <b>かいで いる</b> ね

10

sentence-meaning

The dog sniffed at the smell on the plate.

11

sentence-sound-remote

[sound:http://assets3.smart.fm/assets/legacy/JLL/audio/Int/JS03341A.mp3]

12

sentence-sound-local

[sound:JLL-audio-Int-JS03341A.mp3]

13

sentence-id

277649

14

list

24631

15

list-index

246

16

index

3746

17

sentence-lookup

犬 【いぬ】 (n) (1) dog (Canis (lupus) familiaris); (2) snoop (i.e. a detective, a spy, etc.); (n-pref) (3) counterfeit; inferior; useless; wasteful; (P); EP <br>お皿 【おさら】 (n) (See 皿) plate; dish; ED <br>匂い 【におい】 (n) (1) odour; odor; scent; smell; stench; (2) aura; whiff; smacks of ...; sense; flavour; flavor; (P); EP <br>クンクン (n,adv,vs) (on-mim) sniff; ED <br>Possible inflected verb or adjective: (te-form)<br>嗅ぐ 【かぐ】 (v5g,vt) to sniff; to smell; (P); EP <br>

18

vocab-furigana

嗅[か]ぐ

19

sentence-furigana

犬[いぬ]がお 皿[さら]の 匂[にお]いをクンクン<b> 嗅[か]いでいる</b>ね。

20

rtk-index

6000

21

rtk-kanji

4541 嗅

22

ko2001-index

5974

23

ko2001-kanji

3534 嗅

24

freq-index

5887

25

freq-kanji

1534 嗅

26

rtkliteko2001-index

6000

27

rtkliteko2001-kanji

5753 嗅

28

jlpt

JLPT2

attachment:kore-graph-1280-3.png

sample template:

   1 <span style="font-size: larger;"><span style="font-size: larger;">%(vocab-expression)s: %(sentence-expression)s</span></span>

   1 <span style="font-size: larger;"><span style="font-size: larger;"><!--fon-->%(vocab-furigana)s: %(sentence-furigana)s</span></span>
   2 %(vocab-meaning)s: %(sentence-meaning)s<!--foff-->
   3 
   4 <span style="font-size: smaller;">%(sentence-lookup)s<span>
   5 
   6 %(rtkliteko2001-index)s %(rtkliteko2001-kanji)s %(vocab-sound-local)s %(sentence-sound-local)s

original import file, graphs and sound files generated with the following:

kore-1.7.sh kore-dic.txt kore-fix.txt

requires #scanki #cranki #lookup-sentences #kanji-sort #kanji-freq #kanji-count #kanji-info

xxfurigana

plugin to control furigana display

extends JapaneseSupport (required) as follows:

use the following HTML comments in the card template (effective from that point on until the next comment or the end of the template):

<!--fon-->

<!--ftip-->

<!--fbigtip-->

<!--fnokanji-->

<!--fnofuri-->

<!--foff-->

xfurigna plugin by Victor Suba, modified as follows:

download from within anki

scanki

smart.fm converter for anki

downloads lists from smart.fm and converts to text

scanki-1.23.sh

sample lists files:

core2k-lists.txt core6k-lists.txt ko2001-lists.txt

Usage: scanki [OPTION] < LISTSFILE 

  -s    download sound
  -v    include vocab only (no sentences)
  LISTSFILE: smart.fm list ids, 1 per line

Examples:

  $ ./scanki [-v] < ./core2k-lists.txt > ./core2k.txt
  $ mkdir core2k.media; cd core2k.media; ../scanki -s [-v] < ../core2k-lists.txt

Fields

number

number (-v)

name

example

1

1

vocab-expression

嗅ぐ

2

2

vocab-kana

かぐ

3

3

vocab-meaning

smell, sniff

4

4

vocab-sound-remote

[sound:http://assets3.smart.fm/assets/legacy/JLL/audio/Int/JW03341A.mp3]

5

5

vocab-sound-local

[sound:JLL-audio-Int-JW03341A.mp3]

6

6

vocab-pos

Verb

7

7

vocab-id

439323

8

sentence-expression

犬がお皿の匂いをクンクン<b>嗅いでいる</b>ね。

9

sentence-kana

いぬ が おさら の におい を くんくん <b>かいで いる</b> ね

10

sentence-meaning

The dog sniffed at the smell on the plate.

11

sentence-sound-remote

[sound:http://assets3.smart.fm/assets/legacy/JLL/audio/Int/JS03341A.mp3]

12

sentence-sound-local

[sound:JLL-audio-Int-JS03341A.mp3]

13

sentence-id

277649

14

8

list

24631

15

9

list-index

246

16

10

index

3746

compared with the smart.fm import plugin:

see #kore for more example usage

requires xmlstarlet

cranki

convert readings for anki

combines kana-only reading and mixed kanji/kana expression into new furigana reading field

cranki-1.12.pl

usage: 
  cranki --kanji KANJIFIELD --kana KANAFIELD [ --dic DICFILE ] < INFILE > OUTFILE

  KANJIFIELD: field number (starting from 0) of field in INFILE containing kanji expression
  KANAFIELD: field number (starting from 0) of field in INFILE containing corresponding kana expression
  DICFILE: optional reading examples used to disambiguate multiple matches
  INFILE: tab separated
  OUTFILE: has new furigana reading field appended
   
example:
  cranki --kanji 0 --kana 1 --dic dic.txt < in.txt > out.txt

missing fields and unmatchable lines are reported to stderr and marked in the output
multiple matches are reported to stderr and multiple options are marked and included in output

contains extra logic for smart.fm: handles missing punctuation in kana field, skips unmatchable <b> tags, and uses spaces in kana field to disambiguate multiple matches

import into existing deck with #franki

see #kore for more example usage

kanji-graph

graph kanji occurrences in sorted sentences

kanji-graph-1.3.sh

requires #kanji-count #kanji-occurrences #kanji-sort #kanji-freq

attachment:ko2001-sort-none-2.png attachment:ko2001-sort-freqko2001-2.png attachment:ko2001.png attachment:ko2001-freq.png

kanji-count

report cumulative new kanji use in a collection of sentences

kanji-count-1.6.pl

kanji-occurrences

find first and remaining kanji occurrences in a collection of sentences

kanji-occurrences-1.4.pl

kanji-sort

given a kanji list sort the input according to the furthest position in the list of all the kanji in a designated field of the input

kanji-sort-1.5.pl

sample kanji orders:

kanji-rtk.txt kanji-rtk3.txt kanji-ko2001-1.2.txt kanji-rtkliteko2001.txt

kanji-freq

report kanji frequency distribution in the specified field of the input

kanji-freq-1.1.pl

kanji-info

RTK name and number and vocab from #kanji-vocab indexed by kanji for use with ankitty

kanji-info-1.18.txt

you can also include your stories and other info from your RTK deck by rebuilding with the following script

kanji-info-1.18.sh

requires #cranki and #kanji-freq

kanji-vocab

JLPT, core2k and ko2001 vocab arranged by kanji. Can be used to provide Japanese prompts for (most of) RTK. Covers 1998 kanji (1760/2042 RTK1, 201/964 RTK3, 37 extra).

kanji-vocab-1.15.png

Contains three tab-separated fields: kanji, vocab, and prompt. Vocab contains words from JLPT, core2k and ko2001 preceded by combinations of '4', '3', '2', '1', 'c' or 'k', in anki furigana reading format. Prompt is the same as vocab but with the target kanji obscured.

import into your deck with #franki if deck is in use, otherwise into a new deck

enable furigana in question or other fields using the #xxfurigana plugin

kanji-vocab-1.18.txt

lookup-sentences

looks up a gloss for each word in a sentence using the WWWJDIC Text Word Translation service (docs)

export deck, run through the script, import back into your deck with #franki if deck is in use, otherwise into a new deck

the only argument is the expression field number, output has definition field appended

lookup-sentences-1.3.sh

ankitty

ankitty is a curses-based review-only anki client for embedded unix devices

grid

add a drawing grid to kanji as a writing aid

gridcrop.png

download the revtk kanji-drawing-grid.gif into the media directory and add the following to the card template

grid-1.1.txt

heisighelper

plugin and script to lookup rtk kanji in dictionary, offline copy of revtk, or page in a rtk pdf

plugin broken by current anki release

heisighelper-1.3.sh heisighelper-1.3.py

revtkrip

make an offline mirror of stories from RevTK

includes table of contents

Usage: revtkrip -u USERNAME -p PASSWORD 

revtkrip-1.3.sh

revtkrip-20100507.zip

heisig-page

mapping of heisig number to RTK 4ed page number

import into your deck with #franki if deck is in use, otherwise into a new deck

heisig-page-1.3.txt

errata

combines RTK 4ed pdf with the errata pdf and adds destinations for the book page numbers

errata-install-1.3.sh errata-map-1.3.txt

overwrite fields

this plugin is no longer supported (not maintained and no help will be provided), please use #franki instead

plugin to overwrite existing fields with data from an external file

AnkiWiki: ContribFugounashi (last edited 2010-09-23 23:38:04 by cangy)