3 ms·
I am not sure if it was intentional, but in your "Moby Dick" example, the "alphabet" vocab is missing the letter 'f'.
by DarmokJalad1701 3y ago
I am not sure if it was intentional, but in your "Moby Dick" example, the "alphabet" vocab is missing the letter 'f'.
- canjobear 3y agoHa, yeah. I was just running my finger along the keyboard to type out the string. I just regenerated it, btw, and got a better looking result.
- Twirrim 3y agoPython can give you all the characters via the constants on the string stdlib: https://docs.python.org/3/library/string.html?highlight=string#string-constants https://docs.python.org/3/library/string.html?highlight=stri..., e.g.: Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import string >>> string.printable '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'
- usgroup 3y agoi suggest you get all the unique characters from the moby dick text and use it as the alphabet if you're generating from it, or truncate the text to just your hand selected characters else gzip cannot even approximate an optimal code if the alphabets don't match.