Commit Graph

16 Commits

Author SHA1 Message Date
d7cf80f02f feat: add LLM integration for patent analysis
Implemented LLMAnalyzer class using Anthropic's Claude API for:
- Single patent content analysis
- Portfolio-wide analysis across multiple patents
- Configurable API key management via environment variables

Key features:
- Uses Claude 3.5 Sonnet for high-quality analysis
- Structured prompts for innovation assessment
- Token limits optimized per use case (1024 for single, 2048 for portfolio)
- Analyzes: innovation quality, market potential, strategic direction

Updated config.py to support ANTHROPIC_API_KEY environment variable.

Added comprehensive test suite (6 tests) covering:
- Initialization from config and direct API key
- Single patent analysis
- Portfolio analysis
- Token limit validation

All 19 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:55:35 -05:00
26a23c02ae feat: add patent content minimization for LLM consumption
Implemented minimize_patent_for_llm() function that reduces patent
content by keeping only essential sections (abstract, claims, summary)
and explicitly excludes the verbose detailed description section.

This reduces token usage while preserving core innovation details
needed for company performance estimation.

Added comprehensive test coverage (5 new tests) for:
- Essential section inclusion
- Description section exclusion
- Missing section handling
- Empty section handling
- Section separator formatting

All 13 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:54:07 -05:00
6533cef56f test: add pytest framework and initial test suite
Added pytest and pytest-mock to requirements.txt for testing infrastructure.

Created tests/ directory with comprehensive test coverage for:
- Text cleaning functions (figure references, whitespace, line numbers)
- Section extraction logic (abstract, claims, case sensitivity)

All 8 tests passing. This provides a foundation for test-driven
development as we continue building the LLM integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:52:54 -05:00
58f2bdc238 refactor: remove duplicate patent_api.py module
Removed SPARC/patent_api.py as it contained duplicate implementations
of parse_patent_pdf, extract_section, and clean_patent_text functions
that are already present in SPARC/serp_api.py as static methods.

The serp_api.py implementation is actively used in main.py, while
patent_api.py was unused legacy code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:49:31 -05:00
607cc9e1d5 docs: updated documentation about possible not needing google patent API 2025-12-08 19:39:11 -05:00
5fa5588571 chore: removed patents 2025-12-08 19:34:14 -05:00
63a9889e5b feat: patent retrival and semi-processed 2025-12-08 19:33:02 -05:00
b51f0596a3 chore: more changes to flake.nix 2025-12-06 17:41:59 -05:00
93981986d8 feat: nix flake 2025-12-06 17:33:44 -05:00
5569f20b8b refactor: dataclasses are now defined as types in types.py 2025-11-27 19:22:43 -05:00
f9066279af chore: removable text 2025-11-23 23:07:38 +00:00
180a145c6c chore: added git ignore 2025-11-15 22:14:55 -05:00
7a9a2a967f fix: removed pycache from git 2025-11-15 22:14:29 -05:00
8ca435a78a chore: include local files 2025-11-15 22:13:31 -05:00
60a2b82510 docs: roadmap identified 2025-11-04 13:43:52 -05:00
a2235bab28 Initial commit 2025-11-02 23:37:33 +00:00