{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Sujet 5: Analyse des dialogues dans l'Avare de Molière" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "J'ai choisi de partir du format markdown." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "import os\n", "import urllib.request \n", "data_url = \"http://dramacode.github.io/markdown/moliere_avare.txt\"\n", "data_file = \"moliere_avare.txt\"\n", "if not os.path.exists(data_file):\n", " urllib.request.urlretrieve(data_url, data_file)\n", "text=open(data_file,'r')\n", "#text.readlines() " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Je voudrais faire un dataframe contenant pour chaque scène les interventions de chaque personnage. " ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }