Each corpus in the dataset contains so-called totalcounts files (for example see first download link here). These files contain absolute total match counts by ngram length and year. NGRAMS uses this data internally to assign a relative total match count to each ngram. The data should also be useful to API users who need to derive other forms of probabilities.
This feature request proposes to make totalcounts available via REST API by introducing new endpoints like:
GET {base_url}/{corpus}/totalcounts/{ngram_length}
GET {base_url}/{corpus}/totalcounts/{ngram_length}/{year}
GET {base_url}/{corpus}/totalcounts/{ngram_length}/allyears
The 1st endpoint returns a whole totalcounts-{ngram_length} file in JSON format.
The 2nd endpoint returns the absolute total match count by ngram length and year.
The 3rd endpoint returns the absolute total match count by ngram length all years.
The data should be cached on client side once fetched as it is static.
Each corpus in the dataset contains so-called totalcounts files (for example see first download link here). These files contain absolute total match counts by ngram length and year. NGRAMS uses this data internally to assign a relative total match count to each ngram. The data should also be useful to API users who need to derive other forms of probabilities.
This feature request proposes to make totalcounts available via REST API by introducing new endpoints like:
totalcounts-{ngram_length}
file in JSON format.The data should be cached on client side once fetched as it is static.