PyStreamPDF 2.3.1__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/Cargo.lock +2 -2
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/Cargo.toml +1 -1
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/PKG-INFO +1 -1
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/__init__.py +1 -1
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/citations.py +20 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/streampdf/server.py +4 -4
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/LICENSE +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/README.md +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/Cargo.toml +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/audit.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/context.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/document.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/error.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/forms.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/heading_extractor.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/index.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/lib.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/markdown.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/navigator.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/page.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/pdf_parser.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/security.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/core/src/structure.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/pyproject.toml +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/Cargo.toml +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/_mcp_connector.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/_mcp_tools.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/cache.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/cli.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/cli_daemon.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/cli_dashboard.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/excel_export.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/extraction.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/code_intelligence.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/json_intelligence.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/log_intelligence.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/sql_intelligence.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/types.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/yaml_intelligence.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/manager.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/pipeline.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/provider.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/providers/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/providers/paddle.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/ocr/providers/tesseract.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/okf_entity_profiles.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/optimization/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/optimization/chunking.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/optimization/compressor.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/optimization/metadata.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/optimization/selector.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/pipeline.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/scripts/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/scripts/post_install.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/assembler.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/entities.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/graph.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/relationships.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/topics.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/semantic/verifier.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/structure/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/structure/builder.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/structure/exporters.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/structure/recovery.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/structure/relationships.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/token_budget.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/tokenizer.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/__init__.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/layout.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/scorer.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/table.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/text.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/validation/types.py +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/src/lib.rs +0 -0
- {pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/streampdf/cli.py +0 -0
|
@@ -551,7 +551,7 @@ dependencies = [
|
|
|
551
551
|
|
|
552
552
|
[[package]]
|
|
553
553
|
name = "pystreampdf"
|
|
554
|
-
version = "2.3.
|
|
554
|
+
version = "2.3.2"
|
|
555
555
|
dependencies = [
|
|
556
556
|
"chrono",
|
|
557
557
|
"pyo3",
|
|
@@ -697,7 +697,7 @@ dependencies = [
|
|
|
697
697
|
|
|
698
698
|
[[package]]
|
|
699
699
|
name = "streampdf-core"
|
|
700
|
-
version = "2.3.
|
|
700
|
+
version = "2.3.2"
|
|
701
701
|
dependencies = [
|
|
702
702
|
"chrono",
|
|
703
703
|
"pdfium-render",
|
|
@@ -5,7 +5,7 @@ Actual token savings depend on your documents — see the README's "Token
|
|
|
5
5
|
Savings" section rather than relying on a fixed multiplier here.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "2.3.
|
|
8
|
+
__version__ = "2.3.2" # Real MCP tool implementations (extract/OCR/validate/etc.), previously all hardcoded fixture data
|
|
9
9
|
|
|
10
10
|
# Optional: Rust core bindings (requires maturin build)
|
|
11
11
|
try:
|
|
@@ -36,3 +36,23 @@ class CitationNetwork:
|
|
|
36
36
|
"""Add citation."""
|
|
37
37
|
citation = Citation(source_paper=source, target_paper=target, relation=relation)
|
|
38
38
|
self.citations.append(citation)
|
|
39
|
+
|
|
40
|
+
def top_cited(self, limit: int = 3) -> list[str]:
|
|
41
|
+
"""Return formatted labels for the most-cited papers in the network (PYSTREAMPDF-006)."""
|
|
42
|
+
counts: dict[str, int] = {}
|
|
43
|
+
for c in self.citations:
|
|
44
|
+
if c.relation == CitationRelation.CITES:
|
|
45
|
+
counts[c.target_paper] = counts.get(c.target_paper, 0) + 1
|
|
46
|
+
elif c.relation == CitationRelation.CITED_BY:
|
|
47
|
+
counts[c.source_paper] = counts.get(c.source_paper, 0) + 1
|
|
48
|
+
ranked = sorted(counts.items(), key=lambda item: (-item[1], item[0]))[: max(0, limit)]
|
|
49
|
+
results: list[str] = []
|
|
50
|
+
for pid, count in ranked:
|
|
51
|
+
meta = self.papers.get(pid, {})
|
|
52
|
+
title = meta.get("title") or pid
|
|
53
|
+
year = meta.get("year")
|
|
54
|
+
if year is not None:
|
|
55
|
+
results.append(f"{title} ({year}, {count} citations)")
|
|
56
|
+
else:
|
|
57
|
+
results.append(f"{title} ({count} citations)")
|
|
58
|
+
return results
|
|
@@ -6,8 +6,8 @@ from typing import Any, Optional
|
|
|
6
6
|
class StreamPDFServer:
|
|
7
7
|
"""REST API server for document processing workflows."""
|
|
8
8
|
|
|
9
|
-
def __init__(self, host: str = "
|
|
10
|
-
"""Initialize server."""
|
|
9
|
+
def __init__(self, host: str = "127.0.0.1", port: int = 8003):
|
|
10
|
+
"""Initialize server (defaults to loopback 127.0.0.1)."""
|
|
11
11
|
self.host = host
|
|
12
12
|
self.port = port
|
|
13
13
|
self.documents: dict[str, dict[str, Any]] = {}
|
|
@@ -188,8 +188,8 @@ def create_flask_app(server: Optional[StreamPDFServer] = None):
|
|
|
188
188
|
return app
|
|
189
189
|
|
|
190
190
|
|
|
191
|
-
def run_server(host: str = "
|
|
192
|
-
"""Run the REST API server."""
|
|
191
|
+
def run_server(host: str = "127.0.0.1", port: int = 8003):
|
|
192
|
+
"""Run the REST API server (defaults to loopback 127.0.0.1)."""
|
|
193
193
|
app = create_flask_app()
|
|
194
194
|
app.run(host=host, port=port, debug=False)
|
|
195
195
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/code_intelligence.py
RENAMED
|
File without changes
|
{pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/json_intelligence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pystreampdf-2.3.1 → pystreampdf-2.3.2}/python/pystreampdf/intelligence/yaml_intelligence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|