Full Code of hsnam95/class2022Spring for AI

main 7aae3bdd62b5 cached
29 files
3.1 MB
807.8k tokens
1 requests
Download .txt
Showing preview only (3,260K chars total). Download the full file or copy to clipboard to get everything.
Repository: hsnam95/class2022Spring
Branch: main
Commit: 7aae3bdd62b5
Files: 29
Total size: 3.1 MB

Directory structure:
gitextract_rqtqd7mb/

├── README.md
├── audio_processing.ipynb
├── bert_train.ipynb
├── crime_punishment.txt
├── function.ipynb
├── gradio_practice.ipynb
├── huggingface_gradio.ipynb
├── image_prorcessing.ipynb
├── import.ipynb
├── introduction.ipynb
├── kogpt_gradio.ipynb
├── nlp.ipynb
├── numpy_matplotlib.ipynb
├── packages.ipynb
├── pandas.ipynb
├── pipeline.ipynb
├── pytorch_hub.ipynb
├── requests_gradio.ipynb
├── requests_gradio_stock.ipynb
├── scikit_learn(machine _learning).ipynb
├── sound.ipynb
├── sound_processing.ipynb
├── speech_processing.ipynb
├── string.ipynb
├── stt_gradio.ipynb
├── syntax.ipynb
├── tensorflow_hub.ipynb
├── tts_gradio.ipynb
└── variables.ipynb

================================================
FILE CONTENTS
================================================

================================================
FILE: README.md
================================================
# class2022Spring 영어음성학응용 (고려대학교 영어영문학과)
## [github repository](https://github.com/hsnam95/class2022Spring)
## [NAMZ channel](https://www.youtube.com/channel/UCKHB0ZiTVk8qUdqhVtnCUrA)


================================================
FILE: audio_processing.ipynb
================================================
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "audio_processing.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyPn7Jm9UKKtoEHz8SEPHpNl",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/hsnam95/class2022Spring/blob/main/audio_processing.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# \bAudio Processing\n",
        "---\n",
        "\n",
        "https://musiclab.chromeexperiments.com/Spectrogram/\n",
        "\n",
        "### Fourier transform (분석용)\n",
        "* spectrum은 주어진 signal에 대해 어떤 주파수 성분이 많이 있나?\n",
        "* spectrogram은 spectrum을 time 축으로 concatenate한 것\n",
        "* 방법: signal (inner product) a series of complex phasors with different frequencies\n",
        "* inner product는 일종의 correlation (즉, 해당 frequency가 얼마나 있는지 probing)\n",
        "* 왜? sine phasor 안 쓰나? phase sensitivity 때문\n",
        "\n",
        "### Filter (변환용)\n",
        "* A --> function -->  B\n",
        "* signal A --> filter --> signal B\n",
        "* 신호 (time function)를 입력으로 하는 함수를 filter라고 함\n",
        "* 왜? filter 라고 부름? 이 함수의 목적이 특정 주파수에 대한 manipulation이므로.\n",
        "(예: 어떤 주파수대를 작게, 크게, 통과, 제거 등)\n",
        "* 방법: weighted sum of signal's shifts (두가지 방법: FIR, IIR)\n",
        "\n",
        "  * FIR: Y(k) = b<sub>1</sub>X(k) + b<sub>2</sub>X(k-1) + ... \n",
        "    - Y = H * X\n",
        "  * IIR: a<sub>1</sub>Y(k) + a<sub>2</sub>Y(k-1) + ... = X(k)\n",
        "    - Y = (1/H) * X\n",
        "\n",
        "### Auto correlation\n",
        "* measuring pitch / F0\n",
        "\n",
        "### RMS: root mean square\n",
        "* measuring intensity"
      ],
      "metadata": {
        "id": "1gsMMEn32yiZ"
      }
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2WAs2J9dWcUv"
      },
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import IPython.display as ipd\n",
        "import librosa, librosa.display"
      ],
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "### load / plot / play sound file"
      ],
      "metadata": {
        "id": "VyICGWoRAUuV"
      }
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "7QqXtTXxn9B7"
      },
      "source": [
        "# from google.colab import files\n",
        "# fn = files.upload()\n",
        "import os\n",
        "url = \"https://raw.githubusercontent.com/hsnam95/class2022Spring/main/aeiou.wav\"\n",
        "os.system(\"curl \" + url + \" > aeiou.wav\")\n",
        "\n",
        "s, sr = librosa.load('aeiou.wav')"
      ],
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "s = librosa.util.normalize(s)\n",
        "librosa.display.waveplot(s, sr)\n",
        "ipd.Audio(s[7000:12000], rate=sr)"
      ],
      "metadata": {
        "id": "GYJxi9xvVvt8"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "### Fourier Transform for Spectrogram"
      ],
      "metadata": {
        "id": "0OSaiS-7AwZr"
      }
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-NcZn-caoYSt"
      },
      "source": [
        "s_preemp = librosa.effects.preemphasis(s)\n",
        "\n",
        "n_fft=512\n",
        "hop_length=int(0.001*sr)\n",
        "win_length=int(sr*0.008)\n",
        "\n",
        "spec = librosa.stft(s_preemp, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window = 'hann')\n",
        "magspec = np.abs(spec)\n",
        "dBspec = librosa.amplitude_to_db(magspec, ref=np.max)\n",
        "\n",
        "plt.figure(figsize=(15, 5))\n",
        "librosa.display.specshow(dBspec, sr=sr, x_coords = np.linspace(1, len(s), dBspec.shape[1])/sr , x_axis='time', y_axis='linear', cmap='Greys')\n",
        "plt.ylim((0,5000))"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "### Filter for audio transformation"
      ],
      "metadata": {
        "id": "VZQs9tMxCPad"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from scipy.signal import lfilter\n",
        "sig = s[7000:12000]\n",
        "sig = lfilter(np.array([1]), np.array([1]), sig, axis=0)\n",
        "librosa.display.waveplot(sig, sr)\n",
        "ipd.Audio(sig, rate=sr)"
      ],
      "metadata": {
        "id": "xlTto7H_RA-U"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "### RMS(Root Mean Square) for intensity"
      ],
      "metadata": {
        "id": "N9NfP2cPCw7P"
      }
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "MkJTYAixfNhK"
      },
      "source": [
        "rms = librosa.feature.rms(s)\n",
        "plt.plot(rms[0])"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "### Autocorrelation for pitch(F0) measurement"
      ],
      "metadata": {
        "id": "O9mNH08CDAR-"
      }
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PoOGXdFBgpx1"
      },
      "source": [
        "F0, voiced_flag, voiced_prob = librosa.pyin(s, 60, 200)\n",
        "plt.plot(F0, '.')"
      ],
      "execution_count": null,
      "outputs": []
    }
  ]
}

================================================
FILE: bert_train.ipynb
================================================
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "bert_train.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyPhUU6tbNMPG5vuAPGFlMlW",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "0595eda74d5b4758914c96b8fdeeaa14": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_7a2f7a6fd2944094b4c155bc41fdad06",
              "IPY_MODEL_00c6fe6869fc4aee81a94826d18df53e",
              "IPY_MODEL_1931f2901b284e458fd7037cd6316a56"
            ],
            "layout": "IPY_MODEL_00680b4496f44e2180b81161327d6238"
          }
        },
        "7a2f7a6fd2944094b4c155bc41fdad06": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_0cdbfd0168c2430bb76d3ec691f263b5",
            "placeholder": "​",
            "style": "IPY_MODEL_a17098e4164446a7869d3d82d70df5b4",
            "value": "100%"
          }
        },
        "00c6fe6869fc4aee81a94826d18df53e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_482d129109c440a19dc0f218fcf00035",
            "max": 2,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_78ec43861fc341eaa286552ded5f7625",
            "value": 2
          }
        },
        "1931f2901b284e458fd7037cd6316a56": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_6d421c9ad50e4fc5a0bfcc822ec96b98",
            "placeholder": "​",
            "style": "IPY_MODEL_9d641959ec8343059b2c550123cff6f3",
            "value": " 2/2 [00:00&lt;00:00, 32.74it/s]"
          }
        },
        "00680b4496f44e2180b81161327d6238": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0cdbfd0168c2430bb76d3ec691f263b5": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a17098e4164446a7869d3d82d70df5b4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "482d129109c440a19dc0f218fcf00035": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "78ec43861fc341eaa286552ded5f7625": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "6d421c9ad50e4fc5a0bfcc822ec96b98": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9d641959ec8343059b2c550123cff6f3": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "b3da2de5cb8e40f181d7e628f155791c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_76796ab7f4964bc08f22c7ca6c1f842a",
              "IPY_MODEL_e71e44fe31824d7fadb7ad8616a6e4fc",
              "IPY_MODEL_25ba92843e55427e8dd0b5371ef0f15e"
            ],
            "layout": "IPY_MODEL_54f394cecf104d9cb0797aeba86cd10b"
          }
        },
        "76796ab7f4964bc08f22c7ca6c1f842a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_8bfe43c8d8d745c58207d78cc7aa8281",
            "placeholder": "​",
            "style": "IPY_MODEL_e9e34d090d734e7fbb712844630e10d9",
            "value": "100%"
          }
        },
        "e71e44fe31824d7fadb7ad8616a6e4fc": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9ed99d07375c48d799af75217053fe6c",
            "max": 650,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_5f643a73565b4f399cb4643543c448f9",
            "value": 650
          }
        },
        "25ba92843e55427e8dd0b5371ef0f15e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ee8354b4b7ff439b8bbe61e6ae75f2ae",
            "placeholder": "​",
            "style": "IPY_MODEL_cfdff39fb55249449b8d3a2a0c76ba8a",
            "value": " 650/650 [06:20&lt;00:00,  1.75ba/s]"
          }
        },
        "54f394cecf104d9cb0797aeba86cd10b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8bfe43c8d8d745c58207d78cc7aa8281": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "e9e34d090d734e7fbb712844630e10d9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "9ed99d07375c48d799af75217053fe6c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5f643a73565b4f399cb4643543c448f9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "ee8354b4b7ff439b8bbe61e6ae75f2ae": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "cfdff39fb55249449b8d3a2a0c76ba8a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "aa7889f2098a4a8aa5f7d2a3545a8666": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_4b590d2ee37d4fb39a6c86675fb1001c",
              "IPY_MODEL_3f9bd34c4c8742108da8bd9837dd6ca1",
              "IPY_MODEL_cb4414f060ec4dbbb6483d1458fe6731"
            ],
            "layout": "IPY_MODEL_47ea0d6c9f064ac4884d0a3cffb642b1"
          }
        },
        "4b590d2ee37d4fb39a6c86675fb1001c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_7b6152ae97cb4884940195a3bc7d9f5a",
            "placeholder": "​",
            "style": "IPY_MODEL_9aa169373e1344129fe92c7811efe9c3",
            "value": "100%"
          }
        },
        "3f9bd34c4c8742108da8bd9837dd6ca1": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b84008e4b5a14d74801d370f584d58c5",
            "max": 50,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_66a3d16d8b0d491fb41bdfa29f9968f1",
            "value": 50
          }
        },
        "cb4414f060ec4dbbb6483d1458fe6731": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_7c4455bffec44d8f86395c792019c8b7",
            "placeholder": "​",
            "style": "IPY_MODEL_cffa1823fa4b41f98f8ffff4378bf93c",
            "value": " 50/50 [00:28&lt;00:00,  1.73ba/s]"
          }
        },
        "47ea0d6c9f064ac4884d0a3cffb642b1": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7b6152ae97cb4884940195a3bc7d9f5a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9aa169373e1344129fe92c7811efe9c3": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "b84008e4b5a14d74801d370f584d58c5": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "66a3d16d8b0d491fb41bdfa29f9968f1": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7c4455bffec44d8f86395c792019c8b7": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "cffa1823fa4b41f98f8ffff4378bf93c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "15f4f60b02ee47c4b1e098964822d18a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_35f63307934d4b43b66e9bb2e4c16efd",
              "IPY_MODEL_fb6c04928aa145b8a0c3c8613944a39b",
              "IPY_MODEL_5107e79f9dac4447be271d15bbdb1aa5"
            ],
            "layout": "IPY_MODEL_17f47e5c983e4e3e91d9df965cf285de"
          }
        },
        "35f63307934d4b43b66e9bb2e4c16efd": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_331c8b03d9c64deeb33ea7058dd21e8b",
            "placeholder": "​",
            "style": "IPY_MODEL_6c44bc4a51c54871bb3377e84caacf0c",
            "value": "Downloading: 100%"
          }
        },
        "fb6c04928aa145b8a0c3c8613944a39b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9bd6d0e272d54583bb26fa66b6786d74",
            "max": 435779157,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_a95e24831a3c4109a8d86051e97c6ad9",
            "value": 435779157
          }
        },
        "5107e79f9dac4447be271d15bbdb1aa5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d2bfc475dce04f6690b7e41fe77ea2ac",
            "placeholder": "​",
            "style": "IPY_MODEL_91fbbc44eb314d5cb761e5c2c3c130cd",
            "value": " 416M/416M [00:11&lt;00:00, 37.2MB/s]"
          }
        },
        "17f47e5c983e4e3e91d9df965cf285de": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "331c8b03d9c64deeb33ea7058dd21e8b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6c44bc4a51c54871bb3377e84caacf0c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "9bd6d0e272d54583bb26fa66b6786d74": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a95e24831a3c4109a8d86051e97c6ad9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "d2bfc475dce04f6690b7e41fe77ea2ac": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "91fbbc44eb314d5cb761e5c2c3c130cd": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d5ba5a503ff64a0580fb7776f8b096a8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_b76dfc38fcd343a3a2d233159f600c62",
              "IPY_MODEL_6304ebcb7fb744479cd59f333314ced5",
              "IPY_MODEL_d9b8aedd99f14e99853a8e9b6be061e8"
            ],
            "layout": "IPY_MODEL_3e8494b9617b49a4956b6447109134d3"
          }
        },
        "b76dfc38fcd343a3a2d233159f600c62": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a397007df7e64e4c9867c9674ca6e0e6",
            "placeholder": "​",
            "style": "IPY_MODEL_30b20ae1273d4330acb5c06b3b7fa003",
            "value": "Downloading builder script: "
          }
        },
        "6304ebcb7fb744479cd59f333314ced5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_de72bbd21ad04af5ad233bf42220793b",
            "max": 1411,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_48af2d681b83462bb12f1c5288e475e6",
            "value": 1411
          }
        },
        "d9b8aedd99f14e99853a8e9b6be061e8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ea0cf5c638d146e59e035fd0ccd99d3a",
            "placeholder": "​",
            "style": "IPY_MODEL_ad34289d437c4f15aa9813af4a482aae",
            "value": " 3.19k/? [00:00&lt;00:00, 72.9kB/s]"
          }
        },
        "3e8494b9617b49a4956b6447109134d3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a397007df7e64e4c9867c9674ca6e0e6": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "30b20ae1273d4330acb5c06b3b7fa003": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "de72bbd21ad04af5ad233bf42220793b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "48af2d681b83462bb12f1c5288e475e6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "ea0cf5c638d146e59e035fd0ccd99d3a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ad34289d437c4f15aa9813af4a482aae": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        }
      }
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/hsnam95/class2022Spring/blob/main/bert_train.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install datasets"
      ],
      "metadata": {
        "id": "JpDL8AQqGcAT"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "execution_count": 15,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 86,
          "referenced_widgets": [
            "0595eda74d5b4758914c96b8fdeeaa14",
            "7a2f7a6fd2944094b4c155bc41fdad06",
            "00c6fe6869fc4aee81a94826d18df53e",
            "1931f2901b284e458fd7037cd6316a56",
            "00680b4496f44e2180b81161327d6238",
            "0cdbfd0168c2430bb76d3ec691f263b5",
            "a17098e4164446a7869d3d82d70df5b4",
            "482d129109c440a19dc0f218fcf00035",
            "78ec43861fc341eaa286552ded5f7625",
            "6d421c9ad50e4fc5a0bfcc822ec96b98",
            "9d641959ec8343059b2c550123cff6f3"
          ]
        },
        "id": "Jq_gEdfOAXgq",
        "outputId": "cbbd5105-5640-4b12-b260-2945e9d02182"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "Reusing dataset yelp_review_full (/root/.cache/huggingface/datasets/yelp_review_full/yelp_review_full/1.0.0/13c31a618ba62568ec8572a222a283dfc29a6517776a3ac5945fb508877dde43)\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "  0%|          | 0/2 [00:00<?, ?it/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "0595eda74d5b4758914c96b8fdeeaa14"
            }
          },
          "metadata": {}
        }
      ],
      "source": [
        "from datasets import load_dataset\n",
        "dataset = load_dataset(\"yelp_review_full\")"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "dataset['train']['text'][0]"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 105
        },
        "id": "2Vj9ozFhXV7F",
        "outputId": "935ff9c8-63bf-4c96-acfc-c1bcfd2badd3"
      },
      "execution_count": 24,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "\"dr. goldberg offers everything i look for in a general practitioner.  he's nice and easy to talk to without being patronizing; he's always on time in seeing his patients; he's affiliated with a top-notch hospital (nyu) which my parents have explained to me is very important in case something happens and you need surgery; and you can get referrals to see specialists without having to see him first.  really, what more do you need?  i'm sitting here trying to think of any complaints i have about him, but i'm really drawing a blank.\""
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            }
          },
          "metadata": {},
          "execution_count": 24
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install transformers"
      ],
      "metadata": {
        "id": "zF-RPMHlYJTg"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "from transformers import AutoTokenizer\n",
        "tokenizer = AutoTokenizer.from_pretrained(\"bert-base-cased\")"
      ],
      "metadata": {
        "id": "O41r-eVGAjKN"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "def tokenize_function(examples):\n",
        "    return tokenizer(examples[\"text\"], padding=\"max_length\", truncation=True)\n",
        "tokenized_datasets = dataset.map(tokenize_function, batched=True)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 81,
          "referenced_widgets": [
            "b3da2de5cb8e40f181d7e628f155791c",
            "76796ab7f4964bc08f22c7ca6c1f842a",
            "e71e44fe31824d7fadb7ad8616a6e4fc",
            "25ba92843e55427e8dd0b5371ef0f15e",
            "54f394cecf104d9cb0797aeba86cd10b",
            "8bfe43c8d8d745c58207d78cc7aa8281",
            "e9e34d090d734e7fbb712844630e10d9",
            "9ed99d07375c48d799af75217053fe6c",
            "5f643a73565b4f399cb4643543c448f9",
            "ee8354b4b7ff439b8bbe61e6ae75f2ae",
            "cfdff39fb55249449b8d3a2a0c76ba8a",
            "aa7889f2098a4a8aa5f7d2a3545a8666",
            "4b590d2ee37d4fb39a6c86675fb1001c",
            "3f9bd34c4c8742108da8bd9837dd6ca1",
            "cb4414f060ec4dbbb6483d1458fe6731",
            "47ea0d6c9f064ac4884d0a3cffb642b1",
            "7b6152ae97cb4884940195a3bc7d9f5a",
            "9aa169373e1344129fe92c7811efe9c3",
            "b84008e4b5a14d74801d370f584d58c5",
            "66a3d16d8b0d491fb41bdfa29f9968f1",
            "7c4455bffec44d8f86395c792019c8b7",
            "cffa1823fa4b41f98f8ffff4378bf93c"
          ]
        },
        "id": "XMe73MUmBgSN",
        "outputId": "472a6230-0bd1-4466-c2f7-7e14812193a6"
      },
      "execution_count": 28,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "  0%|          | 0/650 [00:00<?, ?ba/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "b3da2de5cb8e40f181d7e628f155791c"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "  0%|          | 0/50 [00:00<?, ?ba/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "aa7889f2098a4a8aa5f7d2a3545a8666"
            }
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "small_train_dataset = tokenized_datasets[\"train\"].shuffle(seed=42).select(range(1000))\n",
        "small_eval_dataset = tokenized_datasets[\"test\"].shuffle(seed=42).select(range(1000))"
      ],
      "metadata": {
        "id": "aEuamkHIGAxP"
      },
      "execution_count": 29,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "from transformers import AutoModelForSequenceClassification\n",
        "model = AutoModelForSequenceClassification.from_pretrained(\"bert-base-cased\", num_labels=5)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 156,
          "referenced_widgets": [
            "15f4f60b02ee47c4b1e098964822d18a",
            "35f63307934d4b43b66e9bb2e4c16efd",
            "fb6c04928aa145b8a0c3c8613944a39b",
            "5107e79f9dac4447be271d15bbdb1aa5",
            "17f47e5c983e4e3e91d9df965cf285de",
            "331c8b03d9c64deeb33ea7058dd21e8b",
            "6c44bc4a51c54871bb3377e84caacf0c",
            "9bd6d0e272d54583bb26fa66b6786d74",
            "a95e24831a3c4109a8d86051e97c6ad9",
            "d2bfc475dce04f6690b7e41fe77ea2ac",
            "91fbbc44eb314d5cb761e5c2c3c130cd"
          ]
        },
        "id": "q7wZiuDQGD4K",
        "outputId": "5a764dbb-af8b-43b1-e91b-f1675f6e4eaa"
      },
      "execution_count": 30,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading:   0%|          | 0.00/416M [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "15f4f60b02ee47c4b1e098964822d18a"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "Some weights of the model checkpoint at bert-base-cased were not used when initializing BertForSequenceClassification: ['cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.bias', 'cls.seq_relationship.bias', 'cls.predictions.bias', 'cls.seq_relationship.weight', 'cls.predictions.transform.dense.weight']\n",
            "- This IS expected if you are initializing BertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
            "- This IS NOT expected if you are initializing BertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
            "Some weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-cased and are newly initialized: ['classifier.bias', 'classifier.weight']\n",
            "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from transformers import TrainingArguments\n",
        "training_args = TrainingArguments(output_dir=\"test_trainer\")"
      ],
      "metadata": {
        "id": "Z-K1Ln8eGGnH"
      },
      "execution_count": 31,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "from datasets import load_metric\n",
        "metric = load_metric(\"accuracy\")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 49,
          "referenced_widgets": [
            "d5ba5a503ff64a0580fb7776f8b096a8",
            "b76dfc38fcd343a3a2d233159f600c62",
            "6304ebcb7fb744479cd59f333314ced5",
            "d9b8aedd99f14e99853a8e9b6be061e8",
            "3e8494b9617b49a4956b6447109134d3",
            "a397007df7e64e4c9867c9674ca6e0e6",
            "30b20ae1273d4330acb5c06b3b7fa003",
            "de72bbd21ad04af5ad233bf42220793b",
            "48af2d681b83462bb12f1c5288e475e6",
            "ea0cf5c638d146e59e035fd0ccd99d3a",
            "ad34289d437c4f15aa9813af4a482aae"
          ]
        },
        "id": "LzV9xUB1GJR6",
        "outputId": "f7edaf37-c45f-47d2-c4b0-730bb1e235e7"
      },
      "execution_count": 32,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading builder script:   0%|          | 0.00/1.41k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "d5ba5a503ff64a0580fb7776f8b096a8"
            }
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "def compute_metrics(eval_pred):\n",
        "    logits, labels = eval_pred\n",
        "    predictions = np.argmax(logits, axis=-1)\n",
        "    return metric.compute(predictions=predictions, references=labels)"
      ],
      "metadata": {
        "id": "wS6oUhPcGLYS"
      },
      "execution_count": 33,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "from transformers import TrainingArguments\n",
        "training_args = TrainingArguments(output_dir=\"test_trainer\", evaluation_strategy=\"epoch\")"
      ],
      "metadata": {
        "id": "g2T8gsAWGNMJ"
      },
      "execution_count": 34,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "from transformers import Trainer\n",
        "trainer = Trainer(\n",
        "    model=model,\n",
        "    args=training_args,\n",
        "    train_dataset=small_train_dataset,\n",
        "    eval_dataset=small_eval_dataset,\n",
        "    compute_metrics=compute_metrics,\n",
        ")"
      ],
      "metadata": {
        "id": "JVnuvUoFGPFO"
      },
      "execution_count": 38,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "trainer.train()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        },
        "id": "szXpACBIGQZn",
        "outputId": "9b1e44b8-5f83-4fb8-9dad-3bbc1c079d37"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "The following columns in the training set  don't have a corresponding argument in `BertForSequenceClassification.forward` and have been ignored: text. If text are not expected by `BertForSequenceClassification.forward`,  you can safely ignore this message.\n",
            "/usr/local/lib/python3.7/dist-packages/transformers/optimization.py:309: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
            "  FutureWarning,\n",
            "***** Running training *****\n",
            "  Num examples = 1000\n",
            "  Num Epochs = 3\n",
            "  Instantaneous batch size per device = 8\n",
            "  Total train batch size (w. parallel, distributed & accumulation) = 8\n",
            "  Gradient Accumulation steps = 1\n",
            "  Total optimization steps = 375\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ],
            "text/html": [
              "\n",
              "    <div>\n",
              "      \n",
              "      <progress value='3' max='375' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
              "      [  3/375 00:48 < 5:00:03, 0.02 it/s, Epoch 0.02/3]\n",
              "    </div>\n",
              "    <table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              " <tr style=\"text-align: left;\">\n",
              "      <th>Epoch</th>\n",
              "      <th>Training Loss</th>\n",
              "      <th>Validation Loss</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "  </tbody>\n",
              "</table><p>"
            ]
          },
          "metadata": {}
        }
      ]
    }
  ]
}

================================================
FILE: crime_punishment.txt
================================================
PART ONE

CHAPTER ONE

ON AN EXCEPTIONALLY HOT evening early in July a young man came out of the tiny room which he rented from tenants in S. Place and walked slowly, as though in hesitation, towards K. Bridge.

He had successfully avoided meeting his landlady on the stairs. His closet of a room was under the roof of a high, five-floor house and was more like a cupboard than a place in which to live. The landlady who provided him with the room and with dinner and service lived on the floor below, and every time he went out he was obliged to pass her kitchen, the door of which was always open. And each time he passed, the young man had a sick, frightened feeling, which made him grimace and feel ashamed. He was hopelessly in debt to his landlady and was afraid of meeting her.

This was not because he was cowardly and browbeaten, quite the contrary; but for some time past he had been in an overstrained irritable condition, verging on hypochondria. He had become so completely absorbed in himself and isolated from everyone else that he dreaded meeting not only his landlady, but anyone at all. He was crushed by poverty, but even the anxieties of his position had recently ceased to weigh upon him. He had given up attending to matters of practical importance; he had lost all desire to do so. In fact, nothing that any landlady could do held any terror for him. But to be stopped on the stairs, to be forced to listen to her trivial, irrelevant gossip, to pestering demands for payment, threats and complaints, all the while racking his brains for excuses, avoiding the issue, lying — no, he would rather creep down the stairs like a cat and slip out unseen.

However, when he emerged onto the street that evening, he became acutely aware of his fears.

“I want to attempt a thing like that and am frightened by these trifles,” he thought, with an odd smile. “Hm . . . yes, everything is in someone’s hands and they let it all slip out of cowardice, that’s an axiom. It would be interesting to know what it is people are most afraid of. Taking a new step, uttering a new word is what they fear most . . . But I am talking too much. It’s because I babble that I do nothing. Or perhaps it is that I babble because I do nothing. I’ve learned to babble this last month, lying for days on end in my corner thinking . . . just nonsense. Why am I going there now? Am I capable of that? Is that seriously possible? I’m not serious about it at all. It’s just a fantasy to amuse myself; a plaything! Yes, maybe it is a plaything.”

The heat in the street was terrible: and the airlessness, the bustle, the plaster, the scaffolding, the bricks and the dust all around him, and that special Petersburg stench, so familiar to everyone who is unable to get out of town during the summer — all worked painfully upon the young man’s already overwrought nerves. The unbearable stench from the taverns, which are particularly numerous in that part of the town, and the drunken men whom he met continually, although it was a weekday, completed the revolting misery of the picture. An expression of the deepest disgust gleamed for a moment in the young man’s refined face. He was, by the way, exceptionally handsome, above average in height, slim, well-built, with beautiful dark eyes and dark brown hair. Soon, though, he sank into deep thought, or more accurately speaking into a complete blankness of mind; he walked along not observing what was around him and not caring to observe it. From time to time, because he used to talk to himself, he would mutter something, a habit to which he had just confessed. At these moments he would become conscious that his ideas were sometimes in a tangle and that he was very weak; for two days he had had almost nothing to eat.

He was so badly dressed that even a man accustomed to shabbiness would have been ashamed to be seen in the street in such rags. In that part of town, however, scarcely any shortcoming in dress would have created surprise. Due to the proximity of the Haymarket, the number of establishments of a certain kind and the overwhelming numbers of craftsmen and workers crowded in these streets and alleys at the center of Petersburg, so many different types of people were to be seen in the streets that no figure, however strange, would have caused surprise. But there was such accumulated spite and contempt in the young man’s heart, that, in spite of all the cares of youth, he minded his rags least of all. It was a different matter when he met with acquaintances or with former fellow students, whom, indeed, he disliked meeting at any time. And yet when a drunken man who, for some unknown reason, was being taken somewhere in a huge cart dragged by a heavy cart-horse, suddenly shouted at him as he drove past, “Hey there, German hatter,” bellowing at the top of his voice and pointing at him — the young man stopped suddenly and clutched trembling at his hat. It was a tall round one from Zimmermann’s, but completely worn out, rusty with age, all torn and bespattered, brimless and bent on one side in a most hideous fashion. Not shame, however, but another feeling akin to terror had overtaken him.

“I knew it,” he muttered in confusion, “I thought so! That’s the worst of all! A stupid thing like this, the most trivial detail might spoil the whole plan. Yes, my hat is too noticeable . . . It looks absurd and that makes it noticeable . . . With my rags I ought to wear a cap, any old pancake, but not this grotesque thing. Nobody wears hats like this, it would be noticed a mile off, it would be remembered... What matters is that people would remember it, and that would give them a clue. For this business I should be as unnoticeable as possible . . . Trifles, trifles are what matter! It’s just such trifles that always ruin everything . . . ”

He did not have far to go; he knew indeed how many steps it was from the gate of his house: exactly seven hundred and thirty. He had counted them once when he had been lost in dreams. At the time he had put no faith in those dreams and was only tantalizing himself with their hideous insolence. Now, a month later, he had begun to look upon them differently, and, in spite of the monologues in which he jeered at his own impotence and indecision, he had even, involuntarily as it were, come to regard this “hideous” dream as an exploit to be attempted, although he still did not quite believe in this himself. He was now definitely going for a “rehearsal” of this undertaking of his, and at every step he grew more and more excited.

