You cannot do it without a corpus.
Look at it this way: can you tell whether 'light' is related to 'I turned on the electricity when I entered the room' without asking someone or something that actually knows Japanese (assuming it was written in Japanese and you don't know Japanese; if you do, try with "light" and "When he entered the room, he lit the lamp"). If you can't, how do you expect a computer to do it?
Consider this experiment - can you provide me the algorithm by which you can teach a non-English-speaking person that "light" is related to "When he entered the room, he turned on the lamp"? Again, not possible.
You need training data unless you significantly limit the meaning of "related" (to "contains", for example).
If you wish to learn what is Natural Language Processing then visit this NLP Tutorial.