French newborns can also tell the difference between Japanese and English, languages they rarely hear. How do they do this? The rhythmic properties of these languages differ greatly, and babies rely on rhythm, not on the sounds, to distinguish one language from another.
That's how I recognize Polish as Polish too. I don't know enough words to rely on recognizing the ten words I do know.