Text this: Novel adaptive generalized principal component analysis algorithm based on Hebbian rule