module WWWJDic

Author

Marco Bresciani

Copyright

Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani

License

GNU General Public License version 3

Constants

ALLOWED_PARAMS

Allowed parameters for configuration

ALL_PARAMS

All parameters for configuration

AVAIL_LANGS

Numeric codes for language-specific dictionaries

DICTIONARY_CODES

Numeric codes for dictionaries usage

DICTIONARY_NAMES

Naming for all supported dictionaries

DICTS_BY_CODES

Mapping between dictionaries names with codes

DICTS_BY_NAMES

Mapping between dictionaries codes with names

DISPLAY

Display modes

KANJIDIC_CODES

KANJIDIC letter codes (see www.edrdg.org/kanjidic/kanjidic.html)

U

the Unicode/ISO 10646 code of the kanji in hexadecimal;

N

the index in Nelson (Modern Reader's Japanese-English Character

Dictionary)

B

the classification radical number of the kanji (as in Nelson);

C

the “classical” radical number (where this differs from the one

used in Nelson);

S

the total stroke-count of the kanji;

G

the “grade” of the kanji, In this case, G2 means it is a Jouyou

(general use) kanji taught in the second year of elementary schooling in Japan;

H

the index in Halpern (New Japanese-English Character

Dictionary);

F

the rank-order frequency of occurrence of the kanji in Japanese;

P

the “SKIP” coding of the kanji, as used in Halpern;

K

the index in the Gakken Kanji Dictionary (A New Dictionary of

Kanji Usage);

L

the index in Heisig (Remembering The Kanji);

I

the index in the Spahn & Hadamitsky dictionary.

Q

the Four-Corner code;

MN,MP

the index and page number in the 13-volume Morohashi

“DaiKanWaJiten”;

E

the index in Henshall (A Guide To Remembering Japanese

Characters);

Y

the PinYin (Chinese) pronunciation(s) of the kanji;

KEYS

k is the key type:

for dictionary lookups
    for English keys use E, or P to get just "common words", Q

to get an “exact match” and R to get both;

for Japanese keys use J (this is mandatory for romaji keys),

P to get just “common words” (doesn't work with romaji), K for keys starting with kanji (first position), and L for kanji keys in any position.

for kanji lookups, use M followed by the KANJIDIC letter codes

(B, U, V, N, etc.) or J if a reading or kanji is being provided. An optional stroke-count or stroke-count range can be included by placing it between “=” characters;

for text glossing use G, or H to turn on the "no repeated

translations“ option.

for multi-radical kanji lookups use J for jouyou kanji-only, H

to include JIS X 0212 kanji, and X for anything else. An optional stroke-count or stroke-count range can be included by placing it between “=” characters.

for example sentence lookups with indexed words use E for EUC,

ISO-2022-JP or UCS, S for Shift_JIS and U for UTF-8, followed by “lookupword=n=kana=”. The kana is optional and is there to disambiguate between different headwords. For “n”, 1 => random selection of 10, anything else => display up to 100 sentences starting at n.

for example sentence lookups using a regular expression, use E

for EUC, ISO-2022-JP or UCS, S for Shift_JIS and U for UTF-8, followed by the search string. Up to 99 example sentences may be displayed.

TEST_REFERENCE_URI

Example basic URI (profile part) for testing purposes.

URIS

URIs for Backdoor Entry/API

URI_DEFAULT

Reference URI for Backdoor Entry/API

URI_OLD

Monash URI for Backdoor Entry/API

VERSION

Current version number for WWWJDic gem.

Public Class Methods

breener() click to toggle source

Creates a new WWWJDic object (from the verb 'to Breen'… :) ).

Usage
  • new_wwwjdic = WWWJDic::breener

Returns

a WWWJDic object.

   # File lib/wwwjdic.rb
41 def self.breener
42   WWWJDic.new(parser)
43 end