gramDict builder