Well, the pirates aren't the most stealthy people in the world. When you see shouting men driving a speedboat directly at you, firing there weapons, its pretty safe to assume that they're pirates.
Of course, the only way to stop piracy altogether is to restore order to Somalia, which will
piles of fun