Complex sentence: Hammon was a slave his whole life, owned by several generations of the Lloyd family on Long Island, New York; however, he was allowed to attend school, and (unlike many slaves) was allowed to learn to read and write.
Split into simpler sentences: Hammon was a slave his whole life, owned by several generations of the Lloyd family on Long Island, New York. However, he was allowed to attend school, and thus (unlike many slaves) was able to read and write.