North Yemen became independent of the Ottoman Empire in 1918 .