Feature/template detection#63
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.