In this recipe, we will use the model developed in the previous recipe, Training a maximum entropy model for text classification, to classify text. We will use the DocumentCategorizerME class to perform the classification.
The model will be read in from the en-frograt.bin file created in the previous recipe. A test sentence is used and the best category and an estimate of how good of a fit was achieved is displayed.