Create code to train classifier from string array rather than file