• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Highest Trending Word

 
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, with Java, I auto tweet the news and hashtag the first word: https://twitter.com/RobertJLiguori

I'd like to find the most trending word in the sentence/title and hashtag that instead.

Any ideas how this can be done?

Robert
 
Ranch Hand
Posts: 259
15
Android Angular Framework Spring AngularJS Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Robert:
When you say "any idea", you leave the door wide open!  

The key point here, I think, is "trending".  If you can get a list of "trending words", this task becomes a question about finding those words within the news stories' texts.

So, here are a couple of ideas.  I became aware some time back that it is possible to actually pull a twitter feed.  You become a "twitter developer" (I got the details from a course I audited), and then you can grab tweets as they come along.  If you did that, you could keep your own trend.

However, there are probably ways to pull just the trending words from some source.  I do not know where that would be.  Maybe a different twitter feed is targeted that way?

Once you have those trending words, depending on how many there are, you would need to save an "index" (if there are not too many, you could just use a Java collection where it is possible to lookup the value--even a simple Map<String,Integer> should probably work if you don't need more info).  You would want to then run through the words in your story, checking to see which word has the highest (the value from the Map) trend value.  Once you have that, you can use it for your hashtag.

I hope that helps.
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!