Skip to content

Commit 23ae346

Browse files
committed
new file: .DS_Store
modified: README.md modified: docs/index.html new file: docs/playground-screenshot.png modified: target/jacoco.exec modified: target/site/jacoco/jacoco-sessions.html modified: target/site/jacoco/jacoco.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$EmailTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$IBANTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$IPTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$PasswordTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$PhoneTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$SSNTests.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.MLDetectorTest.xml modified: target/surefire-reports/TEST-com.semanticprivacyguard.SemanticPrivacyGuardTest.xml modified: target/surefire-reports/com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests.txt modified: target/surefire-reports/com.semanticprivacyguard.HeuristicDetectorTest$IPTests.txt modified: target/surefire-reports/com.semanticprivacyguard.HeuristicDetectorTest.txt modified: target/surefire-reports/com.semanticprivacyguard.MLDetectorTest.txt modified: target/surefire-reports/com.semanticprivacyguard.SemanticPrivacyGuardTest.txt
1 parent b6ae741 commit 23ae346

23 files changed

+93
-84
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ A naive regex fires on every title-cased word. SPG's Naive Bayes context classif
4545

4646
---
4747

48+
## Playground Screenshot
49+
50+
[![Semantic Privacy Guard Playground](docs/playground-screenshot.png)](https://sushegaad.github.io/Semantic-Privacy-Guard/docs/index.html)
51+
52+
*The live playground detecting an SSN and an email address in real time — redacted output, detection table with confidence bars, and reverse map all visible.*
53+
54+
---
55+
4856
## Quick Start
4957

5058
### Maven

docs/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,9 @@ <h1>AI Privacy <em>Firewall</em> for Java</h1>
365365
</div>
366366
</div>
367367

368-
<textarea id="input"
369-
placeholder="Paste any text here and press Ctrl+Enter or click Redact…
370-
371-
Example: Please email Alice at alice@example.com or call (555) 867-5309.
372-
Her SSN is 123-45-6789 and card 4532 0151 1283 0366."></textarea>
368+
<textarea id="input">Liverpool are the champions of England; PSG are the champions of Europe; and Chelsea are the champions of the world!
369+
199-84-9876
370+
someone.naik@gmail.com</textarea>
373371

374372
<div class="controls">
375373
<label for="mode">Mode:</label>
@@ -465,8 +463,8 @@ <h2>How It Works</h2>
465463
<footer>
466464
Semantic Privacy Guard v1.0.0 · Apache 2.0 ·
467465
<a href="https://github.com/Sushegaad/Semantic-Privacy-Guard" target="_blank">GitHub</a> ·
468-
<a href="https://sushegaad.github.io/Semantic-Privacy-Guard/docs/index.htmlregex-design.md" target="_blank">Regex Design</a> ·
469-
<a href="https://sushegaad.github.io/Semantic-Privacy-Guard/docs/index.htmlbenchmarks.md" target="_blank">Benchmarks</a> ·
466+
<a href="https://github.com/Sushegaad/Semantic-Privacy-Guard/blob/main/docs/regex-design.md" target="_blank">Regex Design</a> ·
467+
<a href="https://github.com/Sushegaad/Semantic-Privacy-Guard/blob/main/docs/benchmarks.md" target="_blank">Benchmarks</a> ·
470468
<a href="https://github.com/Sushegaad/Semantic-Privacy-Guard/blob/main/SECURITY.md" target="_blank">Security Policy</a>
471469
<br><small style="margin-top:.4rem;display:block">
472470
⚠️ This playground runs entirely in your browser — no text is ever transmitted to any server.
@@ -884,6 +882,9 @@ <h2>How It Works</h2>
884882
document.getElementById('input').addEventListener('keydown', e => {
885883
if (e.key === 'Enter' && e.ctrlKey) { e.preventDefault(); runRedact(); }
886884
});
885+
886+
// Auto-run on page load so the default text is already processed
887+
window.addEventListener('DOMContentLoaded', () => runRedact());
887888
</script>
888889
</body>
889890
</html>

docs/playground-screenshot.png

332 KB
Loading

target/jacoco.exec

28.3 KB
Binary file not shown.

target/site/jacoco/jacoco-sessions.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

target/site/jacoco/jacoco.xml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.003" tests="3" errors="0" skipped="0" failures="0">
2+
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.002" tests="3" errors="0" skipped="0" failures="0">
33
<properties>
44
<property name="java.specification.version" value="25"/>
55
<property name="sun.jnu.encoding" value="UTF-8"/>
@@ -12,7 +12,7 @@
1212
<property name="sun.java.launcher" value="SUN_STANDARD"/>
1313
<property name="user.country" value="US"/>
1414
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home/lib"/>
15-
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-34-22_848-jvmRun1 surefire-20260303193422877_1tmp surefire_0-20260303193422877_2tmp"/>
15+
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-45-41_257-jvmRun1 surefire-20260303194541287_1tmp surefire_0-20260303194541287_2tmp"/>
1616
<property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
1717
<property name="jdk.debug" value="release"/>
1818
<property name="surefire.test.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/test-classes:/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/classes:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter/5.10.2/junit-jupiter-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar:/Users/varsha/.m2/repository/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.jar:/Users/varsha/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.jar:"/>
@@ -24,12 +24,12 @@
2424
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home"/>
2525
<property name="file.separator" value="/"/>
2626
<property name="basedir" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard"/>
27-
<property name="java.vm.compressedOopsMode" value="Non-zero disjoint base"/>
27+
<property name="java.vm.compressedOopsMode" value="Non-zero based"/>
2828
<property name="line.separator" value="&#10;"/>
2929
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
3030
<property name="java.specification.name" value="Java Platform API Specification"/>
3131
<property name="apple.awt.application.name" value="ForkedBooter"/>
32-
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar"/>
32+
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar"/>
3333
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
3434
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
3535
<property name="java.runtime.version" value="25.0.2+10-LTS"/>
@@ -59,7 +59,7 @@
5959
<property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
6060
<property name="java.class.version" value="69.0"/>
6161
</properties>
62-
<testcase name="detectsAwsKey" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.001"/>
63-
<testcase name="detectsGitHubToken" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.001"/>
64-
<testcase name="detectsOpenAIKey" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.001"/>
62+
<testcase name="detectsAwsKey" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.0"/>
63+
<testcase name="detectsGitHubToken" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.0"/>
64+
<testcase name="detectsOpenAIKey" classname="com.semanticprivacyguard.HeuristicDetectorTest$ApiKeyTests" time="0.0"/>
6565
</testsuite>

target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<property name="sun.java.launcher" value="SUN_STANDARD"/>
1313
<property name="user.country" value="US"/>
1414
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home/lib"/>
15-
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-34-22_848-jvmRun1 surefire-20260303193422877_1tmp surefire_0-20260303193422877_2tmp"/>
15+
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-45-41_257-jvmRun1 surefire-20260303194541287_1tmp surefire_0-20260303194541287_2tmp"/>
1616
<property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
1717
<property name="jdk.debug" value="release"/>
1818
<property name="surefire.test.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/test-classes:/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/classes:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter/5.10.2/junit-jupiter-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar:/Users/varsha/.m2/repository/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.jar:/Users/varsha/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.jar:"/>
@@ -24,12 +24,12 @@
2424
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home"/>
2525
<property name="file.separator" value="/"/>
2626
<property name="basedir" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard"/>
27-
<property name="java.vm.compressedOopsMode" value="Non-zero disjoint base"/>
27+
<property name="java.vm.compressedOopsMode" value="Non-zero based"/>
2828
<property name="line.separator" value="&#10;"/>
2929
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
3030
<property name="java.specification.name" value="Java Platform API Specification"/>
3131
<property name="apple.awt.application.name" value="ForkedBooter"/>
32-
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar"/>
32+
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar"/>
3333
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
3434
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
3535
<property name="java.runtime.version" value="25.0.2+10-LTS"/>
@@ -59,7 +59,7 @@
5959
<property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
6060
<property name="java.class.version" value="69.0"/>
6161
</properties>
62-
<testcase name="detectsVisaCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.001"/>
63-
<testcase name="rejectsLuhnFailCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.0"/>
64-
<testcase name="detectsSpaceSeparatedCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.001"/>
62+
<testcase name="detectsVisaCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.0"/>
63+
<testcase name="rejectsLuhnFailCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.001"/>
64+
<testcase name="detectsSpaceSeparatedCard" classname="com.semanticprivacyguard.HeuristicDetectorTest$CreditCardTests" time="0.0"/>
6565
</testsuite>

target/surefire-reports/TEST-com.semanticprivacyguard.HeuristicDetectorTest$EmailTests.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<property name="sun.java.launcher" value="SUN_STANDARD"/>
1313
<property name="user.country" value="US"/>
1414
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home/lib"/>
15-
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-34-22_848-jvmRun1 surefire-20260303193422877_1tmp surefire_0-20260303193422877_2tmp"/>
15+
<property name="sun.java.command" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar /Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire 2026-03-03T19-45-41_257-jvmRun1 surefire-20260303194541287_1tmp surefire_0-20260303194541287_2tmp"/>
1616
<property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
1717
<property name="jdk.debug" value="release"/>
1818
<property name="surefire.test.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/test-classes:/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/classes:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter/5.10.2/junit-jupiter-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar:/Users/varsha/.m2/repository/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-commons/1.10.2/junit-platform-commons-1.10.2.jar:/Users/varsha/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar:/Users/varsha/.m2/repository/org/junit/platform/junit-platform-engine/1.10.2/junit-platform-engine-1.10.2.jar:"/>
@@ -24,12 +24,12 @@
2424
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home"/>
2525
<property name="file.separator" value="/"/>
2626
<property name="basedir" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard"/>
27-
<property name="java.vm.compressedOopsMode" value="Non-zero disjoint base"/>
27+
<property name="java.vm.compressedOopsMode" value="Non-zero based"/>
2828
<property name="line.separator" value="&#10;"/>
2929
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
3030
<property name="java.specification.name" value="Java Platform API Specification"/>
3131
<property name="apple.awt.application.name" value="ForkedBooter"/>
32-
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303193422877_3.jar"/>
32+
<property name="surefire.real.class.path" value="/Users/varsha/GitHub-Repository-Destination/Semantic-Privacy-Guard/Semantic-Privacy-Guard/target/surefire/surefirebooter-20260303194541287_3.jar"/>
3333
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
3434
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
3535
<property name="java.runtime.version" value="25.0.2+10-LTS"/>
@@ -63,6 +63,6 @@
6363
<testcase name="detectsEmails(String)[2]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.0"/>
6464
<testcase name="detectsEmails(String)[3]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.0"/>
6565
<testcase name="rejectsNonEmails(String)[1]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.0"/>
66-
<testcase name="rejectsNonEmails(String)[2]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.0"/>
67-
<testcase name="rejectsNonEmails(String)[3]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.0"/>
66+
<testcase name="rejectsNonEmails(String)[2]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.001"/>
67+
<testcase name="rejectsNonEmails(String)[3]" classname="com.semanticprivacyguard.HeuristicDetectorTest$EmailTests" time="0.001"/>
6868
</testsuite>

0 commit comments

Comments
 (0)