instatext is a package to train text classifiers instantly.
Project description
instatext: Train text classifiers instantly
instatext
is a Python 3 library for processing textual data. It provides a simple API for training and predicting with text classifiers.
instatext leverages fasttext
, and pandas
, for the heavy lifting
Get it now
$ pip install instatext
Requirements
- Python >= 3.5
Example
To train a model pass in a csv with the text and labels
text - the text to classify labels - comma seperated list of labels
text,labels
sample text,"sample"
bad stuff,"bad,sample"
good stuff,"good,sample"
import instatext
import logging
def main():
print("hello")
instatext.train_model("test_data/example.csv", "test")
instatext.predict("test", "Predict my good text",0.5)
if __name__ == "__main__":
loglevel = logging.INFO
logging.basicConfig(
format="%(asctime)s |%(levelname)s: %(message)s", level=loglevel
)
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
instatext-0.0.2.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for instatext-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7a66bb2a68499123d005b132352a3af1eb0fa9dffc6d22500b72cd680aa31b3 |
|
MD5 | b9a3aa9f17bb7a7927f02e7cdef5bf84 |
|
BLAKE2b-256 | 11bcb768a720b213180ab39dadec70dacdce308dfeae6d45303c5dfdd8a9abe8 |