-
Notifications
You must be signed in to change notification settings - Fork 1
Classifier
Luiz Miguel edited this page Aug 6, 2023
·
6 revisions
A simple text classifier that uses similarities between the text and the database to tell which entity is responsible.
model (Model): The model that will be used for classify.
predict(input: set)
Predict the entity responsible for the input by comparing the patterns
getSimilarities(input: set)
Performs the process of filtering patterns similarities
from simpleclassifier import Classifier, Model, processText
model = Model.read("model.pkl") # This model needs to be pre-trained
classifier = Classifier(model)
input = processText("What time is it")
result = classifier.predict(input)
print(result)