summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-04-15 19:47:14 +0200
committerGitHub <noreply@github.com>2024-04-15 17:47:14 +0000
commitafd6e172669cdd148f53c1776ec449f4b1926ace (patch)
tree41dfc9138540e15fb352f264dbf980be42f01f58
parentf5a6b25e8d3331fce1cc5145bb7b21f2081743fe (diff)
improve term sorting (#806)24.4.15.0
* improve term sorting * edge case
-rw-r--r--ext/js/language/translator.js33
-rw-r--r--test/data/translator-test-results.json218
-rw-r--r--types/ext/dictionary.d.ts4
3 files changed, 134 insertions, 121 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js
index af275c07..6132ee82 100644
--- a/ext/js/language/translator.js
+++ b/ext/js/language/translator.js
@@ -1547,12 +1547,12 @@ export class Translator {
* @param {number} dictionaryIndex
* @param {number} dictionaryPriority
* @param {number} sourceTermExactMatchCount
- * @param {number} maxTransformedTextLength
+ * @param {number} maxOriginalTextLength
* @param {import('dictionary').TermHeadword[]} headwords
* @param {import('dictionary').TermDefinition[]} definitions
* @returns {import('dictionary').TermDictionaryEntry}
*/
- _createTermDictionaryEntry(isPrimary, inflectionRuleChainCandidates, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount, maxTransformedTextLength, headwords, definitions) {
+ _createTermDictionaryEntry(isPrimary, inflectionRuleChainCandidates, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount, maxOriginalTextLength, headwords, definitions) {
return {
type: 'term',
isPrimary,
@@ -1562,7 +1562,7 @@ export class Translator {
dictionaryIndex,
dictionaryPriority,
sourceTermExactMatchCount,
- maxTransformedTextLength,
+ maxOriginalTextLength,
headwords,
definitions,
pronunciations: [],
@@ -1602,7 +1602,7 @@ export class Translator {
const {index: dictionaryIndex, priority: dictionaryPriority} = this._getDictionaryOrder(dictionary, enabledDictionaryMap);
const sourceTermExactMatchCount = (isPrimary && deinflectedText === term ? 1 : 0);
const source = this._createSource(originalText, transformedText, deinflectedText, matchType, matchSource, isPrimary);
- const maxTransformedTextLength = transformedText.length;
+ const maxOriginalTextLength = originalText.length;
const hasSequence = (rawSequence >= 0);
const sequence = hasSequence ? rawSequence : -1;
@@ -1620,7 +1620,7 @@ export class Translator {
dictionaryIndex,
dictionaryPriority,
sourceTermExactMatchCount,
- maxTransformedTextLength,
+ maxOriginalTextLength,
[this._createTermHeadword(0, term, reading, [source], headwordTagGroups, rules)],
[this._createTermDefinition(0, [0], dictionary, dictionaryIndex, dictionaryPriority, id, score, [sequence], isPrimary, definitionTagGroups, contentDefinitions)]
);
@@ -1651,7 +1651,7 @@ export class Translator {
let score = Number.MIN_SAFE_INTEGER;
let dictionaryIndex = Number.MAX_SAFE_INTEGER;
let dictionaryPriority = Number.MIN_SAFE_INTEGER;
- let maxTransformedTextLength = 0;
+ let maxOriginalTextLength = 0;
let isPrimary = false;
/** @type {import('dictionary').TermDefinition[]} */
const definitions = [];
@@ -1665,7 +1665,7 @@ export class Translator {
dictionaryPriority = Math.max(dictionaryPriority, dictionaryEntry.dictionaryPriority);
if (dictionaryEntry.isPrimary) {
isPrimary = true;
- maxTransformedTextLength = Math.max(maxTransformedTextLength, dictionaryEntry.maxTransformedTextLength);
+ maxOriginalTextLength = Math.max(maxOriginalTextLength, dictionaryEntry.maxOriginalTextLength);
const dictionaryEntryInflections = dictionaryEntry.inflectionRuleChainCandidates;
if (inflections === null || dictionaryEntryInflections.length < inflections.length) {
inflections = dictionaryEntryInflections;
@@ -1697,7 +1697,7 @@ export class Translator {
dictionaryIndex,
dictionaryPriority,
sourceTermExactMatchCount,
- maxTransformedTextLength,
+ maxOriginalTextLength,
headwordsArray,
definitions
);
@@ -1874,11 +1874,11 @@ export class Translator {
*/
const compareFunction = (v1, v2) => {
// Sort by length of source term
- let i = v2.maxTransformedTextLength - v1.maxTransformedTextLength;
+ let i = v2.maxOriginalTextLength - v1.maxOriginalTextLength;
if (i !== 0) { return i; }
// Sort by the number of inflection reasons
- i = v1.inflectionRuleChainCandidates.length - v2.inflectionRuleChainCandidates.length;
+ i = this._getShortestInflectionChainLength(v1.inflectionRuleChainCandidates) - this._getShortestInflectionChainLength(v2.inflectionRuleChainCandidates);
if (i !== 0) { return i; }
// Sort by how many terms exactly match the source (e.g. for exact kana prioritization)
@@ -2075,6 +2075,19 @@ export class Translator {
}
}
+ /**
+ * @param {import('dictionary').InflectionRuleChainCandidate[]} inflectionRuleChainCandidates
+ * @returns {number}
+ */
+ _getShortestInflectionChainLength(inflectionRuleChainCandidates) {
+ if (inflectionRuleChainCandidates.length === 0) { return 0; }
+ let length = Number.MAX_SAFE_INTEGER;
+ for (const {inflectionRules} of inflectionRuleChainCandidates) {
+ length = Math.min(length, inflectionRules.length);
+ }
+ return length;
+ }
+
// Miscellaneous
/**
diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json
index cd3f7ab6..da2f8da2 100644
--- a/test/data/translator-test-results.json
+++ b/test/data/translator-test-results.json
@@ -302,7 +302,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -470,7 +470,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -657,7 +657,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -827,7 +827,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -997,7 +997,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -1167,7 +1167,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -1337,7 +1337,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -1505,7 +1505,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -1692,7 +1692,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -1886,7 +1886,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -2080,7 +2080,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -2274,7 +2274,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -2470,7 +2470,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -2642,7 +2642,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -2814,7 +2814,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -2986,7 +2986,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -3156,7 +3156,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -3324,7 +3324,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -3511,7 +3511,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -3629,7 +3629,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -3803,7 +3803,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 3,
+ "maxOriginalTextLength": 3,
"headwords": [
{
"index": 0,
@@ -3984,7 +3984,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -4158,7 +4158,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -4328,7 +4328,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -4504,7 +4504,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -4674,7 +4674,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -4850,7 +4850,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -5044,7 +5044,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -5240,7 +5240,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -5412,7 +5412,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -5588,7 +5588,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -5782,7 +5782,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -5978,7 +5978,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6150,7 +6150,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6326,7 +6326,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 3,
+ "maxOriginalTextLength": 3,
"headwords": [
{
"index": 0,
@@ -6454,7 +6454,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -6516,7 +6516,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -6578,7 +6578,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -6640,7 +6640,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -6704,7 +6704,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6768,7 +6768,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6832,7 +6832,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6896,7 +6896,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -6958,7 +6958,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -7020,7 +7020,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -7088,7 +7088,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -7330,7 +7330,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -7574,7 +7574,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -7794,7 +7794,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -8012,7 +8012,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -8180,7 +8180,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -8367,7 +8367,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 2,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -8829,7 +8829,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 2,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -9242,7 +9242,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -9410,7 +9410,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -9603,7 +9603,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 12,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -9803,7 +9803,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 12,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -10003,7 +10003,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 12,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -10203,7 +10203,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 12,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -10399,7 +10399,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -10571,7 +10571,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -10743,7 +10743,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -10915,7 +10915,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -11085,7 +11085,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -11253,7 +11253,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -11440,7 +11440,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 10,
"headwords": [
{
"index": 0,
@@ -11634,7 +11634,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 10,
"headwords": [
{
"index": 0,
@@ -11828,7 +11828,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 10,
"headwords": [
{
"index": 0,
@@ -12022,7 +12022,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 10,
"headwords": [
{
"index": 0,
@@ -12218,7 +12218,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -12390,7 +12390,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -12562,7 +12562,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -12734,7 +12734,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -12904,7 +12904,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -13072,7 +13072,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 1,
"headwords": [
{
"index": 0,
@@ -13259,7 +13259,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -13453,7 +13453,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -13647,7 +13647,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -13841,7 +13841,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 12,
"headwords": [
{
"index": 0,
@@ -14037,7 +14037,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 6,
"headwords": [
{
"index": 0,
@@ -14209,7 +14209,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 6,
"headwords": [
{
"index": 0,
@@ -14381,7 +14381,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 6,
"headwords": [
{
"index": 0,
@@ -14553,7 +14553,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 6,
"headwords": [
{
"index": 0,
@@ -14723,7 +14723,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 3,
"headwords": [
{
"index": 0,
@@ -14891,7 +14891,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 1,
+ "maxOriginalTextLength": 3,
"headwords": [
{
"index": 0,
@@ -15080,7 +15080,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -15188,7 +15188,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 3,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -15299,7 +15299,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 5,
+ "maxOriginalTextLength": 7,
"headwords": [
{
"index": 0,
@@ -15407,7 +15407,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -15869,7 +15869,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -16288,7 +16288,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 3,
+ "maxOriginalTextLength": 3,
"headwords": [
{
"index": 0,
@@ -16442,7 +16442,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -16542,7 +16542,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -16642,7 +16642,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -16742,7 +16742,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -16842,7 +16842,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -16959,7 +16959,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -17084,7 +17084,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 5,
+ "maxOriginalTextLength": 5,
"headwords": [
{
"index": 0,
@@ -17163,7 +17163,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -17228,7 +17228,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -17398,7 +17398,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -17574,7 +17574,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -17744,7 +17744,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -17920,7 +17920,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 4,
+ "maxOriginalTextLength": 4,
"headwords": [
{
"index": 0,
@@ -18029,7 +18029,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -18199,7 +18199,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 2,
+ "maxOriginalTextLength": 2,
"headwords": [
{
"index": 0,
@@ -18382,7 +18382,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 0,
- "maxTransformedTextLength": 3,
+ "maxOriginalTextLength": 7,
"headwords": [
{
"index": 0,
@@ -18461,7 +18461,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 7,
+ "maxOriginalTextLength": 7,
"headwords": [
{
"index": 0,
@@ -18542,7 +18542,7 @@
"dictionaryIndex": 0,
"dictionaryPriority": 0,
"sourceTermExactMatchCount": 1,
- "maxTransformedTextLength": 8,
+ "maxOriginalTextLength": 8,
"headwords": [
{
"index": 0,
diff --git a/types/ext/dictionary.d.ts b/types/ext/dictionary.d.ts
index ca6a708a..cc53ec0a 100644
--- a/types/ext/dictionary.d.ts
+++ b/types/ext/dictionary.d.ts
@@ -232,9 +232,9 @@ export type TermDictionaryEntry = {
*/
sourceTermExactMatchCount: number;
/**
- * The maximum length of the transformed text for all primary sources.
+ * The maximum length of the original text for all primary sources.
*/
- maxTransformedTextLength: number;
+ maxOriginalTextLength: number;
/**
* Headwords for the entry.
*/