Skip to the content

Jisho辞書

The words of JMdict looked up by reading, written form, English meaning, a kanji in them or romaji, in small pieces fetched as needed, safe by default or unfiltered with every sense's marks, and the school grades, JLPT levels, readings, meanings and look-alike pairs of 2,999 kanji, each table an entry point of its own.

Jisho is the Japanese word 辞書 for a dictionary: this one holds Japanese words and kanji. About the name

Contents

Reference · Look words up by reading, written form, English meaning, kanji or romaji

rankOfTagsfunction

One number for how common a word is, lower being commoner, made from its priority tags the way JMdict's own bands go: the newspaper band if it has one (nf01 is 250, and each band adds 500), else 12,000 for the first grade of any list and 24,000 for the second, else 100,000 for a word with no priority.

Import it

import { rankOfTags } from "@johnmorrisdotca/jisho/words";

Definition

function rankOfTags(tags: readonly string[]): number

Parameters

NameTypeDescription
tagsreadonly string[]

A word's priority tags, as JMdict writes them.

Returns

number

The rank.

Examples

import { rankOfTags } from "@johnmorrisdotca/jisho/words";

console.log(rankOfTags(["news1", "nf03"])); // 1250
console.log(rankOfTags([])); // 100000
1250
100000

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jisho 2.11.0.