sentence1: Swift was offered and accepted the post of secretary and chaplain to the Earl of Berkeley, one of the Lords Justices, but when he reached Ireland he found that the secretaryship had been given to another.
sentence2: Swift worked for the Earl of Berkeley.