eco-num-extract turns natural science text into structured numeric data using llmatch-guided outputs.
Project description
eco-num-extract
Extract structured numerical data from natural phenomenon descriptions using AI-powered pattern matching.
Overview
A Python package that converts qualitative ecological/natural descriptions into structured quantitative insights. Uses llmatch-messages to enforce numerical output schemas from LLM responses.
Installation
pip install eco_num_extract
Usage
Basic Usage
from eco_num_extract import eco_num_extract
# Default usage with LLM7
response = eco_num_extract(
user_input="The forest had 120 trees with 45% canopy cover and 3.2m average height"
)
Custom LLM Integration
Pass your preferred LLM instance (OpenAI, Anthropic, etc.):
from langchain_openai import ChatOpenAI
from eco_num_extract import eco_num_extract
llm = ChatOpenAI()
response = eco_num_extract(
user_input="Sample text",
llm=llm # Your custom LLM instance
)
Parameters
user_input(str): Textual description containing numerical patternsapi_key(str, optional): LLM7 API key (defaults to environment variable)llm(BaseChatModel, optional): Custom LLM instance (defaults to ChatLLM7)
Features
- Regex-enforced numerical output structure
- Supports any LLM via LangChain interface
- Environment variable fallback for API keys
- Free tier compatible with LLM7
Rate Limits
LLM7 free tier provides sufficient throughput. For higher limits:
# Via environment variable
os.environ["LLM7_API_KEY"] = "your_key"
# Or direct parameter
eco_num_extract(api_key="your_key")
Getting Started
- Install package
- Get free API key at LLM7 Token Dashboard
- Process your ecological descriptions
Issues
Report problems at GitHub Issues
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eco_num_extract-2025.12.22085323.tar.gz.
File metadata
- Download URL: eco_num_extract-2025.12.22085323.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1107d53a59c1c0b77d494bef12be7d9930600d5e5bb05882cde447c1519f2c86
|
|
| MD5 |
db6cdd7be3412b6c6ad24691fdcba220
|
|
| BLAKE2b-256 |
c0fa8449c7fbb9f8b02dee0cdf57d84a706358daaa0c75c5b165796082e319b9
|
File details
Details for the file eco_num_extract-2025.12.22085323-py3-none-any.whl.
File metadata
- Download URL: eco_num_extract-2025.12.22085323-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16c7831e25d88dcf5da85cd1250ce652c91801790fa926d5d0401896413f26a3
|
|
| MD5 |
5b9c082068de9c52ed45e01702a65e09
|
|
| BLAKE2b-256 |
2187db5cee46be1add8c03f2b218c888a0dd16b718bff1cfc94d6e9f14f8e741
|