Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Dynamically Updating Frequency Analysis

by Voronich (Hermit)
on May 08, 2013 at 16:26 UTC ( [id://1032632]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Dynamically Updating Frequency Analysis
in thread Dynamically Updating Frequency Analysis

AH! Yes. I see what you mean now. That's actually a fun problem.

My first "real world" answer would be to accept the inefficiency of the degrading accuracy of the table. But that's no fun.

If you did a true multi pass you'd run in to the problem of your universe of 8-bit symbols jumping by virtue of the previous encoding pass. So that's no fun either.

It looks to me like "given lock in to the initial approach" you'd have to take the optimum compression candidate, decrement the individual cases of its components from the frequency distribution table, including bounding characters (the spaces in the 2-grams of ' here ', for instance) for each substitution instance of 'here'. That would leave you with an accurate frequency distribution, having pulled the 40 instances of 'he', 'er', 're', ' h' and 'e ' (with the foolish assumption that 'here' always occurs in the middle of a sentence.) So the table is accurate again.

  • Comment on Re^5: Dynamically Updating Frequency Analysis

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1032632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found