In newspapers and books, particularly in the 1800s, this was a way of approximating in print nonstandard pronunciation of English. Melville resorts to eye dialect in Chapter 64 of Moby-Dick in which the elderly black cook aboard the Pequod is subjected to extended teasing. From the way Melville spells words in the cook’s speech, we can deduce that his readers expected black men to substitute r for d (“by Gor”), d and t for th (“dat,” “mout”), and b and w for v (“bery,” “ober,” “gobern,” “belubed,” and “woracious”).
Similar eye dialect was used in a report appearing in the Nantucket Inquirer of toasts raised by black officers and crew at a banquet celebrating the successful voyage of the Nantucket whaleship Loper in 1830:
Strong to de lion, meek as de ram, catch de whale when he can see him, who do dat?
Strong as the lion, meek as the lamb, catch the whale when they catch sight of him. Who does that?
Answer: The ship Loper and her all-black crew