fetch the common terms from a document