Skip to content

Commit

Permalink
use reltt instead of rel for yearly Search
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoertl committed Jan 15, 2024
1 parent 1ad3f86 commit e06eba1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/composables/useYearlyFrequenciesSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
90 changes: 54 additions & 36 deletions src/types/responses.d.ts
Original file line number Diff line number Diff line change
@@ -1,67 +1,85 @@
interface YearlyFrequencyData {
Blocks: Array<YearlyBlock>;
wllimit: number;
request: Request;
fullsize: number;
fcrit: string;
FCrit: Array<FCrit>;
lastpage: number;
Blocks: Array<Block>;
paging: number;
fcrit: string;
concsize: number;
fullsize: number;
Desc: Array<Desc>;
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<Head>;
total: number;
totalfrq: number;
Items: Array<Item>;
}

interface Item {
relbar: number;
Word: Array<Word>;
fbar: number;
pfilter_list: Array<string>;
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<string>;
poc: number;
fpm: number;
}

interface Word {
n: string;
}

interface Head {
n: string;
s: number | string;
id?: string;
n: string;
}

interface FCrit {
fcrit: string;
}

0 comments on commit e06eba1

Please sign in to comment.