home << dhlab reference << dhlab.api.dhlab_api
collocation#
from dhlab.api.dhlab_api import collocation
- collocation(corpusquery='norge', word='arbeid', before=5, after=0)[source]#
Make a collocation from a corpus query.
- Parameters:
corpusquery (str) – query string
word (str) – target word for the collocations.
before (int) – number of words prior to
word
after (int) – number of words following
word
- Returns:
a dataframe with the resulting collocations
- Return type:
DataFrame