A method executed by a computer system implementing a semantic indoor positioning system, the semantic indoor positioning system to locate a mobile device inside a building by using a plurality of reference areas as satellites, where the building includes the plurality of reference areas, where a scan of a plurality of wireless radio signals is obtained by the mobile device of a user at an unknown location in the building, where the plurality of wireless radio signals is generated by a plurality of wireless access points (WAPs), where the scan includes a plurality of detected WAPs with a corresponding received signal strength indication (RSSI) for each detected WAP in the plurality of detected WAPs, the method to improve accuracy of the semantic indoor positioning system by generating a vector of distance scores for the unknown location based on the scan for comparison with a plurality of vectors of survey distance scores corresponding to the plurality of reference areas, the method comprising the steps of: arranging the plurality of detected WAPs into an ordered list of WAPs according to the corresponding RSSI for each detected WAP in the plurality of detected WAPs; extracting a set of WAP tuples from the ordered list of WAPs, wherein each WAP tuple in the set of WAP tuples includes a preset number of adjacent WAPs from the ordered list; retrieving a set of probabilities for each reference area in the plurality of reference areas based on the set of WAP tuples, wherein each probability in the set of probabilities for a corresponding reference area is calculated from a plurality of survey scans obtained at the corresponding reference area; calculating a plurality of distance scores for the plurality of reference areas, wherein each distance score in the plurality of distance scores is calculated by applying a Bayesian model to the retrieved set of probabilities for the corresponding reference area; generating the vector of distance scores for the unknown location using each reference area in the plurality of reference areas as a direction and each distance score in the plurality of distance scores as a magnitude; and comparing the vector of distance scores for the unknown location with each of the plurality of vectors of survey distance scores to find the reference area that has a highest probability of including the unknown location. arranging the plurality of detected WAPs into an ordered list of WAPs according to the corresponding RSSI for each detected WAP in the plurality of detected WAPs; extracting a set of WAP tuples from the ordered list of WAPs, wherein each WAP tuple in the set of WAP tuples includes a preset number of adjacent WAPs from the ordered list; retrieving a set of probabilities for each reference area in the plurality of reference areas based on the set of WAP tuples, wherein each probability in the set of probabilities for a corresponding reference area is calculated from a plurality of survey scans obtained at the corresponding reference area; calculating a plurality of distance scores for the plurality of reference areas, wherein each distance score in the plurality of distance scores is calculated by applying a Bayesian model to the retrieved set of probabilities for the corresponding reference area; generating the vector of distance scores for the unknown location using each reference area in the plurality of reference areas as a direction and each distance score in the plurality of distance scores as a magnitude; and comparing the vector of distance scores for the unknown location with each of the plurality of vectors of survey distance scores to find the reference area that has a highest probability of including the unknown location.