Scientists have discovered a way to mine the internet chatter for trends – in this case detection of the swine flu epidemic – before they become obvious.