Skip to main content
The National Cipher Challenge

Adding Spaces

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Adding Spaces

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #113961
    BBM92
    Participant

    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

    #113995
    Crackerjack_404
    Participant

    @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

    #113996
    F6EXB_the_frenchy
    Participant

    @ 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

    #113997
    upsidedown
    Participant

    I 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.

    #114029
    ByteInBits
    Participant

    Quote : 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

    #114063
    ByteInBits
    Participant

    Harry, 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Report a problem