@ -36,7 +36,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 73 ,
"execution_count": 9 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -63,7 +63,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 74 ,
"execution_count": 10 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -82,7 +82,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 75 ,
"execution_count": 11 ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -125,7 +125,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 76 ,
"execution_count": 12 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -150,7 +150,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 77 ,
"execution_count": 13 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -169,7 +169,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 78 ,
"execution_count": 14 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -193,7 +193,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 79 ,
"execution_count": 15 ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
@ -205,7 +205,7 @@
}
}
],
],
"source": [
"source": [
"x = list(zip(vect.get_feature_names(), np.ravel(train_data.sum(axis=0))))\n",
"x = list(zip(vect.get_feature_names_out (), np.ravel(train_data.sum(axis=0))))\n",
"def SortbyTF(inputStr):\n",
"def SortbyTF(inputStr):\n",
" return inputStr[1]\n",
" return inputStr[1]\n",
"x.sort(key=SortbyTF, reverse = True)\n",
"x.sort(key=SortbyTF, reverse = True)\n",
@ -222,7 +222,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 80 ,
"execution_count": 16 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -250,14 +250,14 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 8 1,
"execution_count": 17 ,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
" I 'll take a wild guess and say freedom is object valuabl . I base thi on the assumpt that if everyon in the world were depriv utterli of their freedom ( so that their everi act wa contrari to their volit ) , almost all would want to complain . therefor I take it that to assert or believ that `` freedom is not veri valuabl '' , when almost everyon can see that it is , is everi bit as absurd as to assert `` it is not rain '' on a raini day . I take thi to be a candid for an object valu , and it it is a necessari condit for object moral that object valu such as thi exist .\n"
" i 'll take a wild guess and say freedom is object valuabl . i base thi on the assumpt that if everyon in the world were depriv utterli of their freedom ( so that their everi act wa contrari to their volit ) , almost all would want to complain . therefor i take it that to assert or believ that `` freedom is not veri valuabl '' , when almost everyon can see that it is , is everi bit as absurd as to assert `` it is not rain '' on a raini day . i take thi to be a candid for an object valu , and it it is a necessari condit for object moral that object valu such as thi exist .\n"
]
]
}
}
],
],
@ -293,7 +293,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 82 ,
"execution_count": 1 8,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -342,7 +342,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 83 ,
"execution_count": 19 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -359,7 +359,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 84 ,
"execution_count": 20 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -377,7 +377,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 85 ,
"execution_count": 21 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -393,7 +393,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 86 ,
"execution_count": 22 ,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
@ -410,7 +410,7 @@
],
],
"metadata": {
"metadata": {
"kernelspec": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel) ",
"language": "python",
"language": "python",
"name": "python3"
"name": "python3"
},
},
@ -424,7 +424,7 @@
"name": "python",
"name": "python",
"nbconvert_exporter": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"pygments_lexer": "ipython3",
"version": "3.8. 3"
"version": "3.9.1 3"
}
}
},
},
"nbformat": 4,
"nbformat": 4,