updated ocr viewer, built and tested ai workflows and OCR.
Built out use cases Built out googledocumentOCR and a semantic search webpage
This commit is contained in:
24
check_db.py
Normal file
24
check_db.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import sys
|
||||
sys.path.insert(0, 'GoogleDocumentOCR')
|
||||
from db import get_conn
|
||||
|
||||
conn = get_conn()
|
||||
cur = conn.cursor()
|
||||
|
||||
cur.execute("""
|
||||
SELECT nationality, corpus, chunk_type, COUNT(*)
|
||||
FROM document_chunks
|
||||
GROUP BY nationality, corpus, chunk_type
|
||||
ORDER BY nationality, corpus, chunk_type
|
||||
""")
|
||||
print(f"{'Nationality':<12} {'Corpus':<26} {'Type':<14} {'Count':>6}")
|
||||
print("-" * 64)
|
||||
for nat, corpus, ctype, count in cur.fetchall():
|
||||
print(f"{nat:<12} {corpus:<26} {ctype:<14} {count:>6}")
|
||||
|
||||
cur.execute("SELECT COUNT(*) FROM document_chunks")
|
||||
print(f"\nTOTAL: {cur.fetchone()[0]} chunks")
|
||||
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
Reference in New Issue
Block a user