Created CompanyAnalyzer class that orchestrates the complete pipeline:
1. Retrieves patents via SERP API
2. Downloads and parses PDFs
3. Minimizes content (removes bloat)
4. Analyzes portfolio with LLM
5. Returns performance estimation
Features:
- Full company portfolio analysis
- Single patent analysis support
- Robust error handling (continues on partial failures)
- Progress logging for user visibility
Updated main.py with clean example usage demonstrating the high-level API.
Added comprehensive test suite (7 tests) covering:
- Full pipeline integration
- Error handling at each stage
- Single patent analysis
- Edge cases (no patents, all failures)
All 26 tests passing.
This completes the core functionality for patent-based company
performance estimation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
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>