This must have been due to the different natures of the training and test data.
obtain a text x from S. If SS is empty, the text x is put into SS and another text x is obtained from S. The texts of SS are already sorted and are indexed by i = 1 .