{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "8a13cfae", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5837401d683f4cda99521aaad9baa6f6", "version_major": 2, "version_minor": 0 }, "text/plain": [ "sermons: 0%| | 0/46 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "/Volumes/MM/autoThread_old/churches/._all-souls_org.json 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte\n", "45 files\n" ] } ], "source": [ "from tqdm.notebook import tqdm\n", "from pathlib import Path\n", "import json\n", "import pandas as pd\n", "\n", "\n", "source = Path('/Volumes/MM/autoThread_old/churches/')\n", "data = []\n", "folder = Path(source).glob('*.json')\n", "for _file in tqdm(folder, total=len(list(Path(source).glob('*.json'))), desc='sermons'):\n", " try:\n", " with open(_file, 'r') as f:\n", " docs = json.load(f) # {MP3file : {\"text\" ... }}\n", " except Exception as e:\n", " print(_file, e)\n", " continue\n", " church = _file.stem\n", " updocs = {}\n", " for k,v in docs.items():\n", " v['church'] = church\n", " updocs[k] = v\n", " data.append( updocs )\n", "print(len(data), 'files')" ] }, { "cell_type": "code", "execution_count": 2, "id": "705968c8", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | church | \n", "source | \n", "text | \n", "sentences | \n", "processing_time | \n", "transcription_errors | \n", "duration(s) | \n", "
---|---|---|---|---|---|---|---|
1.1 | \n", "all-souls_org | \n", "04.02.22ILeftMyHeartInSF.mp3 | \n", "Our reading this morning. Is from the same scr... | \n", "177 | \n", "327.6 | \n", "26 | \n", "1528.2 | \n", "
1.2 | \n", "all-souls_org | \n", "04.02.15AfraidOfTheDark.mp3 | \n", "Mornings readings are. 2 and brief. The first ... | \n", "123 | \n", "139.6 | \n", "6 | \n", "697.2 | \n", "
1.3 | \n", "all-souls_org | \n", "03.01.26AwesomeMeetsTheFamiliar.mp3 | \n", "It is a great joy and privilege for me to be h... | \n", "269 | \n", "323.8 | \n", "5 | \n", "1443.6 | \n", "
1.4 | \n", "all-souls_org | \n", "04.02.11WhatGoodIsGod.mp3 | \n", "I've told many of you how excited i am to have... | \n", "125 | \n", "367.6 | \n", "3 | \n", "1387.1 | \n", "
1.5 | \n", "all-souls_org | \n", "04.02.29ConspiracyAgainstVu.mp3 | \n", "Some of you may have thought that. Service wou... | \n", "198 | \n", "280.8 | \n", "7 | \n", "1248.1 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
45.470 | \n", "uufvb_org | \n", "2012Mar18Sermon32.mp3 | \n", "30 years old. Person. Usefulness. By the time ... | \n", "302 | \n", "209.8 | \n", "4 | \n", "913.2 | \n", "
45.471 | \n", "uufvb_org | \n", "2015Feb22Sermon128.mp3 | \n", "Good morning everyone is glad to be 80° today ... | \n", "632 | \n", "450.8 | \n", "20 | \n", "1885.9 | \n", "
45.472 | \n", "uufvb_org | \n", "2011Jul24Sermon32.mp3 | \n", "4 years ago. As my partner charlie and i were ... | \n", "405 | \n", "295.8 | \n", "5 | \n", "1386.5 | \n", "
45.473 | \n", "uufvb_org | \n", "2015Feb15Sermon32.mp3 | \n", "Good morning. Welcome to the unitarian univers... | \n", "472 | \n", "345.6 | \n", "18 | \n", "1592.7 | \n", "
45.474 | \n", "uufvb_org | \n", "2010Dec12Sermon128.mp3 | \n", "I shared the words of bill mckibben with joyce... | \n", "463 | \n", "225.5 | \n", "411 | \n", "1339.5 | \n", "
6900 rows × 7 columns
\n", "