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
| Name | Type | Description |
|---|---|---|
tags | readonly 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([])); // 1000001250
100000What it prints (run when this page was built)