Identify reusable components with a learning approach