Permalink
Browse files

Tweaking sample usage

  • Loading branch information...
1 parent 025c709 commit 44764b9ea8a7ecb3497315fadcb6865a50d15d7c @ptwobrussell committed Jan 28, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 recipe__extract_tweet_entities.py
@@ -9,6 +9,7 @@ def get_entities(tweet):
# Note: the production Twitter API contains a few additional fields in
# the entities hash that would require additional API calls to resolve
+ # See API resources that offer the include_entities parameter for details.
entities = {}
entities['user_mentions'] = []
@@ -38,7 +39,7 @@ def get_entities(tweet):
tweets = \
[
{
- 'text' : 'RT @ptwobrussell: Generating Dynamic Social Networks from Large Scale Unstructured Data...'
+ 'text' : 'Get @SocialWebMining example code at http://bit.ly/biais2 #w00t'
# ... more tweet fields ...
@@ -49,6 +50,6 @@ def get_entities(tweet):
]
for tweet in tweets:
- tweet['entities'] = getEntities(tweet)
+ tweet['entities'] = get_entities(tweet)
print json.dumps(tweets, indent=1)

0 comments on commit 44764b9

Please sign in to comment.