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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuzzy-text-classifier-1.5.0.tar.gz.
File metadata
- Download URL: fuzzy-text-classifier-1.5.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c35218b20175ac31191c9597071a5b94903e3159fcf0cd8b6acc304d614c7199
|
|
| MD5 |
8a9682f4fba2aab119f941188ce0b4ea
|
|
| BLAKE2b-256 |
8dca6807053966b6387b7875b73bb47c10635fccf84217b42453f0819eb25e12
|
File details
Details for the file fuzzy_text_classifier-1.5.0-py3-none-any.whl.
File metadata
- Download URL: fuzzy_text_classifier-1.5.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df81e43aab737d579002d46242ea2db424c27f09f8f556a856591d887d12a019
|
|
| MD5 |
bada70700a5cde9e00995882e5545a89
|
|
| BLAKE2b-256 |
b76ab9d29e2a3e514cde7a264467dd728627e708e03fb4937a2dda0800777965
|