I reckon carribean pirates went extinct towards the end of the 19th century, and that they didn't write much to begin with.
So how is it so common to know how a pirate talks?
Here are some previous answers about this topic:
I have heard that "pirate speak" as we know it today was the result of a stage show. Is this true, and if it is, what kind of vernacular did pirates tend to use? by u/Benerson
Before Treasure Island (1950) cemented the association of West Country accents with pirates, was any other specific accent associated with pirates? E.g. do we know what, if any, accent Gilbert and Sullivan might have associated with pirates when they created The Pirates of Penzance (1879)? by u/EnclavedMicrostate
What were the speech patterns for 17th century sailors, pirates, and buccaneers? by u/Elphinstone1842