Automated Classification of variable stars: Application to the OGLE and CoRoT databases.