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

Incorrect number of word calculations #42

Closed
sivaram10 opened this issue May 25, 2017 · 2 comments
Closed

Incorrect number of word calculations #42

sivaram10 opened this issue May 25, 2017 · 2 comments

Comments

@sivaram10
Copy link

sentiment_attributes("Assisted Local yy on resolving mm ll jj ll upgrade issues. He created a ww qq process for V. xx and tt gg.")[1]
image

str_count("Assisted Local yy on resolving mm ll jj ll upgrade issues. He created a ww qq process for V. xx and tt gg.","\S+")
image

@trinker
Copy link
Owner

trinker commented May 25, 2017

@sivaram10 thanks

Yes 34 is wrong. It's in the termco::token_count. I'll look into within a day and isolate the problem. Note that 23 is incorrect as well. There are 23 words but 26 tokens (words and letters)

@trinker
Copy link
Owner

trinker commented May 25, 2017

Thanks for the spot. The output now gives:

> sentimentr::sentiment_attributes("Assisted Local yy on resolving mm ll jj ll upgrade issues. He created a ww qq process for V. xx and tt gg.")[1]
$Meta
       Stat  n
1     words 23
2    tokens 26
3 sentences  2
4 questions  0

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

No branches or pull requests

2 participants