Most ninjas are mammals that fight all the time. Robert Hamburger, author of The Official Ninja Webpage (
http://www.realultimatepower.net/) and the subsequent book Real Ultimate Power, loves ninjas with all of his body (including his pee pee). However, Robert failed to acknowledge the existence of non-mammalian ninjas, such as the reptilian, amphibious and avian varieties.
Idiot Japanese ninjas, who run around in pyjamas, are said to have awesome skillz with various weapons, but they were also said to be able to fly. Any non-Japanese person who claims to be a ninja is retarded and should be treated as such.
A pirate is a person who lives at sea and wears arrrrrrgyle socks. When they were molested in their youths, they all lost one leg and/or one hand and/or one eye, so they walk around with a wooden leg, a hook and an eye patch, screaming "ARRRRRRGH!"
Many years ago, pirates were infamous for raiding European trade ships, stealing their treasure and hiding it in their asses - hence the word "booty". There was a time when pirates were endorsed by the kings and queens of Europe to raid merchant vessels from opposing countries, which sucks 'cause we can't do that now.
SOOO...
Since ninjas would probably have to sail out to the pirates, they would be sunk by the pirates' cannons. Some argue that ninjas could fly to the pirate ships. These same people would argue that when the pirates would shoot pistols at the ninjas, the ninjas would deflect the bullets with their swords. These same people are also retards. If (and this is the more likely possibility) the ninjas stayed on land and let the pirates come to them, they could take them out one at a time as they came down the gangplank, or defeat one longboatfull at a time. Since a realistic text battle between the two entities will probably never take place, the question will unfortunately never be answered.