Skip to content

Conversation

@brainless
Copy link
Member

No description provided.

brainless and others added 5 commits July 9, 2025 07:45
…n patterns

- Add TemplateDetector to identify patterns like "42 comments", "16 hours ago"
- Support number and float variables with contextual naming (count, time, value)
- Add CLI --template flag to enable template mode in HTML tree output
- Integrate template detection into HTML node processing
- Replace detected patterns with template syntax (e.g., "{count} comments")
- Add comprehensive tests for social media, time, and count patterns
- Support case-insensitive matching and whitespace handling

This addresses issue #62 by providing template pattern detection for dynamic content
in web pages, helping identify common UI patterns and variable structures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Move template detection to Phase 2.5 (before duplicate analysis)
- Apply templates to HTML content when --template flag is enabled
- This allows nodes like "42 comments" and "16 comments" to be properly
  identified as duplicates after template conversion to "{count} comments"
- Add apply_template_detection_to_storage() and apply_template_to_node() functions
- Add comprehensive test for template-based duplicate detection
- Simplify HTML tree printing since templates are now applied to content

This improves duplicate detection accuracy by recognizing semantic patterns
rather than just literal content matches.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Skip domain duplicate analysis entirely when --template flag is enabled
- Show "HTML Tree with Template Patterns" instead of filtered duplicates
- Add comprehensive test for template mode without duplicate filtering
- Resolves issue where template patterns were hidden as [FILTERED DUPLICATE]

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Apply automatic code formatting to ensure consistent style
- No functional changes, only formatting adjustments

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Update format strings to use inline format arguments
- Fix 5 clippy warnings related to uninlined_format_args
- All tests continue to pass

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

Co-Authored-By: Claude <noreply@anthropic.com>
@brainless brainless merged commit 48ebf62 into main Jul 9, 2025
1 check passed
@brainless brainless deleted the feature/template-detection branch July 9, 2025 03:08
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