Repository Analysis

tisfeng/Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.

4.6 Likely human-written View on GitHub
4.6
Adjusted Score
4.6
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,351
Stars
Swift
Language
135,515
Lines of Code
942
Files
602
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 5LOW 596

Pattern Findings

602 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block567 hits · 560 pts
SeverityFileLineSnippet
LOW.swiftlint.yml1#
LOWEasydict/App/AppDelegate.h1//
LOWEasydict/App/entry.h1//
LOWEasydict/App/AppDelegate+EZURLScheme.m1//
LOWEasydict/App/Easydict-Bridging-Header.h1//
LOWEasydict/App/Easydict-Bridging-Header.h21#import "EZOCRResult.h"
LOWEasydict/App/entry.m1//
LOWEasydict/Swift/Model/AppTriggerConfig.swift1//
LOWEasydict/Swift/Model/DetectManager.swift1//
LOWEasydict/Swift/View/TapHandlerView.swift1//
LOW…ingView/Tabs/ServiceConfigurationView/SliderCell.swift1//
LOW…igurationView/ClaudeCodeServiceConfigurationView.swift1//
LOW…t/View/SettingView/Tabs/Model/QueryRecordManager.swift1//
LOWEasydict/Swift/View/Window/HostWindowManager.swift1//
LOW…ature/Shortcut/Model/ShortcutConfictAlertMessage.swift1//
LOW…Feature/Screenshot/Screenshot/NSScreen+Extention.swift1//
LOW…t/Feature/Screenshot/Screencapture/Screencapture.swift1//
LOWEasydict/Swift/Feature/HTTPServer/Vapor/configure.swift1//
LOW…t/Swift/Feature/HTTPServer/Vapor/DictionaryEntry.swift1//
LOWEasydict/Swift/Service/Apple/AppleLanguageMapper.swift61 }
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift1//
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift21/// - Hierarchical post-processing: Chinese/English verification → Mixed content → Short text corrections
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift41///
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift81 /// - Note: These probabilities may be an empty dictionary for certain edge cases
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift341 if text.trimmingCharacters(in: .whitespacesAndNewlines).isNumeric {
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift401 /// - Non-Latin scripts (Chinese, Japanese, Korean, Arabic, Cyrillic, etc.)
LOW…pple/AppleLanguageDetector/AppleLanguageDetector.swift481 /// Handle corrections for short text and obvious misdetections
LOW…ift/Service/Apple/AppleOCREngine/OCRLineAnalyzer.swift1//
LOW…ift/Service/Apple/AppleOCREngine/OCRLineAnalyzer.swift21 // MARK: Lifecycle
LOW…eOCREngine/VNRecognizedTextObservation+Extension.swift1//
LOW…eOCREngine/VNRecognizedTextObservation+Extension.swift161
LOW…wift/Service/Apple/AppleOCREngine/AppleOCREngine.swift1//
LOW…wift/Service/Apple/AppleOCREngine/AppleOCREngine.swift21/// the initial image to delegating the final text processing to `OCRTextProcessor`.
LOW…wift/Service/Apple/AppleOCREngine/AppleOCREngine.swift181 private let textProcessor = OCRTextProcessor()
LOW…wift/Service/Apple/AppleOCREngine/AppleOCREngine.swift401 logInfo(
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift1//
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift41
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift101 // Update metrics language when set
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift121 /// - **Code patterns**: `array.map()` → `〈PROTECTED_4〉`
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift141 /// "〈PROTECTED_1〉": "test@example.com",
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift241 /// Input text: "访问 〈PROTECTED_0〉,邮箱 〈PROTECTED_1〉。价格 $〈PROTECTED_2〉,代码 〈PROTECTED_3〉。"
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift321 ///
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift461 result.replace(western, with: chinese)
LOW…t/Service/Apple/AppleOCREngine/OCRTextNormalizer.swift481 /// 6..<21 (test@example.com - email pattern)
LOW…ft/Service/Apple/AppleOCREngine/OCRSectionMerger.swift1//
LOW…ft/Service/Apple/AppleOCREngine/OCRSectionMerger.swift21class OCRSectionMerger {
LOW…ft/Service/Apple/AppleOCREngine/OCRSectionMerger.swift181 /// a new paragraph, or handle hyphenated words.
LOW…ft/Service/Apple/AppleOCREngine/OCRSectionMerger.swift201 paragraphObservations: paragraphObservations,
LOW…wift/Service/Apple/AppleOCREngine/OCRDashHandler.swift1//
LOW…wift/Service/Apple/AppleOCREngine/OCRDashHandler.swift21///
LOW…t/Service/Apple/AppleOCREngine/OCRPoetryDetector.swift181 if let last = text.last, let scalar = last.unicodeScalars.first {
LOW…Swift/Service/Apple/AppleOCREngine/OCRBandMerger.swift1//
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift1//
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift21/// 1. **Language Detection**: Determines the language of the recognized text.
LOW…ft/Service/Apple/AppleOCREngine/OCRMergeAnalyzer.swift1//
LOW…vice/Apple/AppleOCREngine/Model/OCRMergeStrategy.swift1//
LOW…rvice/Apple/AppleOCREngine/Model/ConfidenceLevel.swift1//
LOW…pple/AppleOCREngine/Model/OCRTextObservationPair.swift1//
LOW…AppleOCREngine/Model/EZRecognizedTextObservation.swift161
LOW…rvice/Apple/AppleOCREngine/Model/IndentationInfo.swift1//
507 more matches not shown…
Verbosity Indicators13 hits · 25 pts
SeverityFileLineSnippet
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift82 // Step 1: Detect and process bands
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift89 // Step 2: Process all bands and sections
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift97 // Step 3: Store results and calculate confidence
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift104 // Step 4: Merge bands and finalize result
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift332 // Step 1: Group observations into horizontal bands
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift336 // Step 2: Analyze each band group to determine its column structure
LOW…ft/Service/Apple/AppleOCREngine/OCRTextProcessor.swift345 // Step 3: Sort each section's observations for reading order
LOWEasydict/Swift/Service/Volcano/VolcanoSigning.swift42 // Step 1: Create a canonical request
LOWEasydict/Swift/Service/Volcano/VolcanoSigning.swift54 // Step 2: Create string to sign
LOWEasydict/Swift/Service/Volcano/VolcanoSigning.swift66 // Step 3: Calculate the signature
LOWEasydict/Swift/Service/Volcano/VolcanoSigning.swift73 // Step 4: Add the signature to the request
LOW…ict/Swift/Utility/ChineseGenre/MetadataExtractor.swift50 // Step 1: Extract formatted text with markers
LOW…ict/Swift/Utility/ChineseGenre/MetadataExtractor.swift53 // Step 2: Extract clean content
Excessive Try-Catch Wrapping4 hits · 10 pts
SeverityFileLineSnippet
MEDIUM…fireworks-tech-graph/scripts/generate-from-template.py1542 print(f"Error: {exc}")
MEDIUM…fireworks-tech-graph/scripts/generate-from-template.py1545 print(f"Error: Invalid JSON: {exc}")
MEDIUM…fireworks-tech-graph/scripts/generate-from-template.py1548 print(f"Error: {exc}")
LOW…fireworks-tech-graph/scripts/generate-from-template.py1550 except Exception as exc: # pragma: no cover
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALPods/Masonry/README.md223make.left.right.and.bottom.equalTo(superview);
Hyper-Verbose Identifiers7 hits · 7 pts
SeverityFileLineSnippet
LOW…/Dictionary/DictionaryRendering/dictionary-result.html109 function calculateSummaryTextWidth(summary) {
LOW…/Dictionary/DictionaryRendering/dictionary-result.html115 function updateDetailsSummaryLineWidth() {
LOW…/Dictionary/DictionaryRendering/dictionary-result.html187 function isNotCustomBackgroundColor(color) {
LOW…/Dictionary/DictionaryRendering/dictionary-result.html255 function updateAllIframeAppleSystemLabelBorderBottomColor(isDark) {
LOW…fireworks-tech-graph/scripts/generate-from-template.py569def render_blueprint_title_block(
LOW…fireworks-tech-graph/scripts/generate-from-template.py1023def label_position_candidates(points: Sequence[Point]) -> List[Point]:
LOW…fireworks-tech-graph/scripts/generate-from-template.py1048def choose_label_position_avoiding(points: Sequence[Point], text: str, occupied: Sequence[Bounds]) -> Point:
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippet
LOW…skills/fireworks-tech-graph/scripts/test-all-styles.sh46 # Check if style reference exists
LOW.github/workflows/star_fork_notification.yml70 # Check if user meets the shared notification criteria for fork/star events.
LOW.github/workflows/star_fork_notification.yml85 # Output result
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM…ct/Swift/Utility/Extensions/String/String+Detect.swift20 /// This approach is robust against mixed content with a few Traditional characters.
Unused Imports3 hits · 3 pts
SeverityFileLineSnippet
LOW…fireworks-tech-graph/scripts/generate-from-template.py13
LOW…fireworks-tech-graph/scripts/generate-from-template.py17
LOW…fireworks-tech-graph/scripts/generate-from-template.py22
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/codeql.yml54 # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
Fake / Example Data1 hit · 2 pts
SeverityFileLineSnippet
LOWEasydictTests/Utility/Regex/RegexTests.swift78 #expect("user@example.com".contains(regex))
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippet
LOW…fireworks-tech-graph/scripts/generate-from-template.py1111