diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-07-01 16:37:50 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-07-01 16:37:50 +0200 |
commit | ce9e0788317b25e5d297ed38d9fed0754a341288 (patch) | |
tree | 29563a39c73ded16cd93eb7b5c5664d1ece944ac /examples | |
parent | 8ff39cbe6300ca479584fe7d85ff03a1f65bc9b0 (diff) |
WIP sentence API
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sentence-word-lookup.ts | 1 |
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(); |