两道新题

This commit is contained in:
2026-07-08 21:58:01 +08:00
parent 6cfdd8b55a
commit 3efdca98e6
4 changed files with 1299 additions and 20 deletions
+137 -8
View File
@@ -4,7 +4,11 @@
"cell_type": "code",
"id": "initial_id",
"metadata": {
"collapsed": true
"collapsed": true,
"ExecuteTime": {
"end_time": "2026-07-05T15:05:59.049967188Z",
"start_time": "2026-07-05T15:05:56.833387637Z"
}
},
"source": [
"import os\n",
@@ -17,10 +21,15 @@
"from tqdm import tqdm"
],
"outputs": [],
"execution_count": null
"execution_count": 2
},
{
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-05T15:05:59.150289671Z",
"start_time": "2026-07-05T15:05:59.051997256Z"
}
},
"cell_type": "code",
"source": [
"train_df = pd.read_csv('./train.csv')\n",
@@ -30,16 +39,136 @@
"print(f\"Train: {len(train_df)}, Val: {len(val_df)}, Test: {len(test_df)}\")"
],
"id": "f32065752f1597fb",
"outputs": [],
"execution_count": null
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Train: 10908, Val: 1212, Test: 5195\n"
]
}
],
"execution_count": 3
},
{
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2026-07-05T15:05:59.184794043Z",
"start_time": "2026-07-05T15:05:59.156968452Z"
}
},
"cell_type": "code",
"source": "train_df.head()",
"id": "460c6fffc81814df",
"outputs": [],
"execution_count": null
"outputs": [
{
"data": {
"text/plain": [
" id premise \\\n",
"9989 6417481c8d यद्यपि हम आज के समय में अल कायदा के साथ केएसएए... \n",
"3880 5c5ca34cf6 'Upload him into his body? What body?' \n",
"8559 1d3c28ecff yeah and then about every five years you have ... \n",
"6316 22e2a4903d θέλω να πω ότι υπήρχε είχα, είχα το ρολόι μου ... \n",
"762 307016c21f Yet, in the mouths of the white townsfolk of S... \n",
"\n",
" hypothesis lang_abv language \\\n",
"9989 हर व्यक्ति केएसएम को हमेशा अल कायदा के बराबर म... hi Hindi \n",
"3880 I don't think he has a body at all. en English \n",
"8559 You have to dig them up every five years, thro... en English \n",
"6316 Ήταν ενοχλητικό όταν κάλυψε τα παπούτσια μου. el Greek \n",
"762 White townsfolk in Salisbury, N.C. are easily ... en English \n",
"\n",
" label \n",
"9989 2 \n",
"3880 1 \n",
"8559 1 \n",
"6316 1 \n",
"762 1 "
],
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>premise</th>\n",
" <th>hypothesis</th>\n",
" <th>lang_abv</th>\n",
" <th>language</th>\n",
" <th>label</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>9989</th>\n",
" <td>6417481c8d</td>\n",
" <td>यद्यपि हम आज के समय में अल कायदा के साथ केएसएए...</td>\n",
" <td>हर व्यक्ति केएसएम को हमेशा अल कायदा के बराबर म...</td>\n",
" <td>hi</td>\n",
" <td>Hindi</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3880</th>\n",
" <td>5c5ca34cf6</td>\n",
" <td>'Upload him into his body? What body?'</td>\n",
" <td>I don't think he has a body at all.</td>\n",
" <td>en</td>\n",
" <td>English</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8559</th>\n",
" <td>1d3c28ecff</td>\n",
" <td>yeah and then about every five years you have ...</td>\n",
" <td>You have to dig them up every five years, thro...</td>\n",
" <td>en</td>\n",
" <td>English</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6316</th>\n",
" <td>22e2a4903d</td>\n",
" <td>θέλω να πω ότι υπήρχε είχα, είχα το ρολόι μου ...</td>\n",
" <td>Ήταν ενοχλητικό όταν κάλυψε τα παπούτσια μου.</td>\n",
" <td>el</td>\n",
" <td>Greek</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>762</th>\n",
" <td>307016c21f</td>\n",
" <td>Yet, in the mouths of the white townsfolk of S...</td>\n",
" <td>White townsfolk in Salisbury, N.C. are easily ...</td>\n",
" <td>en</td>\n",
" <td>English</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 4
},
{
"metadata": {