NaNoGenMo / 2021

National Novel Generation Month, 2021 edition.
44 stars 8 forks source link

No meows #82

Open hugovk opened 2 years ago

hugovk commented 2 years ago

A minimal [non-]entry: minimal in code (changes) and output...

Inspired by @lizadaly's https://github.com/NaNoGenMo/2021/issues/35 which introduced me to Timothy Dexter's A Pickle for the Knowing Ones (1802).

Dexter wrote without punctuation, but in response to complaints about the missing marks, ended subsequent editions with a page of punctuation on the last page:

fouder mister printer the Nowing ones complane of my book the fust
edition had no stops I put in A Nuf here and thay may peper and solt
it as they plese
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,
  ,, , , , , , , , , , , , , , ,, ,, , ,, , , , , , , , , , , , , , , ,,

  ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;
  ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;
  ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;
  ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;
  ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ;; ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;;

  :: : : : : : : : : : : : : : :: :: : :: : : : : : : : : : : : : : : ::
  :: : : : : : : : : : : : : : :: :: : :: : : : : : : : : : : : : : : ::
  :: : : : : : : : : : : : : : :: :: : :: : : : : : : : : : : : : : : ::
  :: : : : : : : : : : : : : : :: :: : :: : : : : : : : : : : : : : : ::

  ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
  ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
  ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
  ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?? ? ?? ! ? ? ? ? ? ? ? ? ? ? ? ? ? ??

  !! ! ! ! ! ! ! ! ! ! ! ! ! ! !! !! ! !! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !!
  !! ! ! ! ! ! ! ! ! ! ! ! ! ! !! !! ! !! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !!
  !! ! ! ! ! ! ! ! ! ! ! ! ! ! !! !! ! !! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !!
  !! ! ! ! ! ! ! ! ! ! ! ! ! ! !! !! ! !! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !!

  '' ' ' ' ' ' ' ' ' ' ' ' ' ' '' '' ' '' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ''
  '' ' ' ' ' ' ' ' ' ' ' ' ' ' '' '' ' '' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ''
  '' ' ' ' ' ' ' ' ' ' ' ' ' ' '' '' ' '' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ''
  '' ' ' ' ' ' ' ' ' ' ' ' ' ' '' '' ' '' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ''

  .. . . . . . . . . . . . . . .. .. . .. . . . . . . . . . . . . . . ..
  .. . . . . . . . . . . . . . .. .. . .. . . . . . . . . . . . . . . ..
  .. . . . . . . . . . . . . . .. .. . .. . . . . . . . . . . . . . . ..
  .. . . . . . . . . . . . . . .. .. . .. . . . . . . . . . . . . . . ..

  -- - - - - - - - - - - - - - -- -- - -- - - - - - - - - - - - - - - --
  -- - - - - - - - - - - - - - -- -- - -- - - - - - - - - - - - - - - --
  -- - - - - - - - - - - - - - -- -- - -- - - - - - - - - - - - - - - --

Well what would it look like if we extracted all the punctuation from a novel?

Code

I already have code to replace all words with a meow of the same length, preserving punctuation; so let's fix that to replace all words with spaces, preserving punctuation:

+    return " " * len(word)

https://github.com/hugovk/meow.py/commit/489593ecd87d1e17152b9054b350468a18b07315

(cleanup and tests https://github.com/hugovk/meow.py/commit/21382b8239e0c6a028a7e4d13229b12a9bee7855)

https://github.com/hugovk/meow.py/blob/main/no_meows.py

Usage

python3 no-meows.py infile.txt > outfile.txt

Output

Let's run it on Dexter's A Pickle for the Knowing Ones and "Books about English language -- Punctuation".

It certainly produces lots of punctuation! But no words? Who am I to judge what a word is?

Let's use the wc Unix utility! It's happy enough that these contain words!

Unfortunately these first four books are under the golden 50k threshold, BUT Dostoyevsky's The Idiot fits nicely.

Original no meows "words" alongside original "words"
A Pickle for the Knowing Ones, by Timothy Dexter txt 2,728 txt 19,772
Why We Punctuate; or, Reason Versus Rule in the Use of Marks, by William Livingston Klein txt 12,088 txt 74,836
"Stops", Or How to Punctuate, by Paul Allardyce txt 3,339 txt 20,027
Punctuation, A Primer of Information about the Marks of Punctuation and their Use Both Grammatically and Typographically, by Frederick W. Hamilton txt 3,339 txt 19,266
The Idiot, by Fyodor Dostoyevsky txt 52,160 txt 296,152

Extracts

Dexter


                                                 &                     
&           &          &                          &        &         
             &                   &                                   
                              &                                        

Hamilton on THE PARENTHESIS


               ,                       ,                                
                                                     ,                  
                         .                                        
                                  ,                              
                                               .                  ,
       ,                        .

 .                                                             
                                       ,                            .

                                      (                               
            )                                             .

              (    )                                  .

 .                                                                    
           ,                                                       .

                                                (  .      )       
                                                                .
    (        .)

 .                                                                     

                            .

                                         (?)                   .

                        (!)          .

 .                     ,                   ,                 ,   

                                                    .

                        : ( )              ; ( )              .

                                          .

    ( )  ) (^ ) ^ ) ( )  ) (^ ) ^ )

       -                             ,                     ,           

                                                        ,      
(      ).                                                               
        ,       (    ),                                         .)

                                                            .

                  .                                          -       
                                    .

Allardyce on THE DASH


  .                                                               
               .            ,                  ,          ,          
                                       .

                                                ,             
                     ;                --                     
             ?

                                      --                 ?

     "                         ,       ----" "                   ."

                                                                   .

        .                                                          
                   .

   .                                                          .

         --     '      --       --  ,                   .

    .                                                            .

                            --           .                   
                         ,    --                     .   
                                     -    --                 
         .                       ,                        --   
                       .

                                                            ,   

         --    .

     .                                                 ,           
          ,                                                      
        ,                                             ,              
                                                 .                   
                           .

                     ,                    ,        ,          ,
              ;            ,          ,         ;          ,
                                   ;                     
               --                    ,                          ,
                                .

                                         ;                   
          ,                                                           
          .

    .                                                                
             .

                                                         ,     
               --  ,                             --          
                                                        .

   .                                                ,               
"      "           ,                     .

                       --           ,                ' 
              .

                ,        ,                        . (             .).

                                                     .

    .                                          ;             ,      
                        ,                    ,               
                                 ,                                
              .

               ,           --          ,                
        --          ,                   ,                       
                                         ?

     .                                                     -          
                                    .

                           . --        (               )   
                                     ;                         
        ,          '         ,                       ;       
                                 ;                              
          .

      .                                                            
                ,                                                    .

     "                                        
        ."--            . 

    .                                       ,                  ,
            ,                                                .

           ?     -               --         -    --    --        
         .

                     ;--                  ;--          ,         
                      ,--                                     
                                                   .

                                                       .            
                                                     .             
                                                              ,   

             .             ,                    ,                 
                     .                                              
           .

Dostoyevsky

"     '                                            ,"         
      ; "                           ,                      
                                   ,          ,                 
                             ."

"    ?           ?"            ; "              '             ?--
  ,   !--"

"   '                     ,       ,"             ,        
      '         . "                                           
                          .        '                           
          ,                                             --    
               '       '                    ?"

"            ;      '          ."

`

lizadaly commented 2 years ago

There’s something very NaNoGenMo about 100% test coverage for 0% words.