Metadata-Version: 2.5
Name: cite-analyser
Version: 0.1.0
Summary: Citation extraction, reference verification, and in-text cross-checking — the Python successor to the cite-sight engine
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.111
Requires-Dist: httpx>=0.27
Requires-Dist: lens-contract>=0.3.1
Requires-Dist: pdfplumber>=0.11
Requires-Dist: python-docx>=1.1
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: regex>=2024.11
Requires-Dist: uvicorn[standard]>=0.29
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# cite-analyser

Part of the [lens family](https://github.com/michael-borck/lens-analysers).

**Citation extraction, reference verification, and in-text cross-checking.**
The Python successor to the [cite-sight](https://github.com/michael-borck/cite-sight)
TypeScript engine (frozen at 0.13.x — see cite-sight's MIGRATION.md). Ported
module-by-module in pipeline order, conformance-tested field-by-field against
goldens recorded from the TS engine over its own `demo-corpus/`.

## Port status

| cite-sight module | Status |
|---|---|
| `references/extractor.ts` (section finding, splitting, parsers, in-text) | ✅ ported, conformance-gated |
| `references/crossReference.ts`, `duplicates.ts` | ⏳ next |
| `references/verifier` (Crossref, DataCite, OpenAlex, EuropePMC, arXiv, URL liveness) | ⏳ |
| `formatValidator.ts` | ⏳ |
| `claims/*` (local claim-evidence review) | ⏳ last, optional |

## Install / use

```bash
pip install cite-analyser

cite-analyser analyse essay.md --json     # extract references + in-text citations
cite-analyser serve --port 8006           # the family HTTP contract (POST /analyse)
```

Python:

```python
from cite_analyser.extractor import extract_references

result = extract_references(text)  # {"references": [...], "inTextCitations": [...]}
```

## Development

```bash
uv venv && uv pip install -e ".[dev]"
python -m pytest                # unit + conformance (vs recorded goldens)
python tools/record_goldens.py /path/to/cite-sight   # only if the TS engine changes
```
