Topic distribution
get_topic_distributionHow a filtered set distributes across the precomputed LDA topics, each labelled by its top terms (articles carry 30 topics and are ~99.5% classified; references have their own 33-topic model and only ~46% carry an assignment, so read its classified against total_matches). Topics are assigned offline over the full text, so they describe what a piece is ABOUT rather than which words it contains — use this instead of keyword counting to map a corpus. Optional over_time returns per-year counts for the leading topics. min_prob keeps only articles where the topic is at least that dominant (mean assignment probability is 0.34, so 0.5 is already a strong filter).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Topics given their own band in over_time (default 8, max 15) | |
| subset | No | articles (default) | references | |
| country | No | Exact country name: Benin | Burkina Faso | Côte d'Ivoire | Niger | Nigeria | Togo (accents optional) | |
| date_to | No | YYYY-MM-DD (or YYYY) | |
| keyword | No | ONE French concept keyword; substring over the subset's text fields | |
| subject | No | Exact subject tag (pipe-aware) | |
| min_prob | No | 0-1; keep only assignments at or above this probability | |
| date_from | No | YYYY-MM-DD (or YYYY) | |
| newspaper | No | Newspaper (articles) or periodical/series title (publications) | |
| over_time | No | Also return per-year counts for the leading topics |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| span | No | ||
| view | Yes | ||
| subset | Yes | ||
| topics | Yes | ||
| filters | Yes | ||
| periods | No | ||
| classified | Yes | ||
| total_matches | Yes | ||
| trend_by_topic | No | ||
| series_by_topic | No |