Characterization of sol–gel transitions of food hydrocolloids with near infra-red spectroscopy