Co-occurrence analysis has been used to determine related words or terms in many NLP-related applications such as query expansion in Information Retrieval (IR). However, related words are usually determined with respect to a single word, without relevant information for its application context. For example, the word "programming" may be considered to be strongly related to "Java", and applied inappropriately to expand a query on "Java travel". To solve this problem, we propose to add another context word in the relation to specify the appropriate context of the relation, leading to term relations of the form "(Java, travel) Indonesia". The extracted relations are used for query expansion in IR. Our experiments on several TREC collections show that this new type of context-dependent relations performs much better than the traditional co-occurrence relations.