Separation of alkali compounds by ammonia