Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup / Unicode support #2

Merged
merged 2 commits into from
Mar 17, 2015
Merged

Cleanup / Unicode support #2

merged 2 commits into from
Mar 17, 2015

Conversation

kennyjoseph
Copy link
Contributor

First - thanks so much for posting this code! Its very interesting and has been fun to play with.

In starting to use it with my own data, I had two issues that I'm hoping this pull request might aid you and others with. First, it was a little hard to understand what was going on in the sentiment function. In working through it, I separated some stuff out for myself (constants and functions within the function), so I thought it might be useful for others as well. Second, the code couldn't, as far as I could tell, support unicode text, so I made a few mods (basically, I just removed the str() calls and added one conversion at the top of the sentiment function) so that it can now handle unicode.

I diff'd the output from this version with the output on the Readme to make sure that all the values were the same, and I'm pretty confident I didn't make any changes that would alter the algorithm. Hopefully they'll be helpful!

… functions to their own spot, and made most of the constants a bit more obvious and moved them out so that they don't have to be reinitialized every time. Also, I removed all of the str() calls so that it can now support unicode text
@cjhutto
Copy link
Owner

cjhutto commented Dec 14, 2014

Very cool - thanks!

Best regards,
CJ Hutto

On Dec 13, 2014, at 4:16 PM, "Kenny Joseph" <[email protected]mailto:[email protected]> wrote:

First - thanks so much for posting this code! Its very interesting and has been fun to play with.

In starting to use it with my own data, I had two issues that I'm hoping this pull request might aid you and others with. First, it was a little hard to understand what was going on in the sentiment function. In working through it, I separated some stuff out for myself (constants and functions within the function), so I thought it might be useful for others as well. Second, the code couldn't, as far as I could tell, support unicode text, so I made a few mods (basically, I just removed the str() calls and added one conversion at the top of the sentiment function) so that it can now handle unicode.

I diff'd the output from this version with the output on the Readme to make sure that all the values were the same, and I'm pretty confident I didn't make any changes that would alter the algorithm. Hopefully they'll be helpful!


You can merge this Pull Request by running

git pull https://github.com/kennyjoseph/vaderSentiment master

Or view, comment on, or merge it at:

#2

Commit Summary

  • a few clarification fixes- I moved the functions defined within other functions to their own spot, and made most of the constants a bit more obvious and moved them out so that they don't have to be reinitialized every time. Also, I removed all of the str() calls so that it can now support unicode text

File Changes

Patch Links:

Reply to this email directly or view it on GitHubhttps://github.com//pull/2.

@alialkhatib
Copy link

Sorry to bring up an old-ish pull request, but is there anything (e.g. unit tests) holding this back from being merged? I ran into the same problem with unicode and came across this PR. It'd be nice to merge this into the master branch if it's okay (and looking at the diff, it seems safe to do so, but I'm admittedly not familiar enough with the code to say).

cjhutto added a commit that referenced this pull request Mar 17, 2015
Cleanup / Unicode support
@cjhutto cjhutto merged commit 15372a9 into cjhutto:master Mar 17, 2015
@cjhutto
Copy link
Owner

cjhutto commented Mar 17, 2015

Thanks for the reminder… it’s merged ☺

Best regards,
C.J. Hutto


From: Ali Alkhatib [mailto:[email protected]]
Sent: Tuesday, March 17, 2015 1:44 PM
To: cjhutto/vaderSentiment
Cc: Hutto, Clayton J
Subject: Re: [vaderSentiment] Cleanup / Unicode support (#2)

Sorry to bring up an old-ish pull request, but is there anything (e.g. unit tests) holding this back from being merged? I ran into the same problem with unicode and came across this PR. It'd be nice to merge this into the master branch if it's okay (and looking at the diff, it seems safe to do so, but I'm admittedly not familiar enough with the code to say).


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-82495038.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants