This is like asking "how do you know a cat is a cat and not a dog?". If you've seen enough samples, you recognise the pattern.