MCPcopy Create free account
hub / github.com/LCBOWER33/StegoScan / is_meaningful_text

Function is_meaningful_text

StegoScan.py:698–703  ·  view source on GitHub ↗

Check if extracted text is meaningful (not gibberish).

(text)

Source from the content-addressed store, hash-verified

696
697
698def is_meaningful_text(text):
699 """Check if extracted text is meaningful (not gibberish)."""
700 if not text or len(text) < 2: # Ignore empty or single-character text
701 return False
702 # Allow only words with letters, numbers, or common symbols
703 return bool(re.search(r"[a-zA-Z0-9]", text))
704
705
706def extract_text(image, processor, model):

Callers 1

extract_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected