in CARS in order to provide users with contextual recommendations. The key idea behind the CARS we propose is to base the Top k neighbors detec- tion only on the profile parts relevant to a given context (i.e., operational profile) instead of on the whole user profile. Top k neighbors of the active user (u ) are the k most similar users to him in terms of their profiles. This means that profiles of all users are filtered and adapted to the context of the active user before comparing them. Algorithm 3 details the process of computing the Top k contextual neighbors. The algorithm starts by finding the context cluster to which the active context Ca belongs (Line 2) Thus, it measures, with the matching service, the similarity between Ca and each context cluster to determine the closest one. In Line 3, the Binding service is invoked to produce the operational profile of Ua. Then, in Lines 4 through 7, can- didate neighbors of U are computed. Every user who rated the item being recom- mended It, in a context similar to Ca) is considered as a candidate neighbor. His operational profile is computed and added to the set CN. Line 8 ranks candidate neighbors with respect to their similarity with the operational profile of by apply- ing the profile-to-profile matcher service presented in Section 10.4.4. It extracts, and then, the Top k of them (those which are the most similar to u within the con- text c). The algorithm returns this list of Top k neighbors (Line 9). ALGORITHM CONTEXTUAL TOP K NEIGHBORS Input: CPua={m11.... mnm} : Contextual active user profile, U: set of all users, Ca: the active context, C: the set of all contexts, Item: the item candidate to recommendation, k: the number of neighbors to consider, y: the threshold. Output: the TOP k neighbors 1: CN - 0 {Set of Candidate Neighbors} C*:=CE MATCH (Ci, Ca) < MATCH (C*, Ca) 3: OP: BIND(CP_, c*) 4 : for all 5: if m (Item,*) 6: OPui:=BIND(CPui,Ca) CN CN u{OPu}} 8 : TOPK {OPuiE CN, i=1, k} such that E CN, OPuj E TOPK, MATCH (OPuji OPua) < MATCH (OPui, OPua) 9 : ret