N-tuple matching between documents, including synonym matching