Computational approach for the chemical sensitivity of oxide and sulphide semiconductor surfaces