8000 feat(analysis): places and dates from anytopdf as hints for the graph by adeelahmad · Pull Request #229 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(analysis): places and dates from anytopdf as hints for the graph - #229

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-kgtpxt
Oct 7, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-kgtpxt

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: Lens's rules extractor found "Berlin" only as a term, gave dates no value, and knew nothing about where a photo was taken.

After: with Settings › Analysis › Find places and dates with anytopdf on (analysis.anytopdf, off by default), analysis asks anytopdf, run here offline with no plugins, for:

  • the places a recording's text names (anytopdf's offline GeoNames gazetteer), unsure ones (confidence < 0.5) left out;
  • the dates and times it gives, with their ISO value when the text pins one down;
  • where a photo was taken: its GPS fix, named offline (needs exiftool beside anytopdf). Read once per file.

They join the extractor's names per line; a bare TERM anytopdf knows becomes a PLACE or DATE; the entity setup still decides what is kept. What was found is kept on the recording as enrichment and shown on the Details tab ("Places and dates") to namespace members only. Visitors, embeds and signed visitor links don't get it. A failing anytopdf never stops analysis.

Motivation and Context

Phase 3 of the anytopdf integration plan (enrichment: location, dates, entity hints). Builds on #221. CLIP photo search follows as its own PR.

How: new enrich.py; anytopdf.graph() runs convert --dump-graph with --no-plugins (0.4.0 has no bundle yet, and the PDF's embedded chunks drop locations); analyze_recording merges the hints; the anytopdf component is fetched for analyze when the switch is on.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project.
  • I added or updated tests (tests/api/test_enrich.py, plus a real-binary test under LENS_TEST_ANYTOPDF, passed locally with 0.4.0 and exiftool).
  • I have updated docs/ accordingly.
  • I wrote it under ## Unreleased in CHANGELOG.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_018GMFApXZSk7XERM3J5gNTy


Generated by Claude Code

Settings › Analysis › Find places and dates with anytopdf (analysis.anytopdf,
off by default). Analysis then asks anytopdf, run here offline with no
plugins, for the places a recording's text names, the dates it gives (with
their ISO value) and where a photo was taken (its GPS fix, named offline).
They join the extractor's names per line, a bare term anytopdf knows as a
place becomes one, and the entity setup still decides what is kept. What was
found is kept on the recording and shown on its Details tab to members only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GMFApXZSk7XERM3J5gNTy
@adeelahmad adeelahmad self-assigned this Oct 7, 2026
…-kgtpxt

# Conflicts:
#	CHANGELOG.md
#	fastapi_backend/app/domain/anytopdf.py
@adeelahmad
adeelahmad merged commit dd04c57 into main Oct 7, 2026
7 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-kgtpxt branch October 7, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0