qnli question: What company annexed large areas of India in the 18th and 19th centuries? sentence: The subcontinent gained independence from the United Kingdom in 1947, after the British provinces were partitioned into the dominions of India and Pakistan and the princely states all acceded to one of the new states.