Open Scribblets opened 8 years ago
Got keywords pulling.
@antonmc Is this the expected output?
Currently, I am retrieving the latest tweet and getting concepts and keywords from the Alchemy API. (Sample response included below.)
@antonmc Let me know if you have any clever ideas about how to use the keywords and concepts. Otherwise, I'm just going to pull the text and use them as queries for the other API's. =)
Did we want to factor in Watson Personality Insights? Or is this good? Let me know!
{
"username": "conanobrien",
"latest_tweet": {
"created_at": "Sat Sep 10 20:05:23 +0000 2016",
"id": 774700319003570200,
"id_str": "774700319003570177",
"text": "I love autumn in California… watching the leaves change color because they’re on fire.",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": []
},
"source": "<a href=\"http://www.hootsuite.com\" rel=\"nofollow\">Hootsuite</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 115485051,
"id_str": "115485051",
"name": "Conan O'Brien",
"screen_name": "ConanOBrien",
"location": "Los Angeles",
"description": "The voice of the people. Sorry, people.",
"url": "https://t.co/C7Jqp9zGZV",
"entities": {
"url": {
"urls": [
{
"url": "https://t.co/C7Jqp9zGZV",
"expanded_url": "http://teamcoco.com",
"display_url": "teamcoco.com",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 21672938,
"friends_count": 1,
"listed_count": 89264,
"created_at": "Thu Feb 18 20:17:16 +0000 2010",
"favourites_count": 0,
"utc_offset": -28800,
"time_zone": "Alaska",
"geo_enabled": false,
"verified": true,
"statuses_count": 2634,
"lang": "en",
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": true,
"profile_background_color": "FFFFFF",
"profile_background_image_url": "http://pbs.twimg.com/profile_background_images/875682230/6957e7d6efdd57c670277fce65043e40.jpeg",
"profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/875682230/6957e7d6efdd57c670277fce65043e40.jpeg",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/730612231021322240/Rl0_QYhL_normal.jpg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/730612231021322240/Rl0_QYhL_normal.jpg",
"profile_link_color": "0084B4",
"profile_sidebar_border_color": "FFFFFF",
"profile_sidebar_fill_color": "C0DFEC",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 3836,
"favorite_count": 11350,
"favorited": false,
"retweeted": false,
"lang": "en"
},
"alchemy": {
"status": "OK",
"usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
"totalTransactions": "2",
"language": "english",
"concepts": [
{
"text": "Autumn leaf color",
"relevance": "0.8584",
"dbpedia": "http://dbpedia.org/resource/Autumn_leaf_color",
"freebase": "http://rdf.freebase.com/ns/m.026289z"
},
{
"text": "Hey Joe",
"relevance": "0.812079",
"dbpedia": "http://dbpedia.org/resource/Hey_Joe",
"freebase": "http://rdf.freebase.com/ns/m.064ns1",
"yago": "http://yago-knowledge.org/resource/Hey_Joe"
}
],
"keywords": [
{
"relevance": "0.922067",
"text": "autumn"
},
{
"relevance": "0.826754",
"text": "leaves"
},
{
"relevance": "0.65438",
"text": "California…"
},
{
"relevance": "0.643021",
"text": "color"
}
]
}
}
Cool. I think it's a fun API to play with ... what do you think?
So - I think this is where the user persona comes in. I think what we want to do is define the character of the person or persons and then tweet as them ...
... what I'd hope is that ( for instance ) if they tweet about tacos a lot, or about a band, or thing ( there's a Toyota speedway event around that time )
http://www.stubhub.com/find/s/?q=las%20vegas
So they could tweet about speedway, or car racing, or nascar, formula 1 or something and we could see if we can connect those concepts to the Toyota speedway ...
... I think we might need to do concept and keyword mining in both places - the source tweets, and target events - so use the stubhub api see what it gives back for events, and then see if we can find matching concepts and keywords?
Otherwise - searches - or a combination of them.
Also - maybe work with Pinterest API and restaurants.
Oh - and a friend suggested this scenario - if we had say three or four fellow travellers - to take their three pinterest boards full of favorite recipes and find a restaurant based on their diverse boards that they'd all love to eat at.
You'll likely have to iterate a bit with it, build up some tweets and pinterest boards to try it out.
https://developer.foursquare.com/ might be a source for searching too
I think it'd be great to factor in personality insights too - maybe on the dashboard though - to surface through some understanding of personality types visiting the hotel over time?
Use the Watson Alchemy API to extract keywords to search other APIs.