With a sinking heart and a nervous tremor, he went up to a huge house which on one side looked on to the canal, and on the other into the street. This house was let out in tiny apartments and was inhabited by working people of all kinds — tailors, locksmiths, cooks, Germans of all sorts, girls picking up a living as best they could, petty clerks, etc. There was a continual coming and going through the two gates and in the two courtyards of the house. Three or four door-keepers were employed in the building. The young man was very glad not to meet any of them, and at once slipped unnoticed through the door on the right, and up the staircase. It was a back staircase, dark and narrow, but he was familiar with it already, and knew his way, and he liked all these surroundings: in such darkness even the most inquisitive eyes were not to be feared.

“If I am so scared now, what would it be if it somehow came to pass that I were really going to do it?” he could not help asking himself as he reached the fourth floor. There his progress was barred by some porters who were moving furniture out of an apartment. He knew that the apartment had been occupied by a German clerk in the civil service, and his family. This German was moving out then, and so the fourth floor on this staircase would be vacant except for the old woman. “That’s a good thing anyway,” he thought to himself, as he rang the bell of the old woman’s flat. The bell gave a faint tinkle as though it were made of tin and not of copper. The little apartments in such houses always have bells that ring like that. He had forgotten the note of that bell, and now its peculiar tinkle seemed to remind him of something and to bring it clearly before him . . . He gave a start, his nerves were terribly overstrained by now. In a little while, the door was opened a tiny crack: the old woman eyed her visitor with evident distrust through the crack, and nothing could be seen but her little eyes, glittering in the darkness. But, seeing a number of people on the landing, she grew bolder, and opened the door wide. The young man stepped into the dark entryway, which was partitioned off from the tiny kitchen. The old woman stood facing him in silence and looking inquiringly at him. She was a diminutive, withered old woman of sixty, with sharp mean eyes and a sharp little nose. Her colorless, somewhat grizzled hair was thickly smeared with oil, and she wore no kerchief over it. Round her thin long neck, which looked like a hen’s leg, was knotted some sort of flannel rag, and, in spite of the heat, there hung flapping on her shoulders a tattered fur cape, yellow with age. The old woman coughed and groaned at every instant. The young man must have looked at her with a rather peculiar expression, for a gleam of mistrust came into her eyes again.

“Raskolnikov, a student, I came here a month ago,” the young man made haste to mutter, with a half bow, remembering that he ought to be more polite.

“I remember, sir, I remember quite well your coming here,” the old woman said distinctly, still keeping her inquiring eyes on his face.

“And here . . . I am again on the same errand,” Raskolnikov continued, a little disconcerted and surprised at the old woman’s mistrust. “Perhaps she is always like that though, only I did not notice it the other time,” he thought with an uneasy feeling.

The old woman paused, as though hesitating; then stepped to the side, and pointing to the door of the room, she said, letting her visitor pass in front of her:

“Step in, sir.”

The little room the young man walked into, with yellow paper on the walls, geraniums and muslin curtains in the windows, was brightly lit up at that moment by the setting sun.

“So the sun will shine like this then too!” flashed as it were by chance through Raskolnikov’s mind, and with a rapid glance he scanned everything in the room, trying as far as possible to notice and remember its arrangement. But there was nothing special in the room. The furniture, all very old and made of yellow wood, consisted of a sofa with a huge bent wooden back, an oval table in front of the sofa, a dressing-table with a mirror fixed on it between the windows, chairs along the walls and two or three cheap prints in yellow frames, representing German maidens with birds in their hands — that was all. In the corner a light was burning in front of a small icon. Everything was very clean; the floor and the furniture were brightly polished; everything shone.

“Lizaveta’s work,” thought the young man. There was not a speck of dust to be seen in the whole apartment.

“It’s in the houses of spiteful old widows that one finds such cleanliness,” Raskolnikov thought again, and he stole a curious glance at the cotton curtain over the door leading into another tiny room, in which stood the old woman’s bed and chest of drawers and into which he had never looked before. These two rooms made up the whole apartment.

“What do you want?” the old woman said severely, coming into the room and, as before, standing in front of him so as to look him straight in the face.

“I’ve brought something to pawn here,” and he drew out of his pocket an old-fashioned flat silver watch, on the back of which was engraved a globe; the chain was of steel.

“But the time is up for your last pledge. The month was up the day before yesterday.”

“I will bring you the interest for another month; wait a little.”

“That’s for me to do as I please, sir, to wait or to sell your pledge at once.”

“How much will you give me for the watch, Aliona Ivanovna?”

“You come with such trifles, sir, it’s scarcely worth anything. I gave you two rubles last time for your ring and one could buy it quite new at a jeweler’s for a ruble and a half.”

“Give me four rubles for it, I will redeem it, it was my father’s. I will be getting some money soon.”

“A ruble and a half, and interest in advance, if you like!”

“A ruble and a half!” cried the young man.

“As you wish” — and the old woman handed him back the watch. The young man took it, and was so angry that he was on the point of going away; but checked himself at once, remembering that there was nowhere else he could go, and that he had had another reason for coming.

“Hand it over,” he said roughly.

The old woman fumbled in her pocket for her keys, and disappeared behind the curtain into the other room. The young man, left standing alone in the middle of the room, listened inquisitively, thinking. He could hear her unlocking the chest of drawers.

“It must be the top drawer,” he reflected. “So she carries the keys in a pocket on the right. All in one bunch on a steel ring . . . And there’s one key there, three times as big as all the others, with deep notches; that can’t be the key for the chest of drawers . . . then there must be some other chest or b-box . . . that’s worth knowing. Strong-boxes always have keys like that . . . but how degrading it all is.”

The old woman came back.

“Here, sir: as we say ten kopecks the ruble a month, so I must take fifteen kopecks from a ruble and a half for the month in advance. But for the two rubles I lent you before, you owe me now twenty kopecks on the same reckoning in advance. That makes thirty-five kopecks altogether. So I must give you a ruble and fifteen kopecks for the watch. Here it is.”

“What! Only a ruble and fifteen kopecks now!”

“Exactly.”

The young man did not dispute it and took the money. He looked at the old woman, and was in no hurry to get away, as though there was still something he wanted to say or to do, but he did not himself quite know what.

“I may be bringing you something else in a day or two, Aliona Ivanovna — a valuable thing, silver, a cigarette box, as soon as I get it back from a friend . . . ” he broke off in confusion.

“Well, we will talk about it then, sir.”

“Goodbye — are you always at home alone, your sister is not here with you?” he asked her as casually as possible as he went out into the passage.

“What business is she of yours, sir?”

“Oh, nothing particular, I simply asked. You are too quick . . . Good-day, Aliona Ivanovna.”

Raskolnikov went out in complete confusion. This confusion became more and more intense. As he went down the stairs, he even stopped short, two or three times, as though suddenly struck by some thought. When he was in the street he cried out, “Oh, God, how loathsome it all is! and can I, can I possibly . . . No, it’s nonsense, it’s absurd!” he added resolutely. “And how could such an atrocious thing come into my head? What filthy things my heart is capable of. Yes, filthy above all, disgusting, loathsome, loathsome! — and for a whole month I’ve been . . . ” But no words, no exclamations, could express his agitation. The feeling of intense repulsion, which had begun to oppress and torture his heart while he was on his way to the old woman, had by now reached such a pitch and had taken such a definite form that he did not know what to do with himself to escape from his wretchedness. He walked along the pavement like a drunken man, oblivious of the passersby, and jostling against them, and only came to his senses when he was in the next street. Looking round, he noticed that he was standing close to a tavern which was entered by steps leading from the pavement to the basement. At that instant two drunken men came out of the door and, abusing and supporting one another, they mounted the steps. Without stopping to think, Raskolnikov went down the steps at once. Until that moment he had never been into a tavern, but now he felt dizzy and was tormented by a burning thirst. He longed for a drink of cold beer, and attributed his sudden weakness to hunger. He sat down at a sticky little table in a dark and dirty corner; ordered some beer, and eagerly drank off the first glassful. At once he felt relief; and his thoughts became clear.

“All that’s nonsense,” he said hopefully, “and there is nothing in it all to worry about! It’s simply physical weakness. Just a glass of beer, a piece of dry bread — and in one moment the brain is ber, the mind is clearer and the will is firm! Pah, how utterly petty it all is!”

But, though he spat this out so scornfully, he was by now looking cheerful as though he were suddenly set free from a terrible burden: and he gazed round in a friendly way at the people in the room. But even at that moment he had a dim foreboding that this happier frame of mind was also not normal.

There were few people at the time in the tavern. Besides the two drunken men he had met on the steps, a group consisting of about five men, with a girl and a concertina, had gone out at the same time. Their departure left the room quiet and rather empty. The persons remaining were a man who appeared to be an artisan, drunk, but not extremely so, sitting with a beer, and his companion, a huge, stout man with a gray beard, in a short full-skirted coat. He was very drunk and had dozed off on the bench; every now and then, as if in his sleep, he began cracking his fingers, with his arms wide apart and the upper part of his body bouncing about on the bench, while he hummed some meaningless refrain, trying to recall some such lines as these: —

“His wife a year he stroked and loved

His wife a — a year he — stroked and loved.” —

Or suddenly waking up again: —

“Walking along the crowded row

He met the one he used to know.” —

But no-one shared his enjoyment: his silent companion looked at all these outbursts with hostility and mistrust. There was another man in the room who looked somewhat like a retired government clerk. He was sitting apart, sipping now and then from his mug and looking round at the company. He, too, appeared to be somewhat excited.

CHAPTER TWO

RASKOLNIKOV WAS NOT USED to crowds, and, as was said previously, he avoided society of every sort, especially recently. But now all at once he felt a desire to be with other people. Something new seemed to be taking place within him, and with it he felt a sort of thirst for company. He was so weary after a whole month of concentrated wretchedness and gloomy excitement that he longed to rest, if only for a moment, in some other world, whatever it might be; and, in spite of the filthiness of the surroundings, he was glad now to stay in the tavern.

The owner of the establishment was in another room, but he frequently came down some steps into the main room, his jaunty, polished boots with red turn-over tops coming into view each time before the rest of him. He wore a full coat and a horribly greasy black satin waistcoat, with no cravat, and his whole face seemed smeared with oil like an iron lock. At the counter stood a boy of about fourteen, and there was another somewhat younger boy who served the customers. On the counter lay some sliced cucumber, some pieces of dried black bread, and some fish chopped up into little pieces, all smelling very bad. It was unbearably humid, and so heavy with the fumes of alcohol that five minutes in such an atmosphere could well cause drunkenness.

We all have chance meetings with people, even with complete strangers, who interest us at first glance, suddenly, before a word is spoken. Such was the impression made on Raskolnikov by the person sitting a little distance from him, who looked like a retired clerk. The young man often recalled this impression afterwards, and even ascribed it to presentiment. He looked repeatedly at the clerk, partly no doubt because the latter was staring persistently at him, obviously anxious to enter into conversation. The clerk looked at the other persons in the room, including the tavern-keeper, as though he were used to their company, and weary of it, showing at the same time a shade of patronizing contempt for them as members of a culture inferior to his own, with whom it would be useless for him to converse. He was over fifty, bald and grizzled, of medium height, and stoutly built. His face, bloated from continual drinking, was of a yellow, even greenish, tinge, with swollen eyelids out of which keen reddish eyes gleamed like little slits. But there was something very strange in him; there was a light in his eyes as though of intense feeling — perhaps there was even a streak of thought and intelligence, but at the same time they gleamed with something like madness. He was wearing an old and hopelessly ragged black dress coat, with all its buttons missing except one, which he had buttoned, evidently wishing to preserve his respectability. A crumpled shirt front covered with spots and stains, protruded from his canvas waistcoat. Like a clerk, he did not have a beard or a moustache, but had been so long unshaven that his chin looked like a stiff grayish brush. And there was also something respectable and official about his manner. But he was restless; he ruffled up his hair and from time to time let his head drop into his hands dejectedly resting his ragged elbows on the stained and sticky table. At last he looked straight at Raskolnikov, and said loudly and resolutely:

“May I venture, dear sir, to engage you in polite conversation? For although your exterior would not command respect, my experience distinguishes in you a man of education and not accustomed to drinking. I have always respected education united with genuine feelings, and I am besides a titular councilor in rank. Marmeladov — that is my name; titular councilor. May I inquire — have you been in the service?”

“No, I am studying,” answered the young man, somewhat surprised at the grand style of the speaker and also at being so directly addressed. In spite of the momentary desire he had just been feeling for company of any sort, when he was actually spoken to he felt his habitual irritable uneasiness at any stranger who approached or attempted to approach him.

“A student then, or a former student,” cried the clerk. “Just what I thought! I’m a man of experience, immense experience, sir,” and he tapped his forehead with his fingers in self-approval. “You’ve been a student or have attended some learned institution! . . . But allow me ... ” He got up, staggered, took up his jug and glass, and sat down beside the young man, facing him a little sideways. He was drunk, but spoke fluently and boldly, only occasionally losing the thread of his sentences and drawling his words. He pounced upon Raskolnikov as greedily as though he too had not spoken to a soul for a month.

“Dear sir,” he began almost with solemnity, “poverty is not a vice, that’s a true saying. Yet I know too that drunkenness is not a virtue, and that that’s even truer. But destitution, dear sir, destitution is a vice. In poverty you may still retain your innate nobility of soul, but in destitution — never — no-one. For destitution a man is not chased out of human society with a stick, he is swept out with a broom, so as to make it as humiliating as possible; and quite right, too, for in destitution I am the first to humiliate myself. Hence the tavern! Dear sir, a month ago Mr. Lebeziatnikov gave my wife a beating, and my wife is a very different matter from me! Do you understand? Allow me to ask you another question out of simple curiosity: have you ever spent a night on a hay barge, on the Neva?”

“No, I haven’t,” answered Raskolnikov. “What do you mean?”

“Well, I’ve just come from one and it’s the fifth night . . . ” He filled his glass, emptied it and paused. Bits of hay were in fact clinging to his clothes and sticking to his hair. It seemed quite probable that he had not undressed or washed for the last five days. His hands, particularly, were filthy. They were fat and red, with black nails.

His conversation seemed to excite a general though languid interest. The boys at the counter began to snigger. The innkeeper came down from the upper room, apparently on purpose to listen to the “clown” and sat down at a little distance, yawning lazily, but with dignity. Evidently Marmeladov was a familiar figure here, and he had most likely acquired his weakness for high-flown speeches from the habit of frequently entering into conversation with strangers of all sorts in the tavern. This habit develops into a necessity in some drunkards, and especially in those who are looked after strictly and kept in order at home. Hence in the company of other drinkers they try to justify themselves and even if possible obtain respect.

“Clown!” pronounced the innkeeper. “And why don’t ya work, why aren’t ya at the office, if y’are an official?”

“Why am I not at the office, dear sir,” Marmeladov went on, addressing himself exclusively to Raskolnikov, as though it had been he who put that question to him. “Why am I not at the office? Does not my heart ache to think what a useless worm I am? A month ago when Mr. Lebeziatnikov beat my wife with his own hands, and I lay drunk, didn’t I suffer? Excuse me, young man, has it ever happened to you . . . hm . . . well, to ask hopelessly for a loan?”

“Yes, it has. But what do you mean by hopelessly?”

“Hopelessly in the fullest sense, when you know beforehand that you will get nothing by it. You know, for instance, beforehand with positive certainty that this man, this most reputable and exemplary citizen, will on no consideration give you money; and indeed I ask you why should he? For he knows of course that I won’t pay it back. From compassion? But Mr. Lebeziatnikov who keeps up with modern ideas explained the other day that compassion is forbidden nowadays by science itself, and that that’s how it is done now in England, where there is political economy. Why, I ask you, should he give it to me? And knowing beforehand that he won’t, you set off to him and . . . ”

