pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/aboutcode-org/scancode-toolkit/pull/4763

t" href="https://github.githubassets.com/assets/code-bedb41adf21fe337.css" /> Add patent scan plugin with CLI support and extended detection tests by dikshaa2909 · Pull Request #4763 · aboutcode-org/scancode-toolkit · GitHub
Skip to content

Add patent scan plugin with CLI support and extended detection tests#4763

Open
dikshaa2909 wants to merge 2 commits intoaboutcode-org:developfrom
dikshaa2909:feature/patent-detection-4510
Open

Add patent scan plugin with CLI support and extended detection tests#4763
dikshaa2909 wants to merge 2 commits intoaboutcode-org:developfrom
dikshaa2909:feature/patent-detection-4510

Conversation

@dikshaa2909
Copy link

Fixes #4510

Summary

This PR adds a new Patent Scan Plugin to detect patent references and patent numbers in scanned files.

The implementation follows existing ScanCode plugin architecture and integrates with the CLI, API, and JSON output.


Features

  • New CLI flag: --patent
  • Threshold option: --max-patent (default: 50, 0 for no limit)
  • Detection of:
    • Patent numbers (US, EP, WO, JP, CN, KR, GB, IN)
    • Formats like:
      • US Patent 8,123,456 B2
      • US20190012345A1
      • EP1234567B1
      • WO 2019/123456
    • Patent keywords:
      • patent pending
      • patented
      • patent application
      • patent number
  • Word-boundary checks to avoid false positives (e.g., unpatented)
  • Deduplication and threshold enforcement
  • Structured output under patent_detections

Implementation

  • Detection logic: src/cluecode/patents.py
  • CLI plugin: src/cluecode/plugin_patent.py
  • API integration: get_patents() in scancode.api
  • Registered via setup.cfg

Tests

Added tests covering:

  • Basic detection
  • International formats
  • Keyword detection
  • No false positives
  • Threshold behavior

Tests pass locally and in Docker.


Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled and linked to issue
  • Tests pass locally
  • Feature branch used
  • Updated documentation (if required)
  • Updated CHANGELOG (if required)

Signed-off-by: dikshaa2909 dikshadeware@gmail.com

Signed-off-by: dikshaa2909 <dikshadeware@gmail.com>
Signed-off-by: dikshaa2909 <dikshadeware@gmail.com>
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.

Also detect possible patent issues or references

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy