Skip to main content

Extract from a given long text input, eCommerce products and price budget.

Project description

ECTOR

Extract from a given long text input, eCommerce products and price budget.

DISCLAIMER

This is not an "OpenAI wrapper", it use NLP(Natural Language Processing) and tokens manipulations to 'understand the given input' then extract product key name + budget.

Therefore, this is not 100% optimized at all and was not tested on extreme edge-cases. However it's quite fast and does the job for my use case at the moment.

REQUIREMENTS

HOW TO INSTALL

pip install ector

HOW TO USE

$ python
Python 3.12.9 (main, Feb  5 2025, 08:49:01) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> import asyncio
>>> from ector import extract
>>>
>>> text = "Hello, do you have some apple juice at 9 eur ? i also want bananas, but i only have 15 eur"
>>> print(json.dumps(asyncio.run(extract(text)), indent=2))
{
  "products": [
    {
      "product": "Apple juice",
      "price": 9.0,
      "currency": "eur"
    },
    {
      "product": "Bananas"
    }
  ],
  "budget": {
    "price": 15.0,
    "currency": "eur"
  }
}
>>>

AUTHOR

  • Sanix-Darker

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

ector-0.1.2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

ector-0.1.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file ector-0.1.2.tar.gz.

File metadata

  • Download URL: ector-0.1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for ector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ddd4fdf12557d00202698b1b127e1ef33bcfe6a45384e8db0dc318b7d15fc48
MD5 d8034545bc525274628719b03f1467a7
BLAKE2b-256 8a26e48caa3440ee4342432301c85a3759b0af12711df9a30cad1da8c438bb10

See more details on using hashes here.

File details

Details for the file ector-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ector-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for ector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6df115a2329cabe8f684e2e78143cca02c5d7cdd750a8324c517f898005d19
MD5 1ab55d8e090696d6ec41efba50d15baf
BLAKE2b-256 1eceae38c25d4823fbd126ad4a6b747667322f58003e560df8455986267f1312

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