extract lines for term pairs defined in a dictionary