Skip to main content

Lingorithm Text Classification Kit

Project description

Lingorithm Text Classification

This package is the core function for any NLP operation or pacakge used by lingorithm.

Installation

Use the package manager pip to install ltck.

pip install ltck

Usage

Data

Input data is a list of tuples

data = [
    ("Help me please", "commonQ.assist"),
    ("Is this a bot?", "commonQ.bot"),
    ("Is there a bot chatting to me?", "commonQ.bot")
]
import ltck

tc = ltck('en', data) 

tc.train(epochs=20, batch_size=8, model_name="commonQ_v1")


classified = tc.classify("Help me please")

print(classified)
# [('commonQ.assist', 0.9737932),
#  ('commonQ.not_giving', 0.012769885),
#  ('commonQ.name', 0.0071987235),
#  ('commonQ.how', 0.002869619),
#  ('commonQ.query', 0.0023981368),
#  ('commonQ.bot', 0.000478917),
#  ('faq.bad_service', 0.0003706195),
#  ('faq.aadhaar_missing', 5.4887507e-05),
#  ('faq.apply_register', 3.3203887e-05),
#  ('commonQ.just_details', 1.60179e-05),
#  ('faq.biz_new', 9.965993e-06),
#  ('faq.application_process', 3.101246e-06),
#  ('faq.borrow_limit', 1.6019511e-06),
#  ('faq.borrow_use', 1.4953373e-06),
#  ('commonQ.wait', 2.9794015e-07),
#  ('faq.biz_simpler', 2.6959242e-07),
#  ('contact.contact', 9.587218e-08),
#  ('faq.biz_category_missing', 5.7328425e-08),
#  ('faq.approval_time', 5.5687766e-09),
#  ('faq.banking_option_missing', 1.6084242e-09),
#  ('faq.address_proof', 1.3430994e-09)]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

ltck-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file ltck-0.1.1.tar.gz.

File metadata

  • Download URL: ltck-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for ltck-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b7ea536f65a06f3779c0c4dfeeaf19bbaceb0044d61b7dfe4e153c69c374d273
MD5 cd63ac29757167224e1f3c0983f8c3de
BLAKE2b-256 ed40e433e9e9d291a5e6d035e248394293065f1a675c407de75a9a7c6d7bd029

See more details on using hashes here.

Supported by

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