From ce9e0788317b25e5d297ed38d9fed0754a341288 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 1 Jul 2023 16:37:50 +0200 Subject: WIP sentence API --- examples/sentence-word-lookup.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'examples') diff --git a/examples/sentence-word-lookup.ts b/examples/sentence-word-lookup.ts index 6fd57bd..d60ffbf 100644 --- a/examples/sentence-word-lookup.ts +++ b/examples/sentence-word-lookup.ts @@ -17,6 +17,7 @@ var sentence = await api.sentence("この紅茶は甘すぎる"); var word = sentence.words.find(w => w.writing == "紅茶"); // filter terms by writing (matches first only) // var word = sentence.first("紅茶"); // reference substring (matches first only) // var word = sentence.words[1]; // reference word index (depends on correct deconjugations/parsing) +console.log(word); // Fetch definitions for word var glossary = await word?.glossary(); -- cgit v1.2.3