Ubiquitous presence of smart connected devices coupled with evolution of Artificial Intelligence (AI) within the field of Internet of Things (IoT) have resulted in emergence of innovative ambience awareness concepts such as smart buildings and smart cities. In particular, IoT-based indoor localization has gained significant popularity to satisfy the ever increasing requirements of indoor Location-based Services (LBS). In this context, Inertial Measurement Unit (IMU)-based localization is of particular interest as it provides a scalable solution independent of any proprietary sensors/modules. Existing IMU-based methodologies, however, are mainly developed based on statistical heading and step length estimation techniques that, typically, suffer from cumulative error issues and have extensive computational time requirements limiting their application for real-time indoor positioning. Methods: To address the aforementioned issues, we propose the Online Dynamic Window (ODW)-assisted two-stage Long Short Term Memory (LSTM) localization framework. Three ODWs are proposed, where the first model uses a Natural Language Processing (NLP)-inspired