“Why do you go?” put in Raskolnikov.

“But what if there is no-one, nowhere else one can go! For every man must have somewhere to go. Since there are times when one absolutely must go somewhere! When my own daughter first went out with a yellow ticket, then I had to go . . . (for my daughter has a yellow ticket),” he added in parenthesis, looking with a certain uneasiness at the young man. “No matter, sir, no matter!” he went on hurriedly and with apparent composure when both the boys at the counter guffawed and even the innkeeper smiled — “No matter, I am not embarrassed by the wagging of their heads; for every one knows everything about it already, and all that is secret will be revealed. And I accept it all, not with contempt, but with humility. So be it! So be it! ‘Behold the man!’ Excuse me, young man, can you . . . No, to put it more bly and more distinctly; not can you but dare you, looking upon me, assert that I am not a pig?”

The young man did not answer a word.

“Well,” the orator began again persistently and with even more dignity, after waiting for the laughter in the room to subside. “Well, so be it, I am a pig, but she is a lady! I have the semblance of a beast, but Katerina Ivanovna, my spouse, is a person of education and an officer’s daughter. Granted, granted, I am a scoundrel, but she is a woman of a noble heart, full of sentiments, refined by education. And yet . . . oh, if only she pitied me! Dear sir, dear sir, you know every man ought to have at least one place where people pity him! But Katerina Ivanovna, though she is generous, she is unjust . . . And yet, although I realize that when she pulls my hair she does it merely out of pity — for I repeat without being ashamed, she pulls my hair, young man,” he declared with redoubled dignity, hearing the sniggering again — “but, my God, if she would but once . . . But no, no! It’s all in vain and it’s no use talking! No use talking! For more than once, my wish did come true and more than once she has taken pity on me but . . . such is my trait and I am a beast by nature!”

“Rather!” assented the innkeeper yawning. Marmeladov struck his fist resolutely on the table.

“Such is my trait! Do you know, sir, do you know, I have sold her very stockings for drink? Not her shoes — that would be more or less in the order of things, but her stockings, her stockings I have sold for drink! Her mohair shawl I sold for drink, a present to her long ago, her own property, not mine; and we live in a cold room and she caught cold this winter and has begun coughing and spitting blood too. We have three little children and Katerina Ivanovna is at work from morning till night; she is scrubbing and cleaning and washing the children, for she’s been used to cleanliness from childhood. But her chest is weak and she has a tendency to consumption and I feel it! Do you suppose I don’t feel it? And the more I drink the more I feel it. That’s why I drink, to find sympathy and feeling in drink . . . I drink because I want to suffer profoundly!” And as though in despair he laid his head down on the table.

“Young man,” he went on, raising his head again, “in your face I seem to read some kind of sorrow. When you came in I read it, and that was why I addressed you at once. For in unfolding to you the story of my life, I do not wish to make myself a laughing-stock before these idle listeners, who indeed know all about it already, but I am looking for a man of feeling and education. Know then that my wife was educated in a high-class school for the daughters of noble-men, and on leaving she danced the shawl dance before the governor and other personages, for which she was presented with a gold medal and a certificate of merit. The medal . . . well, the medal of course was sold — long ago, hm . . . but the certificate of merit is in her trunk still and not long ago she showed it to our landlady. And although she quarrels with the landlady most continually, yet she wanted to boast to someone or other of her past honors and to tell of the happy days that are gone. I don’t condemn her for it, I don’t condemn her, for the one thing left her is her memories of the past, and all the rest is dust and ashes! Yes, yes, she is a hot-tempered lady, proud and determined. She scrubs the floors herself and has nothing but black bread to eat, but won’t allow herself to be treated with disrespect. That’s why she would not overlook Mr. Lebeziatnikov’s rudeness to her, and so when he gave her a beating for it, she took to her bed more from the hurt to her feelings than from the blows. She was a widow when I married her, with three children, one smaller than the other. She married her first husband, an infantry officer, for love, and ran away with him from her father’s house. She loved her husband very much; but he gave way to cards, wound up in court and with that he died. He used to beat her at the end: and although she didn’t let him get away with it, of which I have authentic documentary evidence, to this day she speaks of him with tears and she throws him up to me; and I am glad, I am glad that, though only in imagination, she should think of herself as having once been happy . . . And she was left at his death with three children in a beastly and remote district where I happened to be at the time; and she was left in such hopeless destitution that, although I have seen many ups and downs of all sorts, I am unable to describe it even. Her relations had all abandoned her. And she was proud, too, excessively proud . . . And then, dear sir, and then, I, being at the time a widower, with a daughter of fourteen left me by my first wife, offered her my hand, for I could not bear the sight of such suffering. You can judge the extremity of her calamities, that she, a woman of education and culture and distinguished family, should have consented to be my wife. But she did! Weeping and sobbing and wringing her hands, she married me! For she had nowhere to turn! Do you understand, dear sir, do you understand what it means when you have absolutely nowhere to turn? No, that you don’t understand yet . . . And for a whole year, I performed my duties conscientiously and faithfully, and did not touch this” (he tapped the jug with his finger), “for I have feelings. But even so, I could not please her; and then I lost my place too, and that through no fault of mine but through changes in the office; and then I did touch it! . . . It will already be a year and a half ago since we found ourselves at last after many wanderings and numerous calamities in this magnificent capital, adorned with innumerable monuments. Here, too, I obtained a position . . . I obtained it and I lost it again. Do you understand? This time it was through my own fault I lost it: for my trait had come out . . . We have now a corner at Amalia Fiodorovna Lippewechsel’s; and what we live upon and what we pay our rent with, I could not say. There are a lot of people living there besides ourselves. A most abominable Sodom . . . hm . . . yes . . . And meanwhile my daughter by my first wife has grown up; and what my daughter has had to put up with from her step-mother whilst she was growing up, I won’t speak of. For, though Katerina Ivanovna is full of generous feelings, she is a high-tempered lady, irritable, and will cut you off ...Yes. But it’s no use going over that! Sonia, as you may well imagine, has had no education. I did make an effort four years ago to give her a course of geography and world history, but as I was not very well up in those subjects myself and we had no suitable manuals, and what books we had . . . hm, anyway, we don’t have them now, those books, so all our instruction came to an end. We stopped at Cyrus of Persia.

Since she has attained years of maturity, she has read other books of novelistic tendency and recently she had read with great interest a book she got through Mr. Lebeziatnikov, Lewes’ Physiology — do you know it? — and even recounted extracts from it to us: and that’s the whole of her education. And now may I venture to address you, dear sir, on my own account with a private question. Do you suppose that a respectable poor girl can earn much by honest work? Not fifteen kopecks a day can she earn, if she is respectable and has no special talent and that without putting her work down for an instant! And what’s more, Ivan Ivanich Klopstock the state councilor — have you heard of him? — has not to this day paid her for the half-dozen Holland shirts she made him and drove her away insulted, stamping and calling her names, on the pretext that the shirt collars were not made the right size and were put in askew. And there are the little ones hungry . . . And Katerina Ivanovna walking up and down and wringing her hands, her cheeks flushed red, as they always are in that disease: ‘You sponger,’ says she, ‘living with us, eating and drinking and keeping warm.’ And much she gets to eat and drink when there is not a crust for the little ones for three days! I was lying at the time . . . well, what of it! I was lying drunk and I heard my Sonia speaking (she is a meek creature with a gentle little voice . . . fair hair and such a pale, thin little face). She said: ‘Katerina Ivanovna, am I really to do a thing like that?’ Daria Frantsevna, an evil-minded woman and very well known to the police, had two or three times already tried to get at her through the landlady. ‘And why not?’ said Katerina Ivanovna with a jeer, ‘what’s there to save? Some treasure!’ But don’t blame her, don’t blame her, dear sir, don’t blame her! She was not in her right mind when she spoke, but driven to distraction by her illness and the crying of the hungry children; and it was said more to wound her than in any precise sense . . . For that’s Katerina Ivanovna’s character, and when children cry, even from hunger, she starts beating them at once. At six o’clock or so I saw Sonechka get up, put on her kerchief, put on her cape, and go out of the room, and about nine o’clock she came back. She walked straight up to Katerina Ivanovna and she laid thirty rubles on the table before her in silence. She did not utter a word, she did not even look at her, she simply picked up our big green woolen shawl (we all use it, this woolen shawl), put it over her head and face and lay down on the bed with her face to the wall; only her little shoulders and her body kept shuddering . . . And I went on lying there, just as before . . . And then I saw, young man, I saw Katerina Ivanovna, in the same silence go up to Sonechka’s little bed; she was on her knees all evening kissing Sonia’s feet, and would not get up, and then they both fell asleep in each other’s arms . . . together, together . . . yes . . . and I . . . lay drunk.”

Marmeladov stopped short, as though his voice had failed him. Then he hurriedly filled his glass, drank, and cleared his throat.

“Since then, sir,” he went on after a brief pause — “Since then, due to an unfortunate occurrence and through information given by evil-intentioned persons — in all of which Daria Frantsevna took a leading part on the pretext that she had been treated with too little respect — since then my daughter Sofia Semionovna has been forced to take a yellow ticket, and owing to that she is unable to go on living with us. For our landlady, Amalia Fiodorovna would not hear of it (though she had backed up Daria Frantsevna before) and Mr. Lebeziatnikov too . . . hm . . . All the trouble between him and Katerina Ivanovna was on Sonia’s account. At first he was after Sonechka himself and then all of a sudden he got into a huff: ‘how,’ said he, ‘can an enlightened man like me live in the same rooms with a girl like that?’ And Katerina Ivanovna would not let it pass, she stood up for her . . . and so that’s how it happened. And Sonechka comes to us now, mostly after dark; she comforts Katerina Ivanovna and gives her all she can . . . She has a room at the tailor Kapernaumov, she rents from them; Kapernaumov is a lame man with a cleft palate and all of his numerous family have cleft palates too. And his wife, too, has a cleft palate. They all live in one room, but Sonia has her own, partitioned off . . . Hm . . . yes . . . very poor people and all with cleft palates . . . yes. As soon as I got up in the morning, I put on my rags, lifted up my hands to heaven and set off to his excellency Ivan Afanasyevich. His excellency Ivan Afanasyevich, do you know him? No? Well, then, it’s a man of God you don’t know. He is wax . . . wax before the face of the Lord; even as wax melteth! . . . He even shed tears when he heard my story. ‘Marmeladov, once already you have deceived my expectations . . . I’ll take you once more on my own responsibility’ — that’s what he said, ‘remember,’ he said, ‘and now you can go.’ I kissed the dust at his feet — in thought only, for in reality he would not have allowed me to do it, being a statesman and a man of modern political and enlightened ideas. I returned home, and when I announced that I’d been taken back into the service and should receive a salary, heavens, what a to-do there was . . . !”

Marmeladov stopped again in violent excitement. At that moment a whole party of drunkards already drunk came in from the street, and the sounds of a hired concertina and the cracked piping voice of a child of seven singing “The Little Farm” were heard in the entryway. The room was filled with noise. The tavern-keeper and the servants were busy with the newcomers. Marmeladov paying no attention to the new arrivals continued his story. He appeared by now to be extremely weak, but as he became more and more drunk, he became more and more talkative. The recollection of his recent success in getting the position seemed to revive him, and was even reflected in a sort of radiance on his face. Raskolnikov listened attentively.

“That was five weeks ago, sir. Yes . . . As soon as Katerina Ivanovna and Sonechka heard of it, Lord, it was as though I stepped into the kingdom of Heaven. It used to be: you can lie like a beast, nothing but abuse. Now they were walking on tiptoe, hushing the children. ‘Semion Zakharovich is tired from his work at the office, he is resting, shh!’ They made me coffee before I went to work and boiled cream for me! They began to get real cream for me, do you hear that? And how they managed to scrape together the money for a decent outfit — eleven rubles, fifty kopecks, I can’t guess. Boots, cotton shirt-fronts — most magnificent, a uniform, they got it all up in splendid style, for eleven rubles and a half. The first morning I came back from the office I found Katerina Ivanovna had cooked two courses for dinner — soup and salt meat with horse radish — which we had never dreamed of until then. She didn’t have any dresses . . . none at all, but she got herself up as though she were going on a visit; and not that she had anything to do it with, they could make everything out of nothing: do the hair nicely, put on a clean collar of some sort, cuffs, and there she was, quite a different person, younger and better looking. Sonechka, my little darling, had only helped with money; ‘for the time,’ she said, ‘it won’t do for me to come and see you too often. After dark maybe when no-one can see.’ Do you hear, do you hear? I lay down for a nap after dinner and what do you think: though Katerina Ivanovna had quarreled to the last degree with our landlady Amalia Fiodorovna only a week before, she could not resist then asking her in for a cup of coffee. For two hours they were sitting, whispering together. ‘Semion Zakharovich is in the service again, now, and receiving a salary,’ says she, ‘and he went himself to his excellency and his excellency himself came out to him, made all the others wait and led Semion Zakharovich by the hand before everybody into his study.’ Do you hear, do you hear? ‘To be sure,’ says he, ‘Semion Zakharovich, remembering your past services,’ says he, ‘and in spite of your propensity to that foolish weakness, since you promise now and since moreover we’ve got on badly without you,’ (do you hear, do you hear!) ‘and so,’ says he, ‘I rely now on your word as a gentleman.’ And all that, let me tell you, she has simply made up for herself, and not simply out of thoughtlessness, for the sake of bragging; no, she believes it all herself, she amuses herself with her own imaginings, upon my word she does! And I don’t blame her for it, no, I don’t blame her! . . . Six days ago when I brought her my first earnings in full — twenty-three rubles forty kopecks altogether — she called me her little one: little one,’ said she, ‘my little one.’ And when we were by ourselves, you understand? You would not think me a beauty, you would not think much of me as a husband, would you? . . . Well, she pinched my cheek; ‘my little one,’ she says.”

Marmeladov broke off, tried to smile, but suddenly his chin began to twitch. He controlled himself however. The tavern, the degraded appearance of the man, the five nights in the hay barge, and the jug of alcohol, and yet this poignant love for his wife and children bewildered his listener. Raskolnikov listened intently but with a sick sensation. He felt vexed that he had come here.

“Dear sir, dear sir,” exclaimed Marmeladov recovering himself — “Oh, sir, perhaps all this seems a laughing matter to you, as it does to others, and perhaps I am only worrying you with the stupidity of all these miserable details of my home life, but it is not a laughing matter to me. For I can feel it all . . . And the whole of that heavenly day of my life and the whole of that evening I passed in fleeting dreams of how I would arrange it all, and how I would dress all the children, and how I would give her rest, and how I would rescue my own daughter from dishonor and restore her to the bosom of her family ... And a great deal more . . . Quite excusable, sir. Well, then, sir” (Marmeladov suddenly gave a sort of start, raised his head and stared fixedly at his listener) “well, on the very next day after all those dreams, that is to say, exactly five days ago, in the evening, by a cunning trick, like a thief in the night, I stole from Katerina Ivanovna the key of her trunk, took out what was left of my earnings, how much it was I have forgotten, and now look at me, all of you! It’s the fifth day since I left home, and they are looking for me there and it’s the end of my employment, and my uniform is lying in a tavern on the Egyptian bridge, exchanged for the garments I have on . . . and it’s the end of everything!”

