Skip to main content

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

Features

  • Topic Extraction
  • Similarity Search
  • BM25 search ( word ranking search)
  • Topic Search

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


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.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

instatext-0.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file instatext-0.0.1.tar.gz.

File metadata

  • Download URL: instatext-0.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for instatext-0.0.1.tar.gz
Algorithm Hash digest
SHA256 69e577b834e3ad95965373f144098b952f44cd6b6610dc19ae0c17d2c9a24a09
MD5 727fe34d2bd3066b7fd5a7b187c01439
BLAKE2b-256 800b09eefddef5a3884f83cb55b8855bbaa74c5451755f0cbf424d403cce6fc4

See more details on using hashes here.

File details

Details for the file instatext-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: instatext-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for instatext-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e39ed6507db2cea81bb6d3825a22fcac3c591cfe3c8a91bf1f059d911e45ff5d
MD5 97b8acec59578d7ea2c8fdd860734363
BLAKE2b-256 901f2bc6061861fcd28df721f34a63a6456f6a48439b27eb299796386bd4772d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page