‹ BackHN Continuity

Thread

Can gzip be a language model?

414 points · 165 comments · networked

  1. jll29 · · focus · HN ↗
    Yes: you can classify a test file by topic with gzip as follows:

      gzip -9 sports.txt   testfile.txt
    
      gzip -9 politics.txt testfile.txt
    
      gzip -9 business.txt testfile.txt
    
    (ass. sports.txt politics.txt and business.txt are text docs pertaining from the sports, politics and business domains, respectively, and have equal size)

    The test file belongs to the topic with the smallest size *.gz file.

    Witten's group at Waikato uni were perhaps the first to work on this.

    Also check out the Hutter prize if you are interested in this.

    1. LPisGood · · focus · HN ↗
      There are some deep connections between machine learning, compression, and cryptography with information theory as a common thread.

      Also, I’ve never seen “ass.” Used to shorten “aside” — I typically use N.B. but perhaps only for important ones.

      1. shoo · · focus · HN ↗
        For anyone wanting an introductory text for information theory &amp; that explores some of these connections &amp; applications, it&#x27;s worth checking out the late David MacKay&#x27;s 2003 textbook Information Theory, Inference &amp; Learning Algorithms <a href="https:&#x2F;&#x2F;www.inference.org.uk&#x2F;itila&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.inference.org.uk&#x2F;itila&#x2F;
      2. arrowsmith · · focus · HN ↗
        3Blue1Brown has a good video about this: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=l6DKRf-fAAM" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=l6DKRf-fAAM
      3. matzf · · focus · HN ↗
        The &quot;ass.&quot; more likely stands for &quot;assuming&quot;.
        1. chrisweekly · · focus · HN ↗
          Yeah, I read it as &quot;assuming&quot; too.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.