Adding Spaces
A Tale of 2 Secrets › Forums › T.E.M.P.E.S.T. › Adding Spaces
- This topic has 1 reply, 5 voices, and was last updated 5 days, 4 hours ago by ByteInBits.
-
AuthorPosts
-
28th November 2025 at 2:05 pm #113961BBM92Participant
Out of interest, does anyone here have a quicker way of adding spaces to the text after it has been decyphered than just manually?
If they did, they probably shouldn’t share it! There is an “all my own work” rubric! You could try writing some code to pick out words from the dictionary. It won’t be perfect (we have been known to ensure that!) but it reduces the effort involved. Harry
1st December 2025 at 10:42 pm #113995Crackerjack_404Participant@BBM92 I usually just wait until official decrypts are released which are far easier to read… but there is a python package called wordninja which is decent at inserting spaces. I personally never felt the need to use it as all the space are automatically removed when solutions are checked, but I can imagine why it might be useful. I think after a while you just get used to processing longs strings of text without spaces, but you can look up wordninja if you think that might be helpful.
I can’t remember but somewhere in the past there was a mention about over-reliance on pre-written modules affecting final rankings if you’re considered for prizes.
Yep! Best to avoid using packages written by someone else if you hope to be eligible for a prize. Harry
1st December 2025 at 10:44 pm #113996F6EXB_the_frenchyParticipant@ BBM92
Some time ago, in the forum (since recycled), someone mentioned the “wordninja” library for Python. I use it and it’s 95% accurate.Beware the rules as described elsewhere in this thread! Harry
1st December 2025 at 10:46 pm #113997upsidedownParticipantI suppose a word splitting program offers a mild competitive advantage: if the plaintext of the first part of a challenge contained a hint for the second you might be able to read it more quickly. Otherwise, it’s not practical as a text fitness measure and the scoring system on this website ignores spaces. Perhaps you just want to encourage people to write their own software (a noble goal).
Yes and it is not in the spirit of the rules to use word splitting software or packages from elsewhere. Please write your own! Harry
If anyone is interested in writing this sort of program, I suggest compiling a list of words and their frequencies (I used all the plaintexts from madness’ cipher challenge archive, along with some other sources) and then trying to formulate the word splitting problem as a dynamic programming problem.
Dynamic programming is an unintuitive term for breaking a large problem into recursive subproblems (in this case, substrings of the input string) and then saving the result of solving the subproblem (here, where to put spaces in each substring) so it is only computed once. Dynamic programming can be difficult to get your head around but when you think of it as recursion it leads to very fast and quite simple & neat algorithms.
1st December 2025 at 10:50 pm #114029ByteInBitsParticipantQuote : There is an “all my own work” rubric!
Harry, that is some what unfair!
It has nothing to do with decrypting anything, they simply want
to format their decrypt so as to read the story before the officle
text is given, so please be a sport and put the following up.You are very kind offering the code I deleted below, but as someone pointed out there can be a mild competitive advantage as it can help spot errors and also can help with parsing part A for hints for part B so if anyone wants to split the text using software they have to write their own! Sorry to be mean, but we are heading into the business end of the competition now and these things start to matter! Nice thought though, Harry
2nd December 2025 at 5:44 pm #114063ByteInBitsParticipantHarry, thanks for your reply, you are the BOSS and I accept all your decisions in any of my posts.
I have read though the other posts and see your point, the rules are certainly tightening up now.
-
AuthorPosts
- You must be logged in to reply to this topic.