Marmeladov struck his forehead with his fist, clenched his teeth, closed his eyes and leaned heavily with his elbow on the table. But a minute later his face suddenly changed and with a certain assumed slyness and affectation of bravado, he glanced at Raskolnikov, laughed and said:

“This morning I went to see Sonia, I went to ask her for a hangover drink! He-he-he!”

“You don’t say she gave it to you?” cried one of the newcomers; he shouted the words and went off into a guffaw.

“This very quart was bought with her money,” Marmeladov declared, addressing himself exclusively to Raskolnikov. “Thirty kopecks she gave me with her own hands, her last, all she had, as I saw . . . She said nothing, she only looked at me without a word . . . Not on earth, but up there . . . they grieve so over men, they weep, but they don’t blame them, they don’t blame them! But it hurts more, it hurts more when they don’t blame! Thirty kopecks, yes! And maybe she needs them now, eh? What do you think, my dear sir? For now she’s got to keep up a clean appearance. It costs money, that clean style, a special one, you know? Do you understand? And there’s rouge, too, you see, she must have things; petticoats, starched ones, shoes, too, real jaunty ones to show off her foot when she has to step over a puddle. Do you understand, sir, do you understand what all that cleanliness means? And here I, her own father, here I took thirty kopecks of that money for a drink! And I am drinking it! And I have already drunk it! Come, who will have pity on a man like me, eh? Do you pity me, sir, or not? Tell me, sir, do you pity me or not? He-he-he!”

He would have filled his glass, but there was no drink left. The jug was empty.

“What are you to be pitied for?” shouted the tavern-keeper who was again near them.

Shouts of laughter and even swearing followed. The laughter and the swearing came from those who were listening and also from those who had heard nothing but were simply looking at the figure of the discharged government clerk.

“To be pitied! Why am I to be pitied?” Marmeladov suddenly cried out, standing up with his arm outstretched, positively inspired, as though he had been only waiting for that question.

“Why am I to be pitied, you say? Yes! There’s nothing to pity me for! I ought to be crucified, crucified on a cross, not pitied! Crucify, oh judge, crucify, but when you have crucified, take pity on him! And then I myself will go to be crucified, for it’s not merry-making I seek but tears and tribulation! . . . Do you suppose, you that sell, that this half-bottle of yours has been sweet to me? It was tribulation I sought at the bottom of it, tears and tribulation, and have tasted it, and have found it; but He will pity us Who has had pity on all men, Who has understood all men and all things, He is the One. He too is the judge. He will come in that day and He will ask: ‘Where is the daughter who gave herself for her mean, consumptive step-mother and for the little children of another? Where is the daughter who had pity upon the filthy drunkard, her earthly father, undismayed by his beastliness? ’ And He will say, ‘Come to me! I have already forgiven thee once . . . I have forgiven thee once . . . Thy sins which are many are forgiven thee for thou hast loved much . . . ’ And he will forgive my Sonia, He will forgive, I know it . . . I felt it in my heart when I was with her just now! And He will judge and will forgive all, the good and the evil, the wise and the meek . . . And when He has done with all of them, then He will summon us. ‘You too come forth,’ He will say, ‘Come forth ye drunkards, come forth, ye weak ones, come forth, ye children of shame!’ And we shall all come forth, without shame and shall stand before him. And He will say unto us, ‘Ye are swine, made in the Image of the Beast and with his mark; but come ye also!’ And the wise ones and those of understanding will say, ‘Oh Lord, why dost Thou receive these men?’ And He will say, ‘This is why I receive them, oh ye wise, this is why I receive them, oh ye of understanding, that not one of them believed himself to be worthy of this.’ And He will hold out His hands to us and we shall fall down before him . . . and we shall weep . . . and we shall understand all things! Then we shall understand everything! . . . and all will understand, Katerina Ivanovna even . . . she will understand . . . Lord, Thy kingdom come!” And he sank down on the bench exhausted and weak, looking at no-one, apparently oblivious of his surroundings and plunged in deep thought. His words had created a certain impression; there was a moment of silence; but soon laughter and swearing were heard again.

“Reasoned it all out!”

“Talked himself silly!”

“A fine clerk he is!”

And so on, and so on.

“Let us go, sir,” said Marmeladov suddenly, raising his head and addressing Raskolnikov — “come along with me . . . Kozel’s house, looking into the yard. I’m going to Katerina Ivanovna — time I did.”

Raskolnikov had for some time been wanting to leave, and he himself had meant to help him. Marmeladov was much weaker on his legs than in his speech and leaned heavily on the young man. They had two or three hundred paces to go. The drunken man was more and more overcome by dismay and confusion as they drew nearer the house.

“It’s not Katerina Ivanovna I am afraid of now,” he muttered in agitation — “and that she will begin pulling my hair. What does my hair matter! Forget my hair! That’s what I say! It will even be better if she does begin pulling it, that’s not what I am afraid of . . . it’s her eyes I am afraid of . . . yes, her eyes . . . the red on her cheeks, too, frightens me . . . and her breathing too . . . Have you noticed how people with that disease breathe . . . when they are excited? I am afraid of the children’s crying, too . . . Because if Sonia has not taken them food . . . I don’t know then! I don’t know! But blows I am not afraid of . . . Know, sir, that such blows are not a pain to me, but even an enjoyment. For I myself can’t manage without it . . . It’s better that way. Let her strike me, it relieves her heart . . . it’s better that way . . . There is the house. The house of Kozel, the cabinet maker . . . a German, well-off. Lead the way!”

They went in from the yard and up to the fourth floor. The staircase got darker and darker as they went up. It was nearly eleven o’clock and although in summer in Petersburg there is no real night, yet it was quite dark at the top of the stairs.

A grimy little door at the very top of the stairs stood ajar. A very poor-looking room about ten paces long was lit up by a candle-end; the whole of it was visible from the entrance. It was all in disorder, littered up with rags of all sorts, especially children’s clothes. Across the furthest corner was stretched a sheet with holes in it. Behind it probably was the bed. There was nothing in the room except two chairs and a very shabby sofa covered with oilcloth, before which stood an old pine kitchen-table, unpainted and uncovered. At the edge of the table stood a smoldering tallow-candle in an iron candlestick. It appeared that the family had a room to themselves, not a corner, but their room was practically a passage. The door leading to the other rooms, or rather cupboards, into which Amalia Lippewechsel’s apartment was divided, stood half open, and there was shouting, uproar and laughter within. People seemed to be playing cards and drinking tea there. Words of the most unceremonious kind flew out from time to time.

Raskolnikov recognized Katerina Ivanovna at once. She was terribly emaciated, a rather tall, slim and graceful woman, with magnificent dark blond hair and indeed with a hectic flush in her cheeks. She was pacing up and down in her little room, pressing her hands against her chest; her lips were parched and her breathing came in irregular broken gasps. Her eyes glittered as in fever but looked about with a harsh immovable stare. And that consumptive and excited face with the last flickering light of the candle-end playing upon it made a sickening impression. She seemed to Raskolnikov about thirty years old and was certainly a strange wife for Marmeladov . . . She had not heard them and did not notice them coming in. She seemed to be lost in thought, hearing and seeing nothing. The room was stuffy, but she had not opened the window; a stench rose from the staircase, but the door on to the stairs was not closed. From the inner rooms clouds of tobacco smoke floated in, she kept coughing, but did not close the door. The youngest child, a girl of six, was asleep, sitting curled up on the floor with her head against the sofa. A boy a year older stood crying and shaking in the corner. Probably he had just had a beating. Beside him stood a girl of nine years old, tall and thin as a matchstick, wearing a worn and ragged shirt with an ancient wool wrap flung over her bare shoulders, long outgrown and barely reaching her knees. She stood in the corner next to her little brother, her long arm, as dry as a matchstick, round her brother’s neck. She seemed to be trying to comfort him, whispering something to him, and doing all she could to keep him from whimpering again while at the same time her large dark eyes, which looked larger still from the thinness of her frightened face, were watching her mother with fear. Marmeladov did not enter the door, but dropped on his knees in the very doorway, pushing Raskolnikov in front of him. The woman seeing a stranger stopped absentmindedly facing him, coming to herself for a moment and apparently wondering what he had come for. But evidently she decided that he was going into the next room, since he had to pass through hers to get there. Having figured this out and taking no further notice of him, she walked towards the outer door to close it and uttered a sudden scream on seeing her husband on his knees in the doorway.

“Ah!” she cried out in a frenzy, “he has come back! The criminal! the monster! . . . And where is the money? What’s in your pocket, show me! And your clothes are all different! Where are your clothes? Where is the money! speak!”

And she rushed to search him. Marmeladov submissively and obediently held up both arms to facilitate the search. Not a kopeck was there.

“Where’s the money?” she cried — “Oh Lord, can he have drunk it all? But there were twelve silver rubles left in the chest!” and suddenly, in a fury, she seized him by the hair and dragged him into the room. Marmeladov helped her efforts by meekly crawling along on his knees.

“And this is enjoyment to me! This does not hurt me, but is actually enjoyment, dear sir,” he called out, shaken to and fro by his hair and even once striking the ground with his forehead. The child asleep on the floor woke up, and began to cry. The boy in the corner losing all control began trembling and screaming and rushed to his sister in violent terror, almost in a fit. The eldest girl was shaking like a leaf.

“He’s drunk it! He’s drunk it all,” the poor woman screamed in despair — “and his clothes are gone! And they are hungry, hungry!” — and wringing her hands she pointed to the children. “Oh, accursed life! And you, are you not ashamed?” — she pounced suddenly upon Raskolnikov — “from the tavern! Have you been drinking with him? You have been drinking with him, too! Get out!”

The young man hastened to leave without uttering a word. The inner door, moreover, was thrown wide open and inquisitive faces were peering in. Shameless laughing faces with pipes and cigarettes and heads wearing caps thrust themselves in at the doorway. Further in figures in dressing gowns flung open could be seen, in costumes of unseemly scantiness, some of them with cards in their hands. They were particularly diverted when Marmeladov, dragged about by his hair, shouted that it was enjoyment to him. They even began to come into the room; at last a sinister shrill outcry was heard: this came from Amalia Lippewechsel herself pushing her way forward and trying to restore order in her own way and for the hundredth time to frighten the poor woman by ordering her with coarse abuse to clear out of the room next day. As he went out, Raskolnikov had time to put his hand into his pocket, to snatch up the coppers he had received in exchange for his ruble in the tavern and to lay them unnoticed on the window. Afterwards on the stairs, he changed his mind and wanted to go back.

“What a stupid thing I’ve done,” he thought to himself, “they have Sonia and I need it myself.” But reflecting that it would be impossible to take it back now and that in any case he would not have taken it, he dismissed it with a wave of his hand and went back to his room. “Sonia wants rouge too,” he said as he walked along the street, and he laughed malignantly — “such cleanliness costs money . . . Hm! And maybe our Sonia herself will be bankrupt today, for there is always a risk, hunting big game . . . digging for gold . . . then they would all be without a crust tomorrow except for my money. Bravo Sonia! What a well they’ve dug! And they’re making the most of it! Yes, they are making the most of it! Got used to it. They’ve wept a bit and grown used to it. Man grows used to everything, the scoundrel!”

He sank into thought.

“And what if I am wrong,” he suddenly cried involuntarily. “What if man is not really a scoundrel, man in general, I mean, the whole race of mankind — then all the rest is prejudice, simply artificial terrors and there are no barriers and it’s all as it should be.”

CHAPTER THREE

HE WOKE UP LATE next day after a troubled sleep. But his sleep had not refreshed him; he woke up bilious, irritable, ill-tempered, and looked with hatred at his room. It was a tiny cupboard of a room about six paces in length. It had a poverty-stricken appearance with its dusty yellow paper peeling off the walls, and the ceiling was so low that a man of just a little more than average height was ill at ease in it and kept feeling every moment that he would knock his head against the ceiling. The furniture was in keeping with the room: there were three old chairs, rather rickety; a painted table in the corner on which lay a few books and notebooks; the dust alone that lay thick upon them showed that they had been long untouched. A big clumsy sofa occupied almost the whole of one wall and half the floor space of the room; it was once covered with chintz, but was now in rags and served Raskolnikov as a bed. Often he went to sleep on it, as he was, without undressing, without sheets, wrapped in his old, shabby student’s overcoat, with his head on one little pillow, under which he heaped up all the linen he had, clean and dirty, by way of a bolster. A little table stood in front of the sofa.

It would have been difficult to sink to a lower ebb of slovenliness, but to Raskolnikov in his present state of mind this was even agreeable. He had completely withdrawn from everyone, like a tortoise in its shell, and even the sight of the servant girl who had to wait upon him and looked sometimes into his room made him writhe with nervous irritation. He was in the condition that overtakes some monomaniacs excessively concentrated upon one thing. His landlady had for the last fortnight given up sending him in meals, and he had still not yet thought of expostulating with her, though he went without his dinner. Nastasia, the cook and only servant, was rather pleased at the tenant’s mood and had entirely given up sweeping and doing his room, only once a week or so she would stray into his room with a broom. She woke him up now.

“Get up, why are you asleep!” she called to him. “It’s past nine, I’ve brought you some tea; want a cup? You must be starving?”

The tenant opened his eyes, started and recognized Nastasia.

“From the landlady, eh?” he asked, slowly and with a sickly face sitting up on the sofa.

“From the landlady, indeed!”

She set before him her own cracked teapot full of weak and stale tea and laid two yellow lumps of sugar by the side of it.

“Here, Nastasia, take it please,” he said, fumbling in his pocket (for he had slept in his clothes) and taking out a handful of coppers — “run and buy me a loaf. And get me a little sausage, the cheapest, at the pork-butcher’s.”

“The loaf I’ll fetch you this very minute, but don’t you want some cabbage soup instead of sausage? It’s great soup, yesterday’s. I saved it for you yesterday, but you came in late. It’s fine soup.”

When the soup had been brought, and he had started on it, Nastasia sat down beside him on the sofa and began chatting. She was a country peasant-woman and a very talkative one.

“Praskovia Pavlovna wants to complain to the police about you,” she said.

He winced.

“To the police? What does she want?”

“You don’t pay her money and you won’t move out of the room. It’s clear what she wants.”

“The devil, that’s the last straw,” he muttered, grinding his teeth, “no, that would not suit me . . . just now. She is a fool,” he added aloud. “I’ll go and talk to her today.”

“Fool she is and no mistake, just as I am. But why, if you are so clever, do you lie here like a sack and have nothing to show for it? One time you used to go out, you say, to teach children. But why is it you do nothing now?”

“I am doing . . . ” Raskolnikov began sullenly and reluctantly.

“What are you doing?”

“Work . . . ”

“What sort of work?”

“I am thinking,” he answered seriously after a pause.

Nastasia burst out laughing. She was given to laughter and when anything amused her, she laughed inaudibly, quivering and shaking all over until she felt ill.

“And have you made much money by your thinking?” she managed to articulate at last.

“One can’t go out to give lessons without boots. And who cares.”

“Don’t spit in a well.”

“They pay so little for lessons. What’s the use of a few coppers?” he answered, reluctantly, as though replying to his own thought.

“And you want to get a fortune all at once?”

He looked at her strangely.

“Yes, I want a fortune,” he answered firmly, after a brief pause.

“Easy, easy, or you’ll frighten me! Am I getting you the loaf or not?”

“As you like.”

“Ah, I forgot! A letter came for you yesterday when you were out.”

“A letter? For me! From whom?”

“I don’t know. But I gave three kopecks of my own to the post-man for it. Will you pay me back?”

