Text this: Modeling and Reasoning of Contexts in Smart Spaces Based on Stochastic Analysis of Sensor Data