huginn
Named for one of the Norse god Odin's ravens who would gather information for him. A package to facilitate the investigation of anomalous spikes in public interest in an entity, then fetch and summarize news stories relevant to those spikes.
Installation and Setup
Requires Python=3.6
huginn is available on PyPi and installable via pip:
pip install huginn
Spacy models
Download English spacy models by running the following in the command line:
$ python3 -m spacy download en
NYT API Key
This project requires the usage of the New York Times article search API. Request a key at developer.nytimes.com. You'll need to set your NYT API key as a system environment variable. Open the file ~/.bashrc (or ~/.bash_profile if the .bashrc doesn't exist) in any Unix based system (Mac, Ubuntu, etc), and add the following two lines to the end of the file:
# Setting NYT API Key as an environment variable
export NYT_API_KEY="YOUR_KEY_HERE"
Where YOUR_KEY_HEREis your NYT API key, enclosed in quotes.
This is necessary for requesting relevant links for a potential entity's anomalies.
Usage
huginn is based around the Huginn object. A user only need provide the entity that they are interested in.
from huginn import Huginn
point72 = Huginn('Point72')
At this point huginn fetches Google Trends search interest on this entity looking back to 2003. We can then find the most anomalous dates and plot the Google trends search interest with the anomalies:
point72.get_anomalies()
point72.plot_interest_with_anomalies()
We then fetch news articles and relevant information related to our anomalies:
point72.get_articles_info()
Now we can get summaries, either specific to each anomaly or globally:
point72.get_global_summary()
point72.get_articles_info_and_summary_after_LDA()
These require downloading some rather large summarization models to run.
Metadata
Release files for huginn 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| huginn-0.1.4.tar.gz | 82.5 kB | Without provenance | Details for huginn-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| huginn-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for huginn-0.1.4-py3-none-any.whl |
Total release size: 96.8 kB
Release files / huginn-0.1.4.tar.gz
| Download URL | huginn-0.1.4.tar.gz |
|---|---|
| Size | 82.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27a729a41d9a307d55186604542ec3220304fe76304c06c3def74173e5cc814f
|
|
BLAKE2b-256 checksum How to use checksums |
c513e98907eedb275c335954a3b421b5f59380f6e01d31b87455a33d87f1cf19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10
|
Release files / huginn-0.1.4-py3-none-any.whl
| Download URL | huginn-0.1.4-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
647a2ae47837b1837747a6dcbf208bb1611ab918d2cdaf83627db1d761de11fe
|
|
BLAKE2b-256 checksum How to use checksums |
055450ecfb44a349da7080eca07c8080223eae822b4a2fa2d8414ff163c0eeda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10
|
Security for huginn 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.