Metadata-Version: 2.4
Name: proof-citations
Version: 1.33.2
Summary: Fetch URLs and verify that quoted text appears on the page. Extracted from proof-engine.
Author-email: Yaniv Golan <yaniv@lool.vc>
License: MIT License
        
        Copyright (c) 2026 Yaniv Golan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://proofengine.info
Project-URL: Repository, https://github.com/yaniv-golan/proof-engine
Project-URL: Documentation, https://github.com/yaniv-golan/proof-engine/blob/main/packages/proof-citations/README.md
Project-URL: Issues, https://github.com/yaniv-golan/proof-engine/issues
Project-URL: Changelog, https://github.com/yaniv-golan/proof-engine/blob/main/CHANGELOG.md
Project-URL: Source, https://github.com/yaniv-golan/proof-engine/tree/main/packages/proof-citations
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Text Processing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31
Requires-Dist: pdfplumber>=0.10
Requires-Dist: PyPDF2>=3.0
Dynamic: license-file

# proof-citations

Fetch URLs and verify that quoted text appears on the page — the citation-verification
primitive extracted from [Proof Engine](https://proofengine.info).

## Install

    pip install proof-citations

## Library

    from proof_citations import verify_citation

    result = verify_citation(
        "https://example.com/article",
        "the exact quoted sentence",
        "B1",                 # fact_id — used in messages
    )
    print(result["status"])   # "verified" | "partial" | "not_found" | "fetch_failed"
    print(result["credibility"]["tier"])

## CLI

    proof-citations verify --url URL --quote "QUOTE TEXT" --fact-id B1
    proof-citations verify --facts facts.json

## Why

LLMs hallucinate citations. This package does one job: fetch the URL, normalize
unicode and HTML, and confirm the quoted text is actually on the page. It handles
PDFs, Wayback fallback, and the unicode quirks (en-dash vs hyphen, curly quotes,
non-breaking spaces, HTML-entity-encoded quotes) that real citations contain.
