The Linked Claims Extractor is a tool that uses AI language models to extract claims from text, URLs, or PDFs. It supports multiple LLMs, including Anthropic and OpenAI, and allows users to define custom schemas for claim extraction.
To install the Linked Claims Extractor, run:
pip install linked-claims-extractor
You will need to set the ANTHROPIC_API_KEY
environment variable if you are using the Anthropic model:
export ANTHROPIC_API_KEY=your_api_key_here
from claim_extractor import ClaimExtractor
extractor = ClaimExtractor()
result = extractor.extract_claims('some text')
import pprint
pprint.pprint(result)
result = extractor.extract_claims_from_url('https://example.com')
pprint.pprint(result)
To set up the development environment, run:
python -m venv .venv
source .venv/bin/activate
pip install -e .
To run tests, use:
pytest -s --pdb
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for more details.