Back to General discussions forum
Hi, Rodion.
I've put together a possible new problem; I have the markdown description and a (Python3) checker. There is also a ~220Kb text file that is a required resource (and should be made available both to the solvers and to the checker code). What would be the easiest way for me to get them all to you?
Cheers,
Vladimir
Vladimir, Hi!
Thanks for your proposal! Feel free to contact me via "rodiongork" at gmail for example. Though if the description isn't very secret feel free to share for people to see... Though this may give Mathias for example time to prepare solution (I bet he can do this in 15 minutes after reading description... so on other hand decide yourself :)
The "A Study In Scarlet" link doesn't work
Yep, sorry, fixed now!
But yes, the problem just have gone live. Vladimir, thanks for this! I now see why you preferred to keep the problem statement - it's quite funny in the style of "original" :)
P.S. can't answer to you in email - it looks reply address is an intentional secret, just in the mood of the story :)))
Didn't expect a correction that fast. Tried creating the text file myself. Had used https://www.gutenberg.org/files/244/244-h/244-h.htm
Regex replaced capital with lowercase,
then "[^a-z ]+" with " ",
then I think I did " +" with " "
Turns out, there was still not an insignificant amount of difference :^) but not too far off.
Thanks, Rodion!
Vadim: here's the text preprocessor code, if you're curious (no spoilers w/r/t the problem itself):
open('a_study_in_scarlet.txt', 'w').write(' '.join(''.join(c for c in open('a_study_in_scarlet_original.txt').read().lower() if c in [' ', '\n'] or 'a' <= c <= 'z').split()))
Didn't expect a correction that fast.
Really it seems I published it while still reviewing whether I copied everything correctly... Bit too hasty. I didn't expected someone could cross-verify that fast :)
But truly, the conversion is less or more straighforward, and given that the text is originally in English I'm even bit surprised that some differences were encountered. Though there could be several publications etc.
...if c in [' ', '\n'] or 'a' <= c <= 'z').split()))...
I think perhaps it is one of cases when regexps may be clearer than no-regexps :)
Took a liberty of entering my own solution as well.