It doesn't do it by calculating the information though, it uses a set of heuristics learned through consistent experience.
You can also claim that Google is a giant lookup table. They should stop hiring computer scientists and start repurposing brains!