Questions tagged [tweets]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Sentiments "tweets" elif statement error

Trying to run this, but getting an error at the very bottom "elif" statement while trying to set the colour saying it is invalid syntax. I don't know why. Also, am I doing this problem correctly? I ...
R_C's user avatar
  • 115
0 votes
1 answer

pset6 sentiments tweets

I need some help with tweets. My code works in that it prints all requested tweets from the user timeline but it does it all in yellow and i'm struggling to figure out why. Analyzer works fine with ...
Adel Tirouche's user avatar
0 votes
1 answer

PSET6/Sentiments/, tweets

I have been trying hard to get my mistakes for this PSET but can't find what errors have I made in implementing and tweets.On running ./smile word be it love, hate, Stanford I get :| in ...
sk.76's user avatar
  • 312
0 votes
1 answer

pset6 tweets subtraction when word is negative doesn't work

import nltk class Analyzer(): """Implements sentiment analysis.""" def __init__(self, positives, negatives): """Initialize Analyzer.""" # TODO self.pos_words = set() #starting set ...
Maciej Ś's user avatar
0 votes
1 answer

I don't understant how TweetTokenizer works

!/usr/bin/env python3 import os import sys from analyzer import Analyzer from termcolor import colored from helpers import get_user_timeline from nltk.tokenize import TweetTokenizer def main(): # ...
Maciej Ś's user avatar
1 vote
1 answer

Error in pset6 API Key not set

I'm getting this error, I have been working to make it work but i can't. I followed the instructions on setting up the API_KEY value: Traceback (most recent call last): File "tweets", line 25, in ...
Josué Oswaldo Arreola Vargas's user avatar
0 votes
1 answer

problem debuging tweet

i am having trouble with tweets. I copied the get_user_timeline function from helper to tweets, since it was origanily set to def get_user_timeline(screen_name, count=200): I am not clear why anyone ...
Manny_Mar's user avatar
  • 125
0 votes
0 answers

Pset6 Tweets - Installed pip3 install --user -r requirements.txt and it ruined my code :( [duplicate]

Trying to built tweets on pset6 and am encountering some errors, is it due to bad installation? What caused that error message? Should i have not used the import functions and i Here is my code: #!...
nvs0000's user avatar
  • 179
0 votes
1 answer

pset6: are the scores being calculated correctly?

my code for tweets works perfectly, except that the tweets do not seem to have the right score. A "happy" tweet does not have a positive score, for instance. Why is that? For your reference, I ...
Alex Chan's user avatar
  • 121
3 votes
1 answer

pset6 tweets, and

I've been stuck here for a while, any help would be appreciated, thanks I'm getting this error on the console while trying to run ./tweets @cs50: ~/workspace/pset6/sentiments/ $ ./tweets @cs50 ...
bobby_pin's user avatar
0 votes
1 answer

CS50 2017 Pset6 Sentiments tweets

I need some help with tweets. Or just help me get what inspiration to get from smile for it, as per the specs. Here's my code: #!/usr/bin/env python3 import os import sys import nltk from ...
Osman Zakir's user avatar
0 votes
1 answer

Pset6 Tweets output score and color different to staff version

My Tweets function can output score and tweet from Tweeter user. However, the output is a bit different to the staff version's output. I find that some words with first character capitalized are not ...
eddiewong's user avatar
0 votes
1 answer

Python. Can't understand this code

def get_user_timeline(screen_name, count=200): """Return list of most recent tweets posted by screen_name.""" # ensure count is valid if count < 1 or count > 200: raise ...
Vaish MK's user avatar
  • 167
0 votes
1 answer

Pset6_Tweets works, but each line of output has parentheses around it. Why?

Here is a link to tweets code: Here is output excerpt (colors not replicated below): (0, 'The spotlight has finally been put on the low-life leakers! They will be caught!...
Flesheaters's user avatar
0 votes
1 answer
214 views - Need help with code that retrieves tweets

I need to know if I am using the following code correctly. tweets = helpers.get_user_timeline(sys.argv[1], 50) Immediately after this line of code, I check to make sure I found tweets with: if ...
Flesheaters's user avatar
0 votes
1 answer

Lost trying to figure out sentiments PSET 6 2017

I need some help with pset6 I'm basically lost trying to figure out what I should be doing. I have my analyzer code which doesn't return any errors when I run it but at the same time returns no output ...
Dave G's user avatar
  • 15
2 votes
1 answer

Why am I getting TypeError: expected string or buffer?

This is my tweets file #!/usr/bin/env python3 import os import sys from analyzer import Analyzer from termcolor import colored from helpers import get_user_timeline def ...
Cristian's user avatar
  • 117
0 votes
1 answer

pset6 - tweets, get_user_timeline function

I can't seen to get a list of tweets when calling the get_user_timeline() function. I always get None in return every time. Maybe I'm not understanding the function but for example when I try calling ...
tadm123's user avatar
  • 215