A fuzzy classifier for natural language text
Project description
FTC - Fuzzy Text Classifier
A fuzzy classifier library for natural language text. Github-Repo
Simple usage example
#import library
from fuzzy_text_classifier import TextClassifier
#instantiate class
tc = TextClassifier()
#train the classifier with some documents
doc1 = 'some text document about sport'
doc2 = 'another text document about cinema'
doc3 = 'another one text document music'
tc.train(doc1, 'sport')
tc.train(doc2, 'cinema')
tc.train(doc3, 'music')
#classify a document
doc = 'a document about sport to classify'
ranking = tc.classify(doc)
ranking will be an object like
[{'sport': 1.0}, {'cinema': 0.6666666666666666}, {'music': 0.3333333333333333}]
a list ordered by similarity where the key is the category and the value is the degree of similarity between the document and the category.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for fuzzy-text-classifier-1.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 399e36675b7a087829634339167e16cc08c8b3943d7396cdb7ae6caf1ab96555 |
|
MD5 | 66264285250672d077b0395fdaffd13c |
|
BLAKE2b-256 | 59728943bb69ca188fa2306cbfcda4f9e57015f17de9ead5f347ff7838ffbb65 |
Close
Hashes for fuzzy_text_classifier-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f2dd4e4f7c92f80d5158774dad9bab63b5a2fb161b10ca075cb8ebbadba8d65 |
|
MD5 | eead646fa867a05243cc8f0559ceeb11 |
|
BLAKE2b-256 | dc13b2a370de5ceb45507510726bb79ef8cbaebb4f5e25d9bd7b83e02fea00dd |