<commit_before>NPO Backstage Examples
======================
This repository contains example code for data from the [NPO Backstage](http://www.npo.nl/specials/backstage) API. In the ``python`` folder we currently have examples showing how to search the API and apply facets and filters on fields.

Problems with the API and feature requests can also be reported here on the [Issues page](https://github.com/openstate/npo-backstage-examples/issues).

NPO Backstage is an initiative of [NPO](http://www.npo.nl) in collaboration with [Open State Foundation](http://www.openstate.eu).

Links
-----
- [NPO Backstage documentation](http://backstage-docs.npo.nl) (contains amongst others a quickstart guide on how to use the API)
- [@NPOBackstage on Twitter](https://twitter.com/NPOBackstage)

License
--------
This NPO Backstage API example code is licensed under CC0.<br>
Please keep in mind that this license does not apply to the content of the API.<commit_msg>Update README to describe functionality of example programs<commit_after>NPO Backstage Examples
======================
This repository contains example code for data from the [NPO Backstage](http://www.npo.nl/specials/backstage) API. In the ``python`` folder we currently have the following examples:
- ``simple_search.py``: simple example of how to search the API using Python
- ``facet.py``: shows how to apply facetting
- ``filter.py``: shows how to apply filtering
- ``download_filtered_subtitles.py``: filters on the ``metadata`` index for the specified programs (default 'Nieuwsuur' and 'EenVandaag') and downloads their subtitles if available from the ``tt888`` index
- ``generate_wordcloud.py``: a fun example of what you can do with the subtitle texts; after you downloaded subtitles using ``download_filtered_subtitles.py``, use this progam to generate word clouds using Parsimonious Language Models, which will retrieve the words which are most distinctive for each program compared to the other program(s) (default 'Nieuwsuur' and 'EenVandaag')

Problems with the API and feature requests can also be reported here on the [Issues page](https://github.com/openstate/npo-backstage-examples/issues).

NPO Backstage is an initiative of [NPO](http://www.npo.nl) in collaboration with [Open State Foundation](http://www.openstate.eu).

Links
-----
- [NPO Backstage documentation](http://backstage-docs.npo.nl): `must-read(!)`, contains amongst others a quickstart guide on how to use the API, descriptions of all API functionalities and explanation of all fields of each available dataset/index)
- [@NPOBackstage on Twitter](https://twitter.com/NPOBackstage)

License
--------
This NPO Backstage API example code is licensed under CC0.<br>
Please keep in mind that this license does not apply to the content of the API.
{'fraction_non_alphanumeric': 0.10991379310344827, 'fraction_numerical': 0.0017959770114942528, 'mean_word_length': 4.938166311300639, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5226985', 'n_tokens_mistral': 754, 'n_tokens_neox': 731, 'n_words': 330}