|
28 | 28 | }, |
29 | 29 | { |
30 | 30 | "cell_type": "code", |
31 | | - "execution_count": 4, |
| 31 | + "execution_count": 3, |
| 32 | + "metadata": {}, |
| 33 | + "outputs": [ |
| 34 | + { |
| 35 | + "name": "stdout", |
| 36 | + "output_type": "stream", |
| 37 | + "text": [ |
| 38 | + "Python 3.12.7\n" |
| 39 | + ] |
| 40 | + } |
| 41 | + ], |
| 42 | + "source": [ |
| 43 | + "!python --version" |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "cell_type": "code", |
| 48 | + "execution_count": 7, |
32 | 49 | "metadata": {}, |
33 | 50 | "outputs": [ |
34 | 51 | { |
|
37 | 54 | "text": [ |
38 | 55 | "\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
39 | 56 | "\u001b[0m\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
40 | | - "\u001b[0mCollecting faststylometry\n", |
41 | | - " Using cached faststylometry-1.0.7-py3-none-any.whl.metadata (12 kB)\n", |
42 | | - "Requirement already satisfied: numpy>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (2.3.1)\n", |
43 | | - "Requirement already satisfied: pandas>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (2.3.1)\n", |
44 | | - "Requirement already satisfied: scikit-learn>=1.7.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (1.7.1)\n", |
45 | | - "Requirement already satisfied: wget>=3.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry) (3.2)\n", |
46 | | - "Requirement already satisfied: python-dateutil>=2.8.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2.9.0.post0)\n", |
47 | | - "Requirement already satisfied: pytz>=2020.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2024.1)\n", |
48 | | - "Requirement already satisfied: tzdata>=2022.7 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry) (2023.3)\n", |
49 | | - "Requirement already satisfied: scipy>=1.8.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (1.16.0)\n", |
50 | | - "Requirement already satisfied: joblib>=1.2.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (1.4.2)\n", |
51 | | - "Requirement already satisfied: threadpoolctl>=3.1.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry) (3.5.0)\n", |
52 | | - "Requirement already satisfied: six>=1.5 in /home/thomas/anaconda3/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas>=2.3.1->faststylometry) (1.16.0)\n", |
53 | | - "Using cached faststylometry-1.0.7-py3-none-any.whl (18 kB)\n", |
| 57 | + "\u001b[0mCollecting faststylometry==1.0.13\n", |
| 58 | + " Downloading faststylometry-1.0.13-py3-none-any.whl.metadata (14 kB)\n", |
| 59 | + "Requirement already satisfied: numpy>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (2.3.1)\n", |
| 60 | + "Requirement already satisfied: pandas>=2.3.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (2.3.1)\n", |
| 61 | + "Requirement already satisfied: scikit-learn>=1.7.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (1.7.1)\n", |
| 62 | + "Requirement already satisfied: wget>=3.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from faststylometry==1.0.13) (3.2)\n", |
| 63 | + "Requirement already satisfied: python-dateutil>=2.8.2 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2.9.0.post0)\n", |
| 64 | + "Requirement already satisfied: pytz>=2020.1 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2024.1)\n", |
| 65 | + "Requirement already satisfied: tzdata>=2022.7 in /home/thomas/anaconda3/lib/python3.12/site-packages (from pandas>=2.3.1->faststylometry==1.0.13) (2023.3)\n", |
| 66 | + "Requirement already satisfied: scipy>=1.8.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (1.16.0)\n", |
| 67 | + "Requirement already satisfied: joblib>=1.2.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (1.4.2)\n", |
| 68 | + "Requirement already satisfied: threadpoolctl>=3.1.0 in /home/thomas/anaconda3/lib/python3.12/site-packages (from scikit-learn>=1.7.1->faststylometry==1.0.13) (3.5.0)\n", |
| 69 | + "Requirement already satisfied: six>=1.5 in /home/thomas/anaconda3/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas>=2.3.1->faststylometry==1.0.13) (1.16.0)\n", |
| 70 | + "Downloading faststylometry-1.0.13-py3-none-any.whl (19 kB)\n", |
54 | 71 | "\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
55 | 72 | "\u001b[0mInstalling collected packages: faststylometry\n", |
| 73 | + " Attempting uninstall: faststylometry\n", |
| 74 | + "\u001b[33m WARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
| 75 | + "\u001b[0m Found existing installation: faststylometry 1.0.11\n", |
| 76 | + " Uninstalling faststylometry-1.0.11:\n", |
| 77 | + " Successfully uninstalled faststylometry-1.0.11\n", |
56 | 78 | "\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
57 | | - "\u001b[0mSuccessfully installed faststylometry-1.0.7\n", |
| 79 | + "\u001b[0mSuccessfully installed faststylometry-1.0.13\n", |
58 | 80 | "\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
59 | 81 | "\u001b[0m\u001b[33mWARNING: Ignoring invalid distribution ~rotobuf (/home/thomas/anaconda3/lib/python3.12/site-packages)\u001b[0m\u001b[33m\n", |
60 | 82 | "\u001b[0m" |
61 | 83 | ] |
62 | 84 | } |
63 | 85 | ], |
64 | 86 | "source": [ |
65 | | - "!pip install faststylometry" |
| 87 | + "!pip install faststylometry==1.0.13" |
66 | 88 | ] |
67 | 89 | }, |
68 | 90 | { |
69 | 91 | "cell_type": "code", |
70 | | - "execution_count": 5, |
| 92 | + "execution_count": 9, |
71 | 93 | "metadata": { |
72 | 94 | "scrolled": true |
73 | 95 | }, |
|
126 | 148 | " if await self.run_code(code, result, async_=asy):\n", |
127 | 149 | " File \"/home/thomas/anaconda3/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3577, in run_code\n", |
128 | 150 | " exec(code_obj, self.user_global_ns, self.user_ns)\n", |
129 | | - " File \"/tmp/ipykernel_127318/1668831037.py\", line 1, in <module>\n", |
| 151 | + " File \"/tmp/ipykernel_130328/1668831037.py\", line 1, in <module>\n", |
130 | 152 | " from faststylometry import Corpus\n", |
131 | 153 | " File \"/home/thomas/anaconda3/lib/python3.12/site-packages/faststylometry/__init__.py\", line 37, in <module>\n", |
132 | 154 | " from faststylometry.probability import predict_proba, calibrate, get_calibration_curve\n", |
|
170 | 192 | "traceback": [ |
171 | 193 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
172 | 194 | "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", |
173 | | - "Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m load_corpus_from_folder\n", |
| 195 | + "Cell \u001b[0;32mIn[9], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m load_corpus_from_folder\n", |
174 | 196 | "File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/faststylometry/__init__.py:37\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01men\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tokenise_remove_pronouns_en\n\u001b[1;32m 36\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mburrows_delta\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m calculate_burrows_delta\n\u001b[0;32m---> 37\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprobability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m predict_proba, calibrate, get_calibration_curve\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexamples\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m download_examples\n", |
175 | 197 | "File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/faststylometry/probability.py:32\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 31\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpandas\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpd\u001b[39;00m\n\u001b[0;32m---> 32\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlinear_model\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m LogisticRegression\n\u001b[1;32m 34\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mburrows_delta\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m calculate_burrows_delta\n\u001b[1;32m 35\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfaststylometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcorpus\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Corpus\n", |
176 | 198 | "File \u001b[0;32m~/anaconda3/lib/python3.12/site-packages/sklearn/__init__.py:73\u001b[0m\n\u001b[1;32m 62\u001b[0m \u001b[38;5;66;03m# `_distributor_init` allows distributors to run custom init code.\u001b[39;00m\n\u001b[1;32m 63\u001b[0m \u001b[38;5;66;03m# For instance, for the Windows wheel, this is used to pre-load the\u001b[39;00m\n\u001b[1;32m 64\u001b[0m \u001b[38;5;66;03m# vcomp shared library runtime for OpenMP embedded in the sklearn/.libs\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[38;5;66;03m# later is linked to the OpenMP runtime to make it possible to introspect\u001b[39;00m\n\u001b[1;32m 68\u001b[0m \u001b[38;5;66;03m# it and importing it first would fail if the OpenMP dll cannot be found.\u001b[39;00m\n\u001b[1;32m 69\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ( \u001b[38;5;66;03m# noqa: F401 E402\u001b[39;00m\n\u001b[1;32m 70\u001b[0m __check_build,\n\u001b[1;32m 71\u001b[0m _distributor_init,\n\u001b[1;32m 72\u001b[0m )\n\u001b[0;32m---> 73\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbase\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m clone \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[1;32m 74\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mutils\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_show_versions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m show_versions \u001b[38;5;66;03m# noqa: E402\u001b[39;00m\n\u001b[1;32m 76\u001b[0m _submodules \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m 77\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcalibration\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 78\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcluster\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 114\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcompose\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 115\u001b[0m ]\n", |
|
0 commit comments