diff --git a/FLUJOS_DATOS/DOCS/extraer_info_bbdd.txt b/FLUJOS_DATOS/DOCS/extraer_info_bbdd.txt new file mode 100644 index 00000000..280f2d05 --- /dev/null +++ b/FLUJOS_DATOS/DOCS/extraer_info_bbdd.txt @@ -0,0 +1,172 @@ +================================================================================ + EXTRAER INFO DE LA BASE DE DATOS — ESTADO DE DATOS FLUJOS_DATOS + Fecha: 2026-04-01 +================================================================================ + + Este documento recoge el estado actual de los datos del proyecto FLUJOS, + tanto en disco como en MongoDB, y los comandos necesarios para replicar + esta extracción en cualquier momento futuro. + + +================================================================================ + 1. ESTADO DE MONGODB (base de datos: FLUJOS_DATOS) +================================================================================ + + +------------------+----------------+------------------------------------------+ + | Colección | Documentos | Campos | + +------------------+----------------+------------------------------------------+ + | comparaciones | 52.568.835 | noticia1, noticia2, porcentaje_similitud | + | wikipedia | 25.448 | archivo, tema, subtema, fecha, texto | + +------------------+----------------+------------------------------------------+ + + NOTA: NOTICIAS y WikiLeaks/Torrents NO están en MongoDB todavía. + Solo existen como ficheros en disco. + + +================================================================================ + 2. ESTADO EN DISCO — ARCHIVOS FÍSICOS +================================================================================ + + NOTICIAS + +-------------------------------+-------------------------------+-----------+---------+ + | Sección | Directorio | Archivos | Tamaño | + +-------------------------------+-------------------------------+-----------+---------+ + | Artículos (txt scrapeados) | NOTICIAS/articulos/ | 41.467 | | + | Archivos raw (PDF, HTML...) | NOTICIAS/archivos/ | 1.870 | | + | TOTAL NOTICIAS | | 43.337 | 1.9 GB | + +-------------------------------+-------------------------------+-----------+---------+ + + WIKIPEDIA + +-------------------------------+--------------------------------------+-----------+---------+ + | Sección | Directorio | Archivos | Tamaño | + +-------------------------------+--------------------------------------+-----------+---------+ + | Artículos Wikipedia | WIKIPEDIA/articulos_wikipedia/ | 25.448 | | + | Artículos tokenizados | WIKIPEDIA/articulos_tokenizados/ | 25.448 | | + | TOTAL WIKIPEDIA | (25.448 artículos + sus tokens) | 50.896 | 611 MB | + +-------------------------------+--------------------------------------+-----------+---------+ + + TORRENTS / WIKILEAKS + +-------------------------------+------------------------------------------+-----------+---------+ + | Sección | Directorio | Archivos | Tamaño | + +-------------------------------+------------------------------------------+-----------+---------+ + | Textos extraídos | TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/txt/| 36.183 | | + | Tokenizados | TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/ | | | + | | tokenized/ | 36.183 | | + | TOTAL TORRENTS | | 72.370 | 1.1 GB | + +-------------------------------+------------------------------------------+-----------+---------+ + + MongoDB (datos físicos en disco) + +-------------------------------+-----------+ + | Directorio MONGO/ | Tamaño | + +-------------------------------+-----------+ + | MONGO/ | 3.2 GB | + +-------------------------------+-----------+ + + +================================================================================ + 3. COMPARACIONES — AVANCE DEL PROCESADO +================================================================================ + + Las 52.5M comparaciones corresponden a artículos WIKIPEDIA cruzados entre sí + (los nombres en la colección son del tipo "ISO_IEC 27032.txt", + "Auditorio _Benito Juárez_.txt", etc.). + + Estimación matemática usando N*(N-1)/2 = total_comparaciones: + sqrt(2 * 52.568.835) ≈ 10.254 artículos ya cruzados entre sí + + +---------------------------+-----------+-----------+-----------+ + | | Wikipedia | NOTICIAS | WikiLeaks | + +---------------------------+-----------+-----------+-----------+ + | Archivos en disco | 25.448 | 43.337 | 36.183 | + | Cargados en MongoDB | 25.448 ✓ | 0 ✗ | 0 ✗ | + | Artículos comparados | ~10.254 | - | - | + | % comparado | ~40% | - | - | + | Artículos pendientes | ~15.194 | - | - | + | Pares pendientes aprox. | ~115M | - | - | + +---------------------------+-----------+-----------+-----------+ + + +================================================================================ + 4. COMANDOS UTILIZADOS PARA EXTRAER ESTA INFORMACIÓN +================================================================================ + + --- Ver variable de entorno y configuración MongoDB --- + + cat /var/www/theflows.net/flujos/.env + + + --- Listar colecciones en MongoDB --- + + mongosh --quiet FLUJOS_DATOS --eval "db.getCollectionNames()" + + + --- Contar documentos por colección --- + + mongosh --quiet FLUJOS_DATOS --eval " + db.getCollectionNames().forEach(col => { + print(col + ': ' + db[col].countDocuments() + ' docs'); + })" + + + --- Ver colecciones con campos y conteo --- + + mongosh --quiet FLUJOS_DATOS --eval " + db.getCollectionNames().forEach(col => { + var count = db[col].countDocuments(); + var sample = db[col].findOne(); + var keys = sample ? Object.keys(sample).join(', ') : 'empty'; + print(col + ': ' + count + ' docs | fields: ' + keys); + })" + + + --- Ver un documento de muestra de comparaciones --- + + mongosh --quiet FLUJOS_DATOS --eval " + var s = db.comparaciones.findOne(); + print(JSON.stringify(s, null, 2));" + + + --- Contar archivos en disco por sección --- + + # NOTICIAS artículos + find /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/articulos/ -type f | wc -l + + # NOTICIAS archivos raw + find /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/archivos/ -type f | wc -l + + # WIKIPEDIA artículos + find /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/articulos_wikipedia/ -type f | wc -l + + # WIKIPEDIA tokenizados + find /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/articulos_tokenizados/ -type f | wc -l + + # TORRENTS total + find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/ -type f | wc -l + + # WikiLeaks txt + find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/txt/ -type f | wc -l + + # WikiLeaks tokenizados + find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/tokenized/ -type f | wc -l + + + --- Tamaño en disco por sección --- + + du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/ + du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/ + du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/ + du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/MONGO/ + + + --- Estimación de artículos únicos comparados (cálculo matemático) --- + + mongosh --quiet FLUJOS_DATOS --eval " + var total = db.comparaciones.countDocuments(); + var approxN = Math.round(Math.sqrt(2 * total)); + print('Total comparaciones: ' + total); + print('Artículos únicos comparados (estimación): ' + approxN);" + + +================================================================================ + FIN DEL DOCUMENTO +================================================================================ diff --git a/BACK_BACK/FLUJOS_APP_PRUEBAS.js b/POCS/BACK_BACK/FLUJOS_APP_PRUEBAS.js similarity index 100% rename from BACK_BACK/FLUJOS_APP_PRUEBAS.js rename to POCS/BACK_BACK/FLUJOS_APP_PRUEBAS.js diff --git a/BACK_BACK/IMAGENES/.gitignore b/POCS/BACK_BACK/IMAGENES/.gitignore similarity index 100% rename from BACK_BACK/IMAGENES/.gitignore rename to POCS/BACK_BACK/IMAGENES/.gitignore diff --git a/BACK_BACK/IMAGENES/debug_wiki.py b/POCS/BACK_BACK/IMAGENES/debug_wiki.py similarity index 100% rename from BACK_BACK/IMAGENES/debug_wiki.py rename to POCS/BACK_BACK/IMAGENES/debug_wiki.py diff --git a/BACK_BACK/IMAGENES/image_analyzer.py b/POCS/BACK_BACK/IMAGENES/image_analyzer.py similarity index 100% rename from BACK_BACK/IMAGENES/image_analyzer.py rename to POCS/BACK_BACK/IMAGENES/image_analyzer.py diff --git a/BACK_BACK/IMAGENES/image_comparator.py b/POCS/BACK_BACK/IMAGENES/image_comparator.py similarity index 100% rename from BACK_BACK/IMAGENES/image_comparator.py rename to POCS/BACK_BACK/IMAGENES/image_comparator.py diff --git a/BACK_BACK/IMAGENES/mongo_helper.py b/POCS/BACK_BACK/IMAGENES/mongo_helper.py similarity index 100% rename from BACK_BACK/IMAGENES/mongo_helper.py rename to POCS/BACK_BACK/IMAGENES/mongo_helper.py diff --git a/BACK_BACK/IMAGENES/pipeline_pruebas.py b/POCS/BACK_BACK/IMAGENES/pipeline_pruebas.py similarity index 100% rename from BACK_BACK/IMAGENES/pipeline_pruebas.py rename to POCS/BACK_BACK/IMAGENES/pipeline_pruebas.py diff --git a/BACK_BACK/IMAGENES/requirements_imagenes.txt b/POCS/BACK_BACK/IMAGENES/requirements_imagenes.txt similarity index 100% rename from BACK_BACK/IMAGENES/requirements_imagenes.txt rename to POCS/BACK_BACK/IMAGENES/requirements_imagenes.txt diff --git a/BACK_BACK/IMAGENES/wikipedia_image_scraper.py b/POCS/BACK_BACK/IMAGENES/wikipedia_image_scraper.py similarity index 100% rename from BACK_BACK/IMAGENES/wikipedia_image_scraper.py rename to POCS/BACK_BACK/IMAGENES/wikipedia_image_scraper.py diff --git a/VISUALIZACION/public/demos/demo_img_nodes.html b/POCS/VISUALIZACION/public/demos/demo_img_nodes.html similarity index 100% rename from VISUALIZACION/public/demos/demo_img_nodes.html rename to POCS/VISUALIZACION/public/demos/demo_img_nodes.html diff --git a/VISUALIZACION/public/demos/demo_mixed_nodes.html b/POCS/VISUALIZACION/public/demos/demo_mixed_nodes.html similarity index 100% rename from VISUALIZACION/public/demos/demo_mixed_nodes.html rename to POCS/VISUALIZACION/public/demos/demo_mixed_nodes.html diff --git a/VISUALIZACION/public/demos/demo_text_nodes.html b/POCS/VISUALIZACION/public/demos/demo_text_nodes.html similarity index 100% rename from VISUALIZACION/public/demos/demo_text_nodes.html rename to POCS/VISUALIZACION/public/demos/demo_text_nodes.html diff --git a/VISUALIZACION/public/demos/demo_wiki_images.html b/POCS/VISUALIZACION/public/demos/demo_wiki_images.html similarity index 100% rename from VISUALIZACION/public/demos/demo_wiki_images.html rename to POCS/VISUALIZACION/public/demos/demo_wiki_images.html diff --git a/VISUALIZACION/public/images/wiki/.gitignore b/POCS/VISUALIZACION/public/images/wiki/.gitignore similarity index 100% rename from VISUALIZACION/public/images/wiki/.gitignore rename to POCS/VISUALIZACION/public/images/wiki/.gitignore