“Then bring it to me, for God’s sake, bring it,” cried Raskolnikov greatly excited — “good God!”

A minute later the letter was brought him. Just as he thought: from his mother, from the province of R____.

He even turned pale when he took it. It was a long while since he had received a letter, but another feeling also suddenly stabbed his heart.

“Nastasia, leave me alone, for goodness’ sake; here are your three kopecks, but for goodness’ sake, make haste and go!”

The letter was quivering in his hand; he did not want to open it in her presence; he wanted to be left alone with this letter. When Nastasia had gone out, he lifted it quickly to his lips and kissed it; then he gazed intently at the address, the small, sloping handwriting, so dear and familiar, of the mother who had once taught him to read and write. He delayed; he even seemed almost afraid of something. At last he opened it; it was a thick heavy letter, weighing over two ounces, two large sheets of note paper were covered with very small handwriting.

”My dear Rodia,” wrote his mother — “it’s over two months since I last had a talk with you by letter which has distressed me and even kept me awake at night, thinking. But I am sure you will not blame me for my involuntary silence.You know how I love you; you are all we have to look to, Dunia and I, you are our all, our one hope, our one mainstay.What a grief it was to me when I heard that you had given up the university some months ago, for want of means to support yourself and that you had lost your lessons and your other work! How could I help you out of my hundred and twenty rubles a year pension? The fifteen rubles I sent you four months ago I borrowed, as you know, on security of my pension, from Vassily Ivanovich Vakhrushin, our local merchant. He is a kind-hearted man and was a friend of your father’s too. But having given him the right to receive the pension, I had to wait till the debt was paid off and that is only just done, so that I’ve been unable to send you anything all this time. But now, thank God, I believe I will be able to send you something more and in fact we may congratulate ourselves on our good fortune now, of which I hasten to inform you. In the first place, would you have guessed, dear Rodia, that your sister has been living with me for the last six weeks and we will not be separated again in the future.Thank God, her sufferings are over, but I will tell you everything in order, so that you may know just how everything has happened and all that we have until now concealed from you.When you wrote to me two months ago that you had heard that Dunia had a great deal of rudeness to put up with in the Svidrigailovs’ house, when you wrote that and asked me to tell you all the particulars — what could I write in answer to you? If I had written the whole truth to you, I dare say you would have dropped everything and have come to us, even if you had to walk all the way, for I know your character and your feelings, and you would not let your sister be insulted. I was in despair myself, but what could I do? And, besides, I did not know the whole truth myself then.What made it all so difficult was that Dunia received a hundred rubles in advance when she took the place as governess in their family, on condition of part of her salary being deducted every month, and so it was impossible to quit the position without repaying the debt.This sum (now I can explain it all to you, my dearest Rodia) she took chiefly in order to send you sixty rubles, which you needed so badly then and which you received from us last year.We deceived you then, writing that this money came from Dunechka’s savings, but that was not so, and now I tell you all about it, because, thank God, things have suddenly changed for the better, and that you may know how Dunia loves you and what a priceless heart she has. At first indeed Mr. Svidrigailov treated her very rudely and used to make disrespectful and jeering remarks at table . . . But I don’t want to go into all those painful details, so as not to worry you for nothing when it is now all over. In short, in spite of the kind and generous behavior of Marfa Petrovna, Mr. Svidrigailov’s wife, and all the rest of the household, Dunechka had a very hard time, especially when Mr. Svidrigailov, relapsing into his old regimental habits, was under the influence of alcohol. And how do you think it was all explained later on? Would you believe that the madman had conceived a passion for Dunia from the beginning, but had concealed it under a show of rudeness and contempt. Possibly he was ashamed and horrified himself at his own flighty hopes, considering his years and his being the father of a family; and that made him angry with Dunia. And possibly, too, he simply hoped by his rude and sneering behavior to hide the truth from others. But at last he lost all control and dared to make Dunia an open and vile proposal, promising her all sorts of inducements and offering, besides, to drop everything and take her to another estate of his, or even abroad.You can imagine all she suffered! To leave her situation at once was impossible not only on account of the money debt, but also to spare the feelings of Marfa Petrovna, whose suspicions would have been aroused; and then Dunia would have been the cause of a discord in the family. And it would have meant a terrible scandal for Dunechka too; that would have been inevitable. There were various other reasons owing to which Dunia could not hope to escape from that awful house for another six weeks.You know Dunia, of course; you know how clever she is and what a b will she has. Dunechka can endure a great deal and even in the most difficult cases her generous spirit helps her to retain her firmness. She did not even write to me about everything for fear of upsetting me, although we were constantly in communication. It all ended very unexpectedly. Marfa Petrovna accidentally overheard her husband imploring Dunia in the garden, and, putting quite a wrong interpretation on the situation, threw the blame upon her, believing her to be the cause of it all. An awful scene took place between them on the spot in the garden; Marfa Petrovna went so far as to strike Dunia, refused to hear anything and was shouting at her for a whole hour and then gave orders that Dunia should be packed off at once to me in a plain peasant’s cart, into which they flung all her things, her linen and her clothes, all pell-mell, without folding it up and packing it. And a heavy shower of rain came on, too, and Dunia, insulted and put to shame, had to drive with a peasant in an open cart all the seventeen versts into town. Only think now what answer could I have sent to the letter I received from you two months ago and what could I have written? I was in despair; I dared not write to you the truth because you would have been very unhappy, chagrined and indignant, and yet what could you do? You could only perhaps ruin yourself, and, besides, Dunechka would not allow it; and I could not fill up my letter with trifles when my heart was so full of sorrow. For a whole month the town was full of gossip about this scandal, and it came to the point that Dunia and I dared not even go to church on account of the contemptuous looks, whispers, and even remarks made aloud about us. All our acquaintances avoided us, nobody even bowed to us in the street, and I learnt that some store assistants and clerks were intending to insult us in a shameful way, smearing the gates of our house with tar, so that the landlord began to tell us we must leave.The cause of all this was Marfa Petrovna, who managed to slander Dunia and throw dirt at her in every family. She knows everyone in the neighborhood, and that month she was continually coming into the town, and as she is rather talkative and fond of gossiping about her family affairs and particularly of complaining to all and each of her husband — which is not at all right — so in a short time she had spread her story not only in the town, but over the whole surrounding district. It made me ill, but Dunechka was firmer than I was, and if only you could have seen how she endured it all and tried to comfort me and cheer me up! She is an angel! But by God’s mercy, our sufferings were cut short: Mr. Svidrigailov returned to his senses and repented and, probably feeling sorry for Dunia, he laid before Marfa Petrovna a complete and unmistakable proof of Dunechka’s innocence, in the form of a letter Dunia had been forced to write and give to him, before Marfa Petrovna found them in the garden.This letter, which remained in Mr. Svidrigailov’s hands after her departure, she had written to refuse personal explanations and secret meetings, on which he was insisting. In that letter she reproached him with great heat and indignation for the baseness of his behavior in regard to Marfa Petrovna, reminding him that he was the father and head of a family and telling him how vile it was of him to torment and make unhappy a defenseless girl, unhappy enough already. Indeed, dear Rodia, the letter was so nobly and touchingly written that I sobbed when I read it and to this day I cannot read it without tears. Moreover, the evidence of the servants, too, cleared Dunia’s reputation; they had seen and known a great deal more than Mr. Svidrigailov had himself supposed — as indeed is always the case with servants. Marfa Petrovna was completely taken aback, and ‘again crushed’ as she said herself to us, but she was completely convinced of Dunechka’s innocence.The very next day, being Sunday, she went straight to the Cathedral, knelt down and prayed with tears to Our Lady to give her strength to bear this new trial and to do her duty.Then she came straight from the Cathedral to us, told us the whole story, wept bitterly and, fully penitent, she embraced Dunia and besought her to forgive her.The same morning without any delay, she went round to all the houses in the town and everywhere, shedding tears, she asserted in the most flattering terms Dunechka’s innocence and the nobility of her feelings and her behavior.What was more, she showed and read to every one the letter in Dunechka’s own handwriting to Mr. Svidrigailov and even allowed them to take copies of it — which I must say I think was superfluous. In this way she was busy for several days in a row in driving about the whole town, since some people had taken offence that precedence has been given to others, and thus they had to take turns, so that in every house she was expected before she arrived, and everyone knew that on such and such a day Marfa Petrovna would be reading the letter in such and such a place and people assembled for every reading of it, even those who had heard it several times already both in their own houses and in other people’s, taking turns. In my opinion a great deal, a very great deal of all this was unnecessary; but that’s Marfa Petrovna’s character. Anyway she succeeded in completely re-establishing Dunechka’s reputation and the whole vileness of this affair rested as an indelible disgrace upon her husband, as the first person to blame, so that I really began to feel sorry for him; it was really treating the madcap too harshly. Dunia was at once asked to give lessons in several families, but she refused. In general everyone suddenly began to treat her with marked respect. All this did much to bring about that unexpected event by which, one may say, all our fate is now transformed.You must know, dear Rodia, that Dunia has a suitor and that she has already consented to marry him, of which I hasten to tell you as soon as possible. And though the matter has been arranged without asking your consent, I think you will not be aggrieved with me or with your sister on that account, for you will see that it would have been impossible for us to wait and put off our decision till we heard from you. And you could not have judged all the facts without being on the spot.This was how it happened. He is already of the rank of a court councilor, Peter Petrovich Luzhin, and is distantly related to Marfa Petrovna, who has been very active in bringing the match about. He began by expressing through her his desire to make our acquaintance, was properly received, drank coffee with us and the very next day he sent us a letter in which he very courteously explained his offer and begged for a speedy and decided answer. He is a very busy man and is in a great hurry to get to Petersburg, so that every moment is precious to him. At first, of course, we were greatly surprised, as it had all happened so quickly and unexpectedly.We thought and deliberated the whole day. He is a well-to-do man, to be depended upon, he has two posts in the government and has already made his fortune. It is true that he is forty-five years old, but he is of a fairly pleasing appearance and might still be thought attractive by women, and he is altogether a very respectable and presentable man, only he seems a little morose and somewhat haughty. But possibly that may only be the impression he makes at first sight. And beware, dear Rodia, when he comes to Petersburg, as he shortly will do, beware of judging him too rashly and heatedly, as your way is, if there is anything you do not like in him at first sight. I say this just in case, although I feel sure that he will make a favorable impression upon you. Moreover, in order to understand any man one must approach gradually and carefully to avoid forming prejudices and mistaken ideas, which are very difficult to correct and remedy afterwards. And Peter Petrovich, judging by many indications, is a thoroughly estimable man. At his first visit, indeed, he told us that he was a practical man, but still he shares, as he expressed it, many of ‘the convictions of our most rising generation’ and he is an opponent of all prejudices. He said a good deal more, for he seems a little conceited and likes to be listened to, but this is scarcely a vice. I, of course, understood very little of it, but Dunia explained to me that, though he is not a man of great education, he is clever and, it seems, kind.You know your sister’s character, Rodia. She is a resolute, sensible, patient and generous girl, but she has an ardent heart, as I know very well. Of course, there is no great love either on his side or on hers, but Dunia, while a clever girl, is also a noble creature, like an angel, and will make it her duty to make her husband happy who on his side will make her happiness his care, of which we have no good reason to doubt, though it must be admitted the matter has been arranged in great haste. Besides he is a man of great prudence and he will see, to be sure, for himself that his own happiness will be the more secure, the happier Dunechka is with him. And as for some defects of character, for some habits and even certain differences of opinion — which indeed are inevitable even in the happiest marriages — Dunechka has said that, as regards all that, she relies on herself, that there is nothing to be uneasy about, and that she is ready to put up with a great deal, if only their future relationship can be an honest and honorable one. He struck me too, for instance, at first, as rather abrupt, but that may well come from his being an outspoken man, and that is no doubt how it is. For instance, at his second visit, after he had received Dunia’s consent, in the course of conversation, he declared that before making Dunia’s acquaintance, he had made up his mind to marry a girl of good reputation, but without dowry and, above all, one who had experienced poverty, because, as he explained, a man ought not to be indebted to his wife, but that it is better for a wife to look upon her husband as her benefactor. I must add that he expressed it more nicely and politely than I have done, for I have forgotten his actual phrases and only remember the meaning. And, besides, it was obviously not said of design, but slipped out in the heat of conversation, so that he tried afterwards to correct himself and smooth it over, but all the same it did strike me as somewhat rude, and I said so afterwards to Dunia. But Dunia was vexed, and answered that ‘words are not deeds,’ and that, of course, is perfectly true. Dunechka did not sleep all night before she made up her mind, and, thinking that I was asleep, she got out of bed and was walking up and down the room all night; at last she knelt down before the icon and prayed long and fervently and in the morning she told me that she had decided.“I have mentioned already that Peter Petrovich is just setting off for Petersburg, where he has a great deal of business, and he wants to open a legal bureau in Petersburg. He has been occupied for many years in conducting various lawsuits and cases, and only the other day he won an important case. He has to be in Petersburg because he has an important case before the Senate. So, Rodia dear, he may be of the greatest use to you, in every way indeed, and Dunia and I have already agreed that from this very day you could definitely enter upon your career and might consider that your future is marked out and assured for you. Oh, if only this comes to pass! This would be such a benefit that we could only look upon it as a providential blessing. Dunia is dreaming of nothing else.We have even ventured already to drop a few words on the subject to Peter Petrovich. He was cautious in his answer, and said that, of course, as he could not get on without a secretary, it would be better to be paying a salary to a relation than to a stranger, if only the former were fit for the duties (as though there could be doubt of your being fit!) but then he expressed doubts whether your studies at the university would leave you time for work at his office.The matter was dropped for the time, but Dunia is thinking of nothing else now. She has been in a sort of fever for the last few days, and has already made a whole plan for your becoming in the future an associate and even a partner in Peter Petrovich’s law business, which might well be, seeing that you yourself are a student of law. I am in complete agreement with her, Rodia, and share all her plans and hopes, and think there is every probability of realizing them. And in spite of Peter Petrovich’s evasiveness, very natural at present (since he does not know you), Dunia is firmly persuaded that she will gain everything by her good influence over her future husband; this she is sure of. Of course we are careful not to talk of any of these more distant dreams to Peter Petrovich, especially of your becoming his partner. He is a practical man and might take this very coldly, it might all seem to him simply a day dream. Nor has either Dunia or I breathed a word to him of the great hopes we have of his helping us to assist you with money while you are at the university; we have not spoken of it in the first place because it will come to pass of itself, later on, and he himself will no doubt without wasting words offer to do it (as though he could refuse Dunechka that), the more readily since you may by your own efforts become his right hand in the office, and receive this assistance not as a charity, but as a salary earned by your own work. Dunechka wants to arrange it all like this and I quite agree with her. And we have not spoken of our plans for another reason, that is, because I particularly wanted you to feel on an equal footing when you first meet him.When Dunia spoke to him with enthusiasm about you, he answered that one could never judge of a man without seeing him up close, for oneself, and that he would leave it to himself to form his own opinion when he makes your acquaintance. Do you know, my dearest Rodia, I think that perhaps for some reasons (nothing to do with Peter Petrovich though, simply for my own personal, perhaps even old-womanish, whims) I will do better to go on living by myself after the wedding, apart, than with them. I am convinced that he will be generous and delicate enough to invite me and to urge me not to part with my daughter for the future, and if he has said nothing about it until now, it is simply because it has been taken for granted; but I shall refuse. I have noticed more than once in my life that mothers-in-law aren’t quite to husbands’ liking, and I don’t want to be the least bit in anyone’s way, and for my own sake, too, would rather be quite independent, so long as I have a crust of bread of my own, and such children as you and Dunechka. If possible, I would settle somewhere near you both, for the most joyful piece of news, dear Rodia, I have kept for the end of my letter: know then, my dear boy, that we may, perhaps, be all together in a very short time and may embrace one another again after a separation of almost three years! It is settled for certain that Dunia and I are to set off for Petersburg, exactly when I don’t know, but in any case very, very soon, even possibly in a week. It all depends on Peter Petrovich who will let us know when he has had time to look round him in Petersburg.To suit his own arrangements he is anxious to have the ceremony as soon as possible, even before the fast of Our Lady, if it could be managed, or if that is too soon to be ready, immediately after. Oh, with what happiness I shall press you to my heart! Dunia is all excitement at the joyful thought of seeing you, she said one day in jest that she would be ready to marry Peter Petrovich for that alone. She is an angel! She is not writing anything to you now, and has only told me to write that she has so much, so much to tell you that she is not going to take up her pen now, for a few lines would tell you nothing, and it would only mean upsetting herself; she bids me to send you her love and innumerable kisses. But although we will perhaps be meeting so soon, I will all the same send you as much money as I can in a day or two. Now that everyone has heard that Dunechka is to marry Peter Petrovich, my credit has suddenly improved and I know that Afanasy Ivanovich will trust me now even to seventy-five rubles on the security of my pension, so that perhaps I will be able to send you twenty-five or even thirty rubles. I would send you more, but I am uneasy about our traveling expenses; for though Peter Petrovich has been so kind as to undertake part of the expenses of the journey, that is to say, he has taken upon himself the delivery of our bags and big trunk (through some acquaintances of his, somehow), we must take into account some expenses on our arrival in Petersburg, where we can’t be left without any money, at least for the first few days. But we have calculated it all, Dunechka and I, to the last kopeck, and we see that the journey will not cost very much. It is only ninety versts from us to the railway and we have already come to an agreement with a driver we know; and from there Dunechka and I can travel quite comfortably third class. So that I may very likely be able to send to you not twenty-five, but thirty rubles. But enough; I have covered two sheets already and there is no space left for more; our whole history, but so many events have happened! And now, my dearest Rodia, I embrace you and send you a mother’s blessing till we meet. Love Dunia your sister, Rodia; love her as she loves you and understand that she loves you beyond everything, more than herself. She is an angel and you, Rodia, you are everything to us — our one hope, our one consolation. If only you are happy, we shall be happy. Do you still say your prayers, Rodia, and believe in the mercy of our Creator and our Redeemer? I am afraid in my heart that you may have been visited by the new fashionable spirit of unbelief. If it is so, I pray for you. Remember, dear boy, how in your childhood, when your father was living, you used to lisp your prayers at my knee, and how happy we all were in those days. Goodbye, or rather, till we meet — I embrace you warmly, warmly, with countless kisses.

“Yours till death,“PULCHERIA RASKOLNIKOV.” — 

Almost from the first, while he read the letter, Raskolnikov’s face was wet with tears; but when he finished it, his face was pale and distorted and a bitter, wrathful and malignant smile was on his lips. He laid his head down on his threadbare dirty pillow and pondered, pondered a long time. His heart was beating violently, and his thoughts were in a turmoil. At last he felt cramped and stifled in the little yellow room that was like a cupboard or a box. His eyes and his mind craved for space. He took up his hat and went out, this time without dread of meeting anyone; he had forgotten all about that. He turned in the direction of the Vassilyevsky Island, walking along V. Prospect, as though hastening on some business, but he walked, as his habit was, without noticing his way, whispering and even speaking aloud to himself, to the astonishment of the passersby. Many of them took him to be drunk.

CHAPTER FOUR

HIS MOTHER’S LETTER HAD been a torture to him. But as regards the chief, the fundamental fact in it, he had felt not one moment’s hesitation, even while he was reading the letter. The essential question was settled, and irrevocably settled, in his mind: “Never such a marriage while I am alive, and Mr. Luzhin be damned!” “The thing is perfectly clear,” he muttered to himself, with a malignant smile anticipating the triumph of his decision. “No, Mother, no, Dunia, you won’t deceive me! And then they apologize for not asking my advice and for making the decision without me! I dare say! They imagine it is arranged now and can’t be broken off; but we will see whether it can or not! A magnificent excuse: ‘Peter Petrovich is such a busy man, such a busy man that even his wedding has to be rushed, almost express. ’ No, Dunechka, I see it all and I know what that much is that you want to say to me; and I know too what you were thinking about, when you walked up and down all night, and what your prayers were like before the Holy Mother of Kazan who stands in mother’s bedroom. Bitter is the ascent to Golgotha . . .

Hm . . . So it is finally settled; you have determined to marry a rational business man, Avdotia Romanovna, one who has a fortune (has already made his fortune, that is so much more solid and impressive), a man who holds two government posts and who shares the ideas of our most rising generation, as mother writes, and who ‘seems to be kind,’ as Dunechka herself observes. That seems beats everything! And that very Dunechka is marrying that very ‘seems’! Splendid! splendid!

“ . . . But I wonder why mother has written to me about ‘our most rising generation’? Simply as a descriptive touch, or with the idea of predisposing me in favor of Mr. Luzhin? Oh, the cunning of them! I wonder about one other item: how far were they open with one another that day and night and all this time since? Was it all put into words, or did both understand that they had the same thing at heart and in their minds, so that there was no need to speak of it aloud, and better not to speak of it. Most likely it was partly like that, from mother’s letter it’s evident: he struck her as rude, just a little, and mother in her simplicity took her observations to Dunia. And she was sure to be vexed and ‘answered her angrily.’ I should think so! Who would not be furious when it was quite clear without any naive questions and when it was understood that it was useless to discuss it. And why does she write to me, ‘love Dunia, Rodia, and she loves you more than herself’? Has she a secret conscience-prick at sacrificing her daughter to her son? ‘You are our one comfort, you are everything to us.’ Oh, Mother!”

His bitterness grew more and more intense, and if he had happened to meet Mr. Luzhin at the moment, he might have murdered him.

“Hm . . . yes, that’s true,” he continued, pursuing the whirling ideas that chased each other in his brain, “it is true that ‘to get to know a man, one must approach gradually and carefully,’ but there is no mistake about Mr. Luzhin. The chief thing is he is ‘a man of business and seems kind,’ that was something, wasn’t it, to send the bags and big box for them at his own expense! A kind man, no doubt after that! But his bride and her mother are to ride in a peasant’s cart covered with matting (I know, I have been driven in it). No matter! It is only ninety versts and then they can ‘travel very comfortably, third class,’ for a thousand versts! Quite sensible, too. One must cut one’s coat according to one’s cloth, but what about you, Mr. Luzhin? She is your bride . . . And you couldn’t fail to be aware that her mother has to borrow money on her pension for the journey. To be sure it’s a matter of transacting business together, a partnership for mutual benefit, with equal shares and, therefore, expenses; — food and drink in common, but pay for your tobacco, as the proverb goes. But here too the business man has got the better of them. The luggage will cost less than their fares and very likely go for nothing. How is it that they don’t both see all that, or is it that they don’t want to see? And they are pleased, pleased! And to think that this is only the first blossoming, and that the real fruits are to come! For what really matters is not the stinginess, not the tightfistedness, but the tone of the whole thing. For that will be the tone after marriage, it’s a foretaste of it. And mother too, why is she spending recklessly? What will she have by the time she gets to Petersburg? Three silver rubles or two ‘paper ones’ as she says . . . that old woman . . . hm. What does she expect to live on in Petersburg afterwards? She has her reasons already for guessing that she could not live with Dunia after the marriage, even at first. The good man has no doubt let it slip on that subject also, made himself clear, though mother is waving the notion aside with both hands: ‘I will refuse,’ says she. What is she hoping for then? Is she counting on what is left of her hundred and twenty rubles of pension when Afanasy Ivanovich’s debt is paid? She knits woolen shawls and embroiders cuffs, ruining her old eyes. And all her shawls don’t add more than twenty rubles a year to her hundred and twenty, I know that. So she is building all her hopes on Mr. Luzhin’s generosity; ‘he will offer it himself, he will press it on me.’ You’ll have a long wait! That’s how it always is with these Schilleresque noble hearts; till the last moment every goose is a swan with them, till the last moment they hope for good and not ill, and although they have an inkling of the other side of the picture, yet they won’t face the truth till they are forced to; the very thought of it makes them shiver; they thrust the truth away with both hands, until the man they deck out in false colors puts a fool’s cap on them with his own hands. I wonder whether Mr. Luzhin has any orders of merit; I bet he has the Anna in his buttonhole and that he puts it on when he goes to dine with contractors or merchants. He’ll put it on for his wedding, too! Enough of him, devil take him!

“Well . . . Mother, I don’t wonder at, it’s like her, God bless her, but how could Dunia? Dunechka, darling, as though I did not know you! You were nearly twenty when I saw you last: I understood you then. Mother writes that ‘Dunia can put up with a great deal.’ I know that very well. I knew that two years and a half ago, and for the last two and a half years I have been thinking about it, thinking of just that, that ‘Dunia can put up with a great deal.’ If she could put up with Mr. Svidrigailov and all the rest of it, she certainly can put up with a great deal. And now mother and she have taken it into their heads that she can put up with Mr. Luzhin, who propounds the theory of the superiority of wives raised from destitution and owing everything to their husbands’ bounty — who propounds it, too, almost at the first interview. Granted that he ‘let it slip,’ though he is a rational man (so maybe it was not a slip at all, but he meant to make himself clear as soon as possible), but Dunia, Dunia? She understands the man, of course, but she will have to live with the man. Why! She’d live on black bread and water, she would not sell her soul, she would not barter her moral freedom for comfort; she would not barter it for all Schleswig-Holstein, much less Mr. Luzhin’s money. No, Dunia was not that sort when I knew her and . . . she is still the same, of course! Yes, there’s no denying, the Svidrigailovs are a bitter pill! It’s hard to spend one’s life as a governess in the provinces for two hundred rubles, but I know she would rather be a slave on a plantation or a Latvian with a German master, than degrade her soul, and her moral feeling, by binding herself forever to a man whom she does not respect and with whom she has nothing in common — for her own advantage. And if Mr. Luzhin had been made of pure gold, or one huge diamond, she would never have consented to become his legal concubine. Why is she consenting then? What is this? What’s the answer? It’s clear enough: for herself, for her comfort, to save her life she would not sell herself, but for someone else she is doing it! For the one she loves, for the one she adores, she will sell herself! That’s what it all amounts to; for her brother, for her mother, she will sell herself! She will sell everything! In such cases, we squash our moral feeling if necessary, freedom, peace, conscience even, all, all are brought into the street market. goodbye life! If only these our dear ones may be happy. More than that, we become casuists, we learn to be Jesuitical and for a time maybe we can soothe ourselves, we can persuade ourselves that it is, really is one’s duty for a good cause. That’s just like us, it’s as clear as daylight. It’s clear that Rodion Romanovich Raskolnikov is the central figure in the business, and no-one else. Oh, yes, she can ensure his happiness, keep him in the university, make him a partner in the office, make his whole future secure; perhaps he may even be a rich man later on, esteemed, respected, and may even end his life a famous man! But mother? Oh, but it’s all Rodia, dearest Rodia, her first born! For such a son who would not sacrifice even such a daughter! Oh, loving, over-partial hearts! Why, for his sake we would not shrink even from Sonia’s fate. Sonechka, Sonechka Marmeladov, the eternal Sonechka so long as the world lasts. Have you taken the measure of your sacrifice, both of you, have you? Is it right? Can you bear it? Is it any use? Is there sense in it? And let me tell you, Dunechka, Sonechka’s life is no worse than life with Mr. Luzhin. ‘There can be no question of love,’ mother writes. And what if there can be no respect either, if on the contrary there is aversion, contempt, repulsion, what then? Then you will have to ‘keep up your appearance,’ too. Is that not so? Do you understand, do you, do you, what that cleanliness means? Do you understand that the Luzhin cleanliness is just the same thing as Sonechka’s and may be worse, viler, baser, because in your case, Dunechka, it’s a bargain for luxuries, after all, but there it’s simply a question of starvation. ‘It has to be paid for, it has to be paid for, Dunechka, this cleanliness!’ And what if it’s more than you can bear afterwards, if you regret it? The grief, the misery, the curses, the tears hidden from all the world, for you are not a Marfa Petrovna. And how will your mother feel then? Even now she is uneasy, she is worried, but then, when she sees it all clearly? And I? Yes, indeed, what have you taken me for? I won’t have your sacrifice, Dunechka, I won’t have it, Mother! It will not be, so long as I am alive, it will not, it will not! I won’t accept it!”

He suddenly recollected himself and paused.

“It shall not be? But what are you going to do to prevent it? You’ll forbid it? And what right have you? What can you promise them on your side to give you such a right? Your whole life, your whole future, you will devote to them when you have finished your studies and obtained a post? Yes, we have heard all that before, and that’s all words, but now? Now something must be done, now, do you understand that? And what are you doing now? You are robbing them. They borrow on their hundred rubles pension. They borrow from the Svidrigailovs. How are you going to save them from the Svidrigailovs, from Afanasy Ivanovich Vakhrushin, oh, future millionaire, oh Zeus who would arrange their lives for them? In another ten years? In another ten years, mother will be blind with knitting shawls, maybe with weeping too. She will be worn to a shadow with fasting; and my sister? Imagine for a moment what may become of your sister in ten years? What may happen to her during those ten years? Have you guessed?”

So he tortured himself, taunting himself with such questions, and finding a kind of enjoyment in it. And yet all these questions were not new ones suddenly confronting him, they were old familiar aches. It was long since they had first begun to grip and rend his heart. Long, long ago his present anguish had its first beginnings; it had waxed and gathered strength, it had matured and concentrated, until it had taken the form of a horrible, wild and fantastic question, which tortured his heart and mind, clamoring insistently for an answer. Now his mother’s letter had burst on him like a thunderclap. It was clear that he must not now languish and suffer passively, in thought alone, over questions that appeared insoluble, but that he must do something, do it at once, and do it quickly. He must decide on something no matter what, on anything at all, or . . .

“Or renounce life altogether!” he cried suddenly, in a frenzy — “accept one’s lot humbly as it is, once for all and stifle everything in oneself, giving up every right to act, live, and love!”

“Do you understand, dear sir, do you understand what it means when there is absolutely nowhere to go?” Marmeladov’s question of the previous day came suddenly into his mind, “for every man must have somewhere to go . . . ”

He gave a sudden start; another thought, that he had also had yesterday, flashed through his mind. But he did not start at the thought recurring to him, for he knew, he had felt beforehand, that it must ‘flash,’ he was expecting it; besides it was not only yesterday’s thought. The difference was that a month ago, yesterday even, the thought was a mere dream: but now . . . now it appeared not a dream at all, it had taken a new, menacing and completely unfamiliar shape, and he suddenly became aware of this himself . . . He felt a hammering in his head, and eyes were darkened.

He looked round hurriedly, he was searching for something. He wanted to sit down and was looking for a bench; he was walking along K_ Boulevard.

There was a bench about a hundred paces in front of him. He walked towards it as fast he could; but on the way he met with a little adventure which for several minutes absorbed all his attention. Looking for the seat, he had noticed a woman walking some twenty paces in front of him, but at first he took no more notice of her than of other objects that crossed his path. It had happened to him many times already, on the way home, for example, not to notice the road by which he was going, and he was accustomed to walk like that. But there was something so strange about the woman in front of him, so striking even at first sight, that gradually his attention was riveted on her, at first reluctantly and, as it were, resentfully, and then more and more intently. He felt a sudden desire to find out what it was that was so strange about the woman. In the first place, she appeared to be quite a young, and she was walking in the great heat bareheaded and with no parasol or gloves, waving her arms about in an absurd way. She had on a dress of some light silky material, but also put on strangely awry, scarcely fastened, and torn open at the top of the skirt, close to the waist at the back: a great piece was coming apart and hanging loose. A little kerchief was flung about her bare throat, but lay slanting on one side. On top of everything, the girl was walking unsteadily, stumbling and even staggering from side to side. The encounter drew Raskolnikov’s whole attention at last. He overtook the girl at the bench, but, on reaching it, she dropped down on it, in the corner; she let her head sink on the back of the bench and closed her eyes, apparently in extreme exhaustion. Looking at her closely, he realized at once that she was completely drunk. It was a strange and shocking sight. He could hardly believe that he was not mistaken. He saw before him the face of an extremely young, fair-haired girl — sixteen, even perhaps only fifteen years old, pretty little face, but flushed and, as it were, swollen. The girl seemed hardly to know what she was doing; she crossed one leg over the other, lifting it indecorously, and showed every sign of being unconscious that she was in the street.

Raskolnikov did not sit down, but he felt unwilling to leave her, and stood facing her in perplexity. This boulevard is never much frequented; and now, at two o’clock, in the stifling heat, it was quite deserted. And yet on the further side of the boulevard, about fifteen paces away, a gentleman was standing on the edge of the pavement; he, too, would apparently have liked very much to approach the girl with some purpose of his own. He, too, had probably seen her in the distance and had followed her, but found Raskolnikov in his way. He looked angrily at him, though he tried to escape his notice, and stood impatiently biding his time, till the unwelcome ragamuffin should have moved away. His intentions were unmistakable. The gentleman was a fat, thickly-set man, about thirty, full-blooded, with red lips and a little moustache, and very foppishly dressed. Raskolnikov felt furious; he had a sudden longing to insult this fat dandy in some way. He left the girl for a moment and walked towards the gentleman.

“Hey! You Svidrigailov! What do you want here?” he shouted, clenching his fists and laughing, spluttering with rage.

“What do you mean?” the gentleman asked sternly, frowning with haughty astonishment.

“Get away, that’s what I mean.”

“How dare you, you rabble!”

He raised his cane. Raskolnikov rushed at him with his fists, without reflecting even that the stout gentleman was a match for two men like himself. But at that instant someone seized him from behind, and a police constable stood between them.

“That’s enough, gentlemen, no fighting, please, in a public place. What do you want? Who are you?” he asked Raskolnikov sternly, noticing his rags.

Raskolnikov looked at him intently. He had a straight-forward, sensible, soldierly face, with a gray moustache and whiskers.

“You are just the man I want,” Raskolnikov cried, grabbing his arm. “I am a former student, Raskolnikov . . . You may as well know that too,” he added, addressing the gentleman, “come along, I have something to show you.”

And taking the policeman by the hand he dragged him towards the bench.

“Look here, hopelessly drunk, and she has just come down the boulevard. There is no telling who and what she is, but she does not look like a professional. It’s more likely she has been given drink and deceived somewhere . . . for the first time . . . you understand? And they’ve put her out into the street like that. Look at the way her dress is torn, look at the way it has been put on: she’s been dressed by somebody, she hasn’t dressed herself, and dressed by unpracticed hands, by a man’s hands; that’s evident. And now look there: I don’t know that dandy I was going to fight just now, I see him for the first time, but, he, too has seen her on the road, just now, drunk, not knowing what she is doing, and now he is extremely eager to get hold of her, to get her away somewhere while she is in this state . . . that’s certain, believe me, I am not wrong. I saw him myself watching her and following her, but I prevented him, and he is just waiting for me to go away. Now he has walked away a little, and is standing still, pretending to roll a cigarette . . . Think — how can we keep her out of his hands, and how are we to get her home?”

The policeman saw it all in a flash. The stout gentleman was easy to understand, he turned to consider the girl. The policeman bent over to examine her more closely, and his face worked with genuine compassion.

“Ah, what a pity!” he said, shaking his head — “why, she is still a child! She has been deceived, that’s right. Listen, lady,” he began addressing her, “where do you live?” The girl opened her tired and bleary eyes, gazed blankly at the speaker and waved her hand.

“Here,” said Raskolnikov feeling in his pocket and finding twenty kopecks, “here, call a cab and tell him to drive her to her address. The only thing is to find out her address!”

“Young lady, young lady!” the policeman began again, taking the money. “I’ll fetch you a cab and take you home myself. Where shall I take you, eh? Where do you live?”

“Go away! ...Won’t leave me alone,” the girl muttered, and once more waved her hand.

“Ah, ah, how awful! It’s shameful, young lady, it’s a shame!” He shook his head again, shocked, sympathetic and indignant.

“It’s a difficult job,” the policeman said to Raskolnikov, and as he did so, he again looked him up and down in a rapid glance. He, too, must have seemed a strange figure to him: dressed in rags and handing him money!

“Did you find her far from here?” he asked him.

“I tell you she was walking in front of me, staggering, just here, in the boulevard. She only just reached the bench and sank down on it.”

“Ah, the shameful things that are done in the world nowadays, God have mercy on us! An innocent creature like that, drunk already! She has been deceived, that’s a sure thing. See how her dress has been torn too . . . Ah, the vice one sees nowadays! And she probably belongs to gentlefolk too, poor ones maybe . . . There are many like that nowadays. She looks refined, too, as though she were a lady,” and he bent over her once more.

Perhaps he had daughters growing up like that, “looking like ladies and refined” with pretensions to gentility and fashion . . .

“The chief thing is,” Raskolnikov persisted, “to keep her out of this scoundrel’s hands! Why should he too outrage her! It’s as clear as day what he is after; ah, the brute, he is not moving off!”

Raskolnikov spoke aloud and pointed to him. The gentleman heard him, and seemed about to fly into a rage again, but thought better of it, and confined himself to a contemptuous look. He then walked slowly another ten paces away and again halted.

“Keep her out of his hands we can,” said the constable thoughtfully, “if only she’d tell us where to take her, but as it is ...Young lady, hey, young lady!” he bent over her once more.

She opened her eyes fully all of a sudden, looked at him intently, as though realizing something, got up from the bench and started walking away in the direction from which she had come. “Ugh! No shame, won’t leave me alone!” she said, waving her hand again. She walked quickly, though staggering as before. The dandy followed her, but along another avenue, keeping his eye on her.

“Don’t worry, I won’t let him have her,” the policeman said resolutely, and he set off after them.

“Ah, the vice we see nowadays!” he repeated aloud, sighing.

At that moment something seemed to sting Raskolnikov; in an instant everything turned over inside of him.

“Hey, here!” he shouted after the policeman.

The latter turned round.

“Let it be! What’s it to you? Let it go! Let him amuse himself.” He pointed at the dandy, “What do you care?”

The policeman was bewildered, and stared at him open-eyed. Raskolnikov laughed.

“Eh!” said the policeman, with a gesture of contempt, and he walked after the dandy and the girl, probably taking Raskolnikov for a madman or something even worse.

“He has carried off my twenty kopecks,” Raskolnikov murmured angrily when he was left alone. “Well, let him take as much from the other fellow and let him have the girl and so let it end. And why did I want to interfere? Is it for me to help? Have I any right to help? Let them devour each other alive — what is to me? How did I dare to give him twenty kopecks? Were they mine?”

In spite of those strange words he felt very wretched. He sat down on the deserted bench. His thought strayed aimlessly . . . In fact he found it hard to fix his mind on anything at that moment. He longed to forget himself altogether, to forget everything, and then to wake up and begin anew . . .

“Poor girl!” he said, looking at the empty corner where she had sat — “She will come to her senses and weep, and then her mother will find out . . . She will give her a beating, a horrible, shameful beating and then maybe, throw her out . . . And even if she does not, the Daria Frantsevnas will get wind of it, and the girl will soon be slipping out on the sly here and there. Then right away there will be the hospital (that’s always the luck of those girls with respectable mothers, who go wrong on the sly) and then . . . again the hospital . . . drink . . . the taverns . . . and more hospital, in two or three years — a wreck, and her life over at eighteen or nineteen . . . Have not I seen cases like that? And how have they been brought to it? They’ve all come to it like that. Ugh! But what does it matter? That’s as it should be, they tell us. A certain percentage, they tell us, must every year go . . . that way . . . to the devil, I suppose, so that the rest may remain fresh, and not be interfered with. A percentage! What splendid words they have; they are so scientific, so consolatory . . . Once you’ve said ‘percentage,’ there’s nothing more to worry about. If we had any other word . . . maybe we might feel more uneasy . . . But what if Dunechka were one of the percentage! Of another one if not that one?”

“But where am I going?” he thought suddenly. “Strange, I came out for something. As soon as I had read the letter I came out . . . I was going to Vassilyevsky Island, to Razumikhin. That’s what it was . . . now I remember. What for, though? And how is it that the idea of going to Razumikhin flew into my head just now? That’s curious.”

He wondered at himself. Razumikhin was one of his former comrades at the university. It was remarkable that Raskolnikov had hardly any friends at the university; he kept aloof from everyone, went to see no-one, and did not welcome anyone who came to see him, and indeed everyone soon turned away from him too. He took no part in the students’ gatherings, amusements or conversations. He worked with great intensity without sparing himself, and he was respected for this, but no-one liked him. He was very poor, and there was a sort of haughty pride and reserve about him, as though he were keeping something to himself. He seemed to some of his comrades to look down upon them all as children, as though he were superior in development, knowledge and convictions, as though their convictions and interests were beneath him.

With Razumikhin, though, he had for some reason become friends, or, rather, he was more open and communicative with him. Indeed it was impossible to be on any other terms with Razumikhin. He was an exceptionally good-humored and communicative youth, kind to the point of simplicity, though both depth and dignity lay concealed under that simplicity. The better of his comrades understood this, and all loved him. He was a man of no small intelligence, though he was certainly rather a simpleton at times. He was of striking appearance — tall, thin, black-haired and always badly shaved. He was sometimes rowdy and was reputed to be of great physical strength. One night, when out in a festive company, he had with one blow laid a gigantic policeman on his back. There was no limit to his drinking powers, but he could abstain from dri
Download .txt
gitextract_rqtqd7mb/

├── README.md
├── audio_processing.ipynb
├── bert_train.ipynb
├── crime_punishment.txt
├── function.ipynb
├── gradio_practice.ipynb
├── huggingface_gradio.ipynb
├── image_prorcessing.ipynb
├── import.ipynb
├── introduction.ipynb
├── kogpt_gradio.ipynb
├── nlp.ipynb
├── numpy_matplotlib.ipynb
├── packages.ipynb
├── pandas.ipynb
├── pipeline.ipynb
├── pytorch_hub.ipynb
├── requests_gradio.ipynb
├── requests_gradio_stock.ipynb
├── scikit_learn(machine _learning).ipynb
├── sound.ipynb
├── sound_processing.ipynb
├── speech_processing.ipynb
├── string.ipynb
├── stt_gradio.ipynb
├── syntax.ipynb
├── tensorflow_hub.ipynb
├── tts_gradio.ipynb
└── variables.ipynb
Condensed preview — 29 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,310K chars).
[
  {
    "path": "README.md",
    "chars": 184,
    "preview": "# class2022Spring 영어음성학응용 (고려대학교 영어영문학과)\n## [github repository](https://github.com/hsnam95/class2022Spring)\n## [NAMZ cha"
  },
  {
    "path": "audio_processing.ipynb",
    "chars": 5984,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"audio_processing.ipynb\",\n      \""
  },
  {
    "path": "bert_train.ipynb",
    "chars": 77684,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"bert_train.ipynb\",\n      \"proven"
  },
  {
    "path": "crime_punishment.txt",
    "chars": 1165140,
    "preview": "PART ONE\r\n\r\nCHAPTER ONE\r\n\r\nON AN EXCEPTIONALLY HOT evening early in July a young man came out of the tiny room which he "
  },
  {
    "path": "function.ipynb",
    "chars": 1828,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"function.ipynb\",\n      \"provenan"
  },
  {
    "path": "gradio_practice.ipynb",
    "chars": 2343,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"gradio_practice.ipynb\",\n      \"p"
  },
  {
    "path": "huggingface_gradio.ipynb",
    "chars": 12663,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"huggingface_gradio.ipynb\",\n     "
  },
  {
    "path": "image_prorcessing.ipynb",
    "chars": 6008,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"image_prorcessing.ipynb\",\n      "
  },
  {
    "path": "import.ipynb",
    "chars": 30836,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"import.ipynb\",\n      \"provenance"
  },
  {
    "path": "introduction.ipynb",
    "chars": 1009,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"introduction.ipynb\",\n      \"prov"
  },
  {
    "path": "kogpt_gradio.ipynb",
    "chars": 2574,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"kogpt_gradio.ipynb\",\n      \"prov"
  },
  {
    "path": "nlp.ipynb",
    "chars": 20038,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  },
  {
    "path": "numpy_matplotlib.ipynb",
    "chars": 26811,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  },
  {
    "path": "packages.ipynb",
    "chars": 1245,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"packages.ipynb\",\n      \"provenan"
  },
  {
    "path": "pandas.ipynb",
    "chars": 10613,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"pandas.ipynb\",\n      \"provenance"
  },
  {
    "path": "pipeline.ipynb",
    "chars": 8884,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"pipeline.ipynb\",\n      \"provenan"
  },
  {
    "path": "pytorch_hub.ipynb",
    "chars": 2229,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"pytorch_hub.ipynb\",\n      \"prove"
  },
  {
    "path": "requests_gradio.ipynb",
    "chars": 6845,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"requests_gradio.ipynb\",\n      \"p"
  },
  {
    "path": "requests_gradio_stock.ipynb",
    "chars": 7802,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"requests_gradio_stock.ipynb\",\n  "
  },
  {
    "path": "scikit_learn(machine _learning).ipynb",
    "chars": 170054,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"scikit_learn.ipynb\",\n      \"prov"
  },
  {
    "path": "sound.ipynb",
    "chars": 1481953,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  },
  {
    "path": "sound_processing.ipynb",
    "chars": 9216,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"sound_processing.ipynb\",\n      \""
  },
  {
    "path": "speech_processing.ipynb",
    "chars": 144661,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"speech_processing.ipynb\",\n      "
  },
  {
    "path": "string.ipynb",
    "chars": 7760,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  },
  {
    "path": "stt_gradio.ipynb",
    "chars": 4142,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"stt_gradio.ipynb\",\n      \"proven"
  },
  {
    "path": "syntax.ipynb",
    "chars": 6623,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  },
  {
    "path": "tensorflow_hub.ipynb",
    "chars": 3166,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"tensorflow_hub.ipynb\",\n      \"pr"
  },
  {
    "path": "tts_gradio.ipynb",
    "chars": 3503,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"tts_gradio.ipynb\",\n      \"proven"
  },
  {
    "path": "variables.ipynb",
    "chars": 4703,
    "preview": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"l"
  }
]

About this extraction

This page contains the full source code of the hsnam95/class2022Spring GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 29 files (3.1 MB), approximately 807.8k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!