B.K. said:This. Just let the navy ships fire on the pirates as soon as they spot them.
Pirate ships don't sail black skull and crossbone flags. They look just like any other fishing ship, except they're hiding guns. Unless you search every fishing ship for guns, there is no way to know if they are a pirate ship. Hell even normal fishing ships may have guns to protect themselves from pirates, so that's not even a reliable test.
The only way to know if a ship is a pirate ship is to see them hijack another ship.