• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Highest Trending Word

 
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 270
15
Android Angular Framework Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Have you no shame? Have you no decency? Have you no tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic