From 8e548a17eba180b5773a9900de3f3cb3a92ec6ff Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 17 Dec 2021 16:44:14 -0500 Subject: Dictionary database term source info (#2039) * Update DictionaryDatabase._findMultiBulk's createResult callback signature * Simplify _splitField use * Update sequence * Expose new fields 'matchType' and 'matchSource' as part of term data * Expose matchType and matchSource as part of TermSource * Update sourceTermExactMatchCount calculation * Update test data * Expose matchType and matchSource info in HTML attributes * Add primaryMatchTypes attribute --- docs/interfaces/dictionary-entry.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') diff --git a/docs/interfaces/dictionary-entry.ts b/docs/interfaces/dictionary-entry.ts index 2609a42a..16bc5eca 100644 --- a/docs/interfaces/dictionary-entry.ts +++ b/docs/interfaces/dictionary-entry.ts @@ -435,6 +435,16 @@ namespace Translation { * The final text after applying deinflections. */ deinflectedText: string; + /** + * How the deinflected text matches the value from the database. + * Value can be one of: 'exact', 'prefix', 'suffix' + */ + matchType: string; + /** + * Which field was used to match the database entry. + * Value can be one of: 'term', 'reading', 'sequence' + */ + matchSource: string; /** * Whether or not this source is a primary source. Primary sources are derived from the * original search text, while non-primary sources originate from related terms. -- cgit v1.2.3