home << dhlab reference << dhlab.api.dhlab_api
concordance_counts#
from dhlab.api.dhlab_api import concordance_counts
- concordance_counts(urns=None, words=None, window=25, limit=100)[source]#
Count concordances (keyword in context) for a corpus query (used for collocation analysis).
Call the API
BASE_URL
endpoint /conccount.- Parameters:
urns (list) – uniform resource names, for example:
["URN:NBN:no-nb_digibok_2008051404065", "URN:NBN:no-nb_digibok_2010092120011"]
words (str) – Word(s) to search for. Can be an SQLite fulltext query, an fts5 string search expression.
window (int) – number of tokens on either side to show in the collocations, between 1-25.
limit (int) – max. number of concordances per document. Maximum value is 1000.
- Returns:
a table of counts
- Return type:
DataFrame