Semantic wireless localization of WiFi terminals in smart buildings