6 kyu
Count words
550 of 880eugene-katsevman
Loading description...
Strings
Regular Expressions
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Very interesting challenge, congratulations for the kata.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/131.
Please join the discussion to help us identify duplicate kata and retire them.
The kata are considered not exact duplicates.
Good one !
This comment has been hidden.
Your issue with the kata is unclear - which makes it impossible to resolve. Try using newlines and markup.
Closing for now. If you want something fixed, open a new
Issue
that is actually readable.sorry english is not my first language
looks like there's an error in JS test: if i inlclude "upon" in the removal list the test fails. Removing "upon" from the list of words to exlude it works.
Please fix, it was very frustrating
C translation
I struggled a lot to just pass one test case which was giving one number count difference. Finally I found, that "upon" should not be part of this list of removals. once I removed this from the removal list it passed all the tests.
"Kate doesn't like some of words and doesn't count them. Words to be excluded are "a", "the", "on", "at", "of", "upon", "in" and "as", case-insensitive.
Thank you very much! It works now! I think the author should edit the kata description :)
thank you, this has gotten me much closer to passing, I am now only missing/messing up 1 piece
Thanks, I had the exact same problem. The author definately needs to fix this.
I completed the Kata for all tests. I get an error only on "Second long text block". How is it possible?
такая же проблема.
got the same error im kind of frustrated as it took me a lot to use map() and flat() and now this?? My theory is that it has a lot of special characters. But the thing is i cant even read this without getting dizzy.
I have the same issue! All tests including random tests passes. But not the fixed test "Second long text block". Really strange.
This comment has been hidden.
I have this same issue. Any idea?
There's a bug in the test cases for python - add "import re" to your solution to fix while waiting on a fix from the author
nickdepinet's suggestion worked. Thanks!
This comment has been hidden.
import re
added to main tests; solution is now no longer exposed on tracebackJavaScript translation kumited. Feel free to check :)
approved by someone
Nice kata to practice regex.
This comment has been hidden.
No random tests.
Added random tests
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Sounds good, that makes sense now. I'll update my code to split that word then. Thanks for the clarification. Kata was fun by the way! And it was really my first time interacting with python, so it took me a while since I had to learn syntax along the way, really liking python though.
Nice one. Ruby translation kumited.
Do you like to translate my JS-Katas to CoffeeScript and Ruby?
It seems very vague what your criteria for a word is. I think you could show more examples of proper words vs improper words.
Even if you just added a list of the matches that equal 115 for Example #2, that would answer a lot of my questions just by looking at them.
Counting words is simple. Knowing what to count is the issue for me.
Thanks!
Thanks!
I've added all your examples to example test cases and found a main flaw in my own solution (I wasn't excluding '' from list of words). I hope it is more clear what I want player to achieve.
I appreciate you taking the time but there doesn't seem to be any difference, at least in anything that is visible to someone just looking at it.
The description seems to be exactly the same, very vague. No extra examples to show more specific examples of what a 'word' is in your kata. The only difference seems to be the result from Example #2 is now 113.
I guess I could understand if you were really against changing the description, that is up to you. You really should put some more examples in the description that not only show the answer you want (total count of the words) but also the 'words' as well. That way it becomes very clear what makes a word VS non-word.
The way the tests are set up, when I click submit, there is no way to show all these new examples that you have put in. Your tests stop as soon as I get one answer wrong. So adding a bunch of new tests hasn't really made a difference in the main issue I wrote about in my original comment (what are the edge cases for what you determine to be a word???).
You didn't really answer any of my questions whether in the description or in your reply.
Example edit for description:
This one is even more important to show than Example #1 since it has examples like
"I'd"
,"slow-moving"
,"there."
,"all;"
If you showed the words you want matched, it answers a bunch of questions. How to deal with punctuation at the end, how to deal with characters in the middle, etc."slow-moving"
is it["slow", "moving"]
or["slow"]
or[]
?"I'd"
is it["I", "d"]
or["I"]
or[]
?I didn't include my list of matches because I am getting 112 currently so mine is clearly wrong according to your kata. Just a single list of all the matches that you expect from Example #2 would be very helpful to show people what it is you want them to do! This should be easy to do since you are clearly splitting them according to some criteria and then counting them. Just print out the list of matches and put it in the description.
Thanks.
Dear zebulan, Thank you for such a profound reply. I've remade kata's description and added some details as you've suggested. While some details were cleared, I've modified my solution and tests in such a way, that your solution should qualify now too (the problem was in case-sensitivity of eliminated words). Please, have a look on it one more time.
Thank you very much, everything seems to work fine now. I thought I was on the right track but kept getting the wrong results. I just kept second guessing myself whenever I decided what a 'word' might be and got the wrong answer.
My intention was not to make you change your kata just for me. I was just confused as to what you were asking for without more examples.
Thanks again!