Electric dipole moment function of ammonia