Rename buildTermFrequencies to buildTermMeta
This commit is contained in:
parent
00bbcff8a2
commit
ee41e0e42e
@ -154,7 +154,7 @@ class Translator {
|
|||||||
const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
|
const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
|
||||||
|
|
||||||
const definitionsGrouped = dictTermsGroup(definitions, dictionaries);
|
const definitionsGrouped = dictTermsGroup(definitions, dictionaries);
|
||||||
await this.buildTermFrequencies(definitionsGrouped, titles);
|
await this.buildTermMeta(definitionsGrouped, titles);
|
||||||
|
|
||||||
if (options.general.compactTags) {
|
if (options.general.compactTags) {
|
||||||
for (const definition of definitionsGrouped) {
|
for (const definition of definitionsGrouped) {
|
||||||
@ -192,7 +192,7 @@ class Translator {
|
|||||||
definitionsMerged.push(groupedDefinition);
|
definitionsMerged.push(groupedDefinition);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.buildTermFrequencies(definitionsMerged, titles);
|
await this.buildTermMeta(definitionsMerged, titles);
|
||||||
|
|
||||||
if (options.general.compactTags) {
|
if (options.general.compactTags) {
|
||||||
for (const definition of definitionsMerged) {
|
for (const definition of definitionsMerged) {
|
||||||
@ -208,7 +208,7 @@ class Translator {
|
|||||||
const titles = Object.keys(dictionaries);
|
const titles = Object.keys(dictionaries);
|
||||||
const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
|
const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
|
||||||
|
|
||||||
await this.buildTermFrequencies(definitions, titles);
|
await this.buildTermMeta(definitions, titles);
|
||||||
|
|
||||||
return [definitions, length];
|
return [definitions, length];
|
||||||
}
|
}
|
||||||
@ -436,7 +436,7 @@ class Translator {
|
|||||||
return definitions;
|
return definitions;
|
||||||
}
|
}
|
||||||
|
|
||||||
async buildTermFrequencies(definitions, titles) {
|
async buildTermMeta(definitions, titles) {
|
||||||
const terms = [];
|
const terms = [];
|
||||||
for (const definition of definitions) {
|
for (const definition of definitions) {
|
||||||
if (definition.expressions) {
|
if (definition.expressions) {
|
||||||
|
Loading…
Reference in New Issue
Block a user