Skip to main content

A python package to analyse the tweets and extract meaning from the data, can be installed with pip.

Project description

Python Package for Twitter's Sentiment Analysis
===============================

version number: 0.0.2
author: Shekhar Jha

Overview
--------

A python package to analyse the tweets and extract meaning from the data, can be installed with pip.

Installing/Setup
--------------------

To install use pip:

$ pip install twittersent


Or clone the repo:

$ git clone https://github.com/ekchusis/twittersent.git
$ python setup.py install


Get the tokens/keys by registering at [Twitter Api](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens) and fill put the values of the following variables in `client.py` file

```python
consumer_key = None
consumer_secret = None
access_token_key = None
access_token_secret = None
```

Contributing
------------

TBD

Example
-------
A simple file that takes a list as an input

```python
from client import TwitterSent

import sys
sys.path.insert(0, '/Users/xanthate/twittersent/twittersent')

print("Enter the list of keywords separated by commas: ")

user_input_as_string = input()
user_input_as_list = user_input_as_string.split(',') #splits the input string on commas

user_input_as_list = [a for a in user_input_as_list]

print("Enter the total number of tweets on which the analysis is to be done: ")
input_total_number_of_tweets = int(input())

T = TwitterSent()
value = TwitterSent.calculate_sentiment(T, user_input_as_list, input_total_number_of_tweets)
TwitterSent.barplot(T, value)
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twittersent-0.0.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twittersent-0.0.2-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file twittersent-0.0.2.tar.gz.

File metadata

  • Download URL: twittersent-0.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for twittersent-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ff7458d7b562dda12266782fd122dc7df13de790c1c836b0d172997c61221635
MD5 bb0df519ba7a6ce0edd86af623cb5e55
BLAKE2b-256 3059253d057560bc6cb1b74d5baf38534f48dcef522f1fb10ce99a7ce3f3ba89

See more details on using hashes here.

File details

Details for the file twittersent-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for twittersent-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a6c0599163ce2442400b2db7301824d915051aff4009b70468482d486f65928
MD5 069b89a804722ecff7bc4c974f75891c
BLAKE2b-256 74ba1f529fe16677e9b7a4aee7beafd9596092918b6d2668653d7e750b6dbfc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page