The short answer is "You can't". The usual answer is "Context will decide" (but it often doesn't)
As long as you are working with noun phrases, the task is pretty much hopeless because most relevant information gets lost in constructing noun phrases from sentences. Not that matters are a lot better with sentences: 'jan li kule' can mean "the man is colorful/colored" just as well as "The man colors/paints". For the most part sentences with objects are the clearest 'jan li kule e sama' "The man pained himself" vs. 'jan li kule e sitelen" "the man painted a picture"
In grammatical reconstructions of difficult passages, going back all the way to basic sentences like this, with 'jan ni' in place of the puzzling piece, clarifies the issue -- although doesn't say what the right reading is. And, of course, context does help. if there is a lot of it.
Bringing over from the underlying sentences more information also helps. A murderer is 'jan pi moli jan', for example (although, at a more remote level, that could be a murder victim - you basically can't get guaranteed disambiguation). A painter could fairly safely be 'jan pi kule sitelen' (and again, the demon says "or a man who got all smeared over when a painting fell on him" Remote, as i said.)
To be fair, the same demon can work up problems with the most innocent English sentences -- but it is a lot easier with tp.