Is it possible to add every word in a file to a set in $\mathrm{O}(n)$ time?
Splitting 


While splitting you have to touch every element once to see that is a delimiter or not. So it $\in \mathcal{O}(n)$

Assuming a Hash-based Map is used;


  cost of Inserting a string


It is $\in \mathcal{O}(1)$ but if you consider the hash function as not a constant then you have to analyze the hash function itself. When we are talking a hashmap, the string size, usually, is not considered.


  Total insert cost


It is $\in \mathcal{O}(n)$, 


  Total cost


It is the sum of all = $ \mathcal{O}(n) + \mathcal{O}(n)= \mathcal{O}(n)$