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

hasMarksfunction

Whether a word has a sense that carries any of some marks. JMdict gives a sense marks such as vulg, col, sl, arch, a field such as food or med, and a dialect such as ksb.

Import it

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

Definition

function hasMarks(word: Word, marks: readonly string[]): boolean

Parameters

NameTypeDescription
wordWord

A word a lookup returned.

marksreadonly string[]

The marks to look for.

Returns

boolean

True when any sense of the word carries any of the marks.

Examples

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

const word = { written: "紙", reading: "かみ", forms: ["紙"], meaning: "paper", senses: [{ marks: ["col"], glosses: ["paper"] }], kinds: "", common: true, rank: 1250, priority: ["news1"] };
console.log(hasMarks(word, ["col", "sl"])); // true
true

What it prints (run when this page was built)

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