BSI Tool for Sentiment Analysis
Project description
BSI Sentiment Analysis Pipeline
CLI tool to download tweets and perform basic sentiment analysis on them.
Usage
foo@bar:~$ bsi_sentiment -h
usage: sentiment [-h] [-c CONFIG] [-q query] [-s SINCE] [-u UNTIL] [-n GEO] [-r RADIUS] [-l LANG] [--user username] [--result_type {recent,popular,mixed}] [--max_tweets MAX_TWEETS]
[--tweepy]
{analyze,configure,download} [dest]
BSI Tool for Sentiment Analysis. Tweets can be downloaded using either Snscrape(default) or Tweepy.
positional arguments:
{analyze,configure,download}
Action to perform.
dest Output file location. Analysis/configuration/download output file is stored here. Default is current directory.
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Config file location. If action is 'analyze' or 'download', configuration file is read from here.
-q query, --query query
A query text to be matched
-s SINCE, --since SINCE
A lower bound date (UTC) to restrict search. Default is 7 days before today. Used only by Snscrape.
-u UNTIL, --until UNTIL
An upper bound date (not included) to restrict search. Default is today. Tweepy has a 7 day hard limit, while Snscrape has no such limit.
-n GEO, --geo GEO Return only tweets by users from given geolocation. It must be a location name (e.g. 'Milan') if using Snscrape or a string of the form 'latitude,longitude' if
using Tweepy.
-r RADIUS, --radius RADIUS
Must be used together with --geo. Return only tweets by users within a given radius from the selected location. It must be either in 'mi' or 'km' (e.g. '15km')
-l LANG, --lang LANG Restrict language of the tweets retrieved. Must be an ISO 639-1 code (e.g. en, it, etc.). Default is no language restriction. Used only by Tweepy.
--user username Restrict search to tweets from specified username.
--result_type {recent,popular,mixed}
Type of tweets to retrieve. Can be either 'recent', 'popular' or 'mixed'. Default is 'mixed'. Used only by Tweepy.
--max_tweets MAX_TWEETS
The maximum number of tweets to be retrieved. Default is 10. In the case of Tweepy, if greater API rate limit is reached, the program waits for 15 minutes before
trying again.
--tweepy Use Tweepy instead of the default Snscrape to download tweets.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
bsi_sentiment-0.0.2-py3.8.egg
(21.3 kB
view details)
File details
Details for the file bsi_sentiment-0.0.2-py3.8.egg
.
File metadata
- Download URL: bsi_sentiment-0.0.2-py3.8.egg
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7616f3b99bd4737bd7e68edb65bad3602ee23f4a0b3caac17980d9b5786dea82 |
|
MD5 | 7139a05ae22130ec31ff2f4189905c2c |
|
BLAKE2b-256 | be9991170a4dbc0946a2f4c9692da6694878f1c3a5b20de4b72397319b931073 |