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.1.tar.gz (10.5 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.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ector-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 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.1.tar.gz
Algorithm Hash digest
SHA256 4703cd128af5cd2afba6e13c652f3447ff847fad3b9410a5cb6dac5f8e83f836
MD5 8beb11ddb4f79a9600f09f5f0014eafa
BLAKE2b-256 e68a83654f99866bc67679d3c8c55a96674379de99a70eed7c9503c89d99fe22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ector-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f67ad01ed6c1dd1554663461a192288a6685e04b8788166ba645e1adf72ecce1
MD5 50daa1eef530aba20312d5bf5c68de80
BLAKE2b-256 2820e68e32cbecd6f3e6766e5994ce6d5822d70a31522dc724330fe23f4e9af5

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