Skip to main content

This is a module to predict the products category using artificial inteligence.

Project description

NK Artificial Intelligence

Welcome to NKIA or NKAI in English. This project is used to categorize products based on its caracteristics, there is 29 different classes of food products. Another usage is to distinguish between food and non-food products.

Requirements

  • Install requirements:

    • pip install -r requirements.txt --user
  • Install NLTK stopwords:

    • python -m nltk.downloader stopwords

Usage

  • Import classify class:
    • from nkia.ml.classify_products import ClassifyProducts as cp
  • Predict product class:
    • cp().inference_from_category_model(product_name=['frozen fish'])
    • Returns: String containing the predicted class name
  • Parameters:
    • inference_from_category_model(ingredients=[''], allergics=[''], description=[''], product_name=[''])
    • All the parameters must be in a single string format.
  • Predict if product is a food or not:
    • cp().inference_from_food_model(product_name=['chocolate cake'])
    • Returns: String 'food' or 'not food'
    • Note: Food classifier just has the product name as parameter.

Examples

  • cp().inference_from_category_model(ingredients=['sugar salt vanilla orange'], allergics=['peanuts'], description=['this is an awesome product, hummmm'], product_name=['very delicious candy'])

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

nkia-1.8.1.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nkia-1.8.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file nkia-1.8.1.tar.gz.

File metadata

  • Download URL: nkia-1.8.1.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for nkia-1.8.1.tar.gz
Algorithm Hash digest
SHA256 d7cdee6ecdf582c998ce25c37721deecf3ff8e2df218259b64fb75c07e62c851
MD5 3f1246b729c79011d1c17fc276dd984e
BLAKE2b-256 e20bb1401713ed3df2c7ee5b608ee75e578a4f933ee3ca3377f39f289de52420

See more details on using hashes here.

File details

Details for the file nkia-1.8.1-py3-none-any.whl.

File metadata

  • Download URL: nkia-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for nkia-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba6a0c6b52a102cf3e6a61f65985b799e7feb64ceb15d0d07105cea54e5270e
MD5 a7e416eca956554e7c240abc17bc3772
BLAKE2b-256 4aa945a03620b3263dbd4a85d077e177d405ba0ca99131d6d922ae5f342d3e55

See more details on using hashes here.

Supported by

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