diff --git a/src/composables/useYearlyFrequenciesSearch.ts b/src/composables/useYearlyFrequenciesSearch.ts index b3ccd11..7c2e7af 100644 --- a/src/composables/useYearlyFrequenciesSearch.ts +++ b/src/composables/useYearlyFrequenciesSearch.ts @@ -39,12 +39,12 @@ export function useYearlyFrequenciesSearch() { // console.log({ yearlyData, blocks: freqttYear.value.Blocks, items: freqttYear.value.Blocks[0].Items }); // console.log('data', query.data); - yearlyData.forEach(({ frq, rel, Word }) => { + yearlyData.forEach(({ frq, reltt, Word }) => { const year = Word[0]?.n; query.data.yearlyFrequencies.push({ year: Number(year), absolute: frq, - relative: rel, + relative: reltt, }); }); query.loading.yearlyFrequencies = false; diff --git a/src/types/responses.d.ts b/src/types/responses.d.ts index 7343079..1ad3163 100644 --- a/src/types/responses.d.ts +++ b/src/types/responses.d.ts @@ -1,59 +1,73 @@ interface YearlyFrequencyData { - Blocks: Array; - wllimit: number; - request: Request; - fullsize: number; + fcrit: string; FCrit: Array; - lastpage: number; + Blocks: Array; paging: number; - fcrit: string; concsize: number; + fullsize: number; + Desc: Array; + numofcolls: number; + hitlen: number; + wllimit: number; + lastpage: number; + ml: boolean; api_version: string; -} - -interface FCrit { - fcrit: string; + manatee_version: string; + request: Request; } interface Request { - ctxattrs: string; - pagesize: string; + concordance_query: Concordancequery; + fpage: string; + freqlevel: string; + json: string; format: string; - gdexcnt: string; - fttattr: string; - gdexconf: string; - flimit: string; - kwicrightctx: string; - q: string; - viewmode: string; - attrs: string; - attr_tooltip: string; + freq_sort: string; corpname: string; - fcrit: string; - structs: string; - kwicleftctx: string; + showpoc: string; + showrel: string; + ml1attr: string; + ml1ctx: string; + showreltt: string; + usecorp: string; + group: string; } -interface YearlyBlock { - totalfrq: number; +interface Concordancequery { + iquery: string; + queryselector: string; +} + +interface Desc { + op: string; + arg: string; + nicearg: string; + rel: number; + size: number; + tourl: string; +} + +interface Block { Head: Array; total: number; + totalfrq: number; Items: Array; } interface Item { - relbar: number; Word: Array; - fbar: number; - pfilter_list: Array; frq: number; - nfilter: string; - pfilter: string; - freqbar: number; - rel: number; - nbar: number; norm: number; - norel: number; + rel: number; + reltt: number; + fbar: number; + relbar: number; + freqbar: number; + pfilter: string; + nfilter: string; + pfilter_list: Array; + poc: number; + fpm: number; } interface Word { @@ -61,7 +75,11 @@ interface Word { } interface Head { + n: string; s: number | string; id?: string; - n: string; +} + +interface FCrit { + fcrit: string; }