How to tell when one word starts and another word ends?
Short of a lexicographic analysis, you can't. There is a little punctuation in Chinese, so you can split sentences into subgroups. But after that, there's no easy way to say where a word stops.

Even very common words like 的 (genitive marker, appears right after the possessor, eg 我的朋友: me, I; genitive; friend: my friend) cannot be relied on 100% to be always just that. 'Taxi' is written 的士, and in this case 的 would not be a single character delimiting two words, but the first character of a word.

And Chinese is not the only language that doesn't have spaces. You'll run into more problems like this.