Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Rupinder Sandhu

+ Follow
since Mar 13, 2013
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rupinder Sandhu

Hey, I managed to solve my problem.

You can close this thread.
8 years ago
Ok since you pointed that out about the char. I decided to put the emoticons into a Switch statement that deals with Strings.

How do i go through statements and access the Twitter API, and count the emoticons this way?? Please help..

How do I count the emoticons, when it passes through all those cases?

I have also thought of doing an array

But i have no idea, how to carry on. How do i query the array so that it goes through the Twitter api and gives me a count if it catches any of the elements?
8 years ago

I have code that allows me to get data from a Twitter Search API. However I am having trouble counting the emoticons. I have a text file, with 126 emoticons, that I have classified against numbers 1-6. These numbers represent emotions. So one column is emoticons and next to it is the corresponding number.
How do I read the text file that has both emoticon and number, and search the API and count the emoticons that it catches.
So for example

1 =)
1 :-)

2 :@
2 >

3 :-(

etc. That is how the text file is set up.

So every time an emoticon is caught in the search API, I want the count for each number to increase. How do I go about doing that? I have looked all over the web, which is how I noticed this forum.

I have tried that, but I have to input a pattern. And it gives me a count, but not one that is correct, because I checked manually.

8 years ago