This manuscript presents an extension of feature description and matching strategies by proposing an original approach to learn the semantic information of local features. This semantic is then exploited, in conjunction with the bag-of-words paradigm, to build a powerful feature descriptor. The approach, ended up by combining local and context information into a single descriptor, is also a generalized method for improving the performance of the local features, in terms of distinctiveness and robustness under geometric image transformations and imaging conditions. The performance of the proposed approach is evaluated on real world data sets as well as in both the 2D and 3D domains. The 2D domain application addresses the problem of image feature matching while in 3D domain, we resolve the issue of matching and alignment of multiple range images. The evaluation results showed our approach performs significantly better than expected results as well as in comparison with other methods.