aboutsummaryrefslogtreecommitdiff
path: root/examples/sentence-word-lookup.ts
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-07-01 16:37:50 +0200
committerlonkaars <loek@pipeframe.xyz>2023-07-01 16:37:50 +0200
commitce9e0788317b25e5d297ed38d9fed0754a341288 (patch)
tree29563a39c73ded16cd93eb7b5c5664d1ece944ac /examples/sentence-word-lookup.ts
parent8ff39cbe6300ca479584fe7d85ff03a1f65bc9b0 (diff)
WIP sentence API
Diffstat (limited to 'examples/sentence-word-lookup.ts')
-rw-r--r--examples/sentence-word-lookup.ts1
1 files changed, 1 insertions, 0 deletions
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();