peer_final

parent fe499707
...@@ -690,7 +690,7 @@ ...@@ -690,7 +690,7 @@
"id": "8enyE6NkZpga" "id": "8enyE6NkZpga"
}, },
"source": [ "source": [
"In the text part we observe that there are parts that don't correspond to the lines of the actor. For example, brackets that signal the end of the scene. Thus, we find those lines and clean them." "In the text part we observe that there are parts that don't correspond to the lines of the actor. For example, brackets that signal the end of the scene. We find those lines and we clean them."
] ]
}, },
{ {
...@@ -984,7 +984,7 @@ ...@@ -984,7 +984,7 @@
"id": "YymrAyeSdAYD" "id": "YymrAyeSdAYD"
}, },
"source": [ "source": [
"Having this, we can finally tonenize the cleaned text." "Having this, we can finally tokenize the cleaned text. One token corresponds to one word."
] ]
}, },
{ {
...@@ -1241,7 +1241,7 @@ ...@@ -1241,7 +1241,7 @@
"id": "i8OnTdHVdGjh" "id": "i8OnTdHVdGjh"
}, },
"source": [ "source": [
"With the text tonenized for every word, we can count all the tokens to know the ammount of words in each line." "With the text tonenized, we can count the tokens to know the ammount of words in each line."
] ]
}, },
{ {
...@@ -1653,7 +1653,7 @@ ...@@ -1653,7 +1653,7 @@
"id": "_XhOAvWtexeq" "id": "_XhOAvWtexeq"
}, },
"source": [ "source": [
"We check if all the characters in the description have actual lines. We find that although DAME CLAUDE is in the scenes she doesn't have any lines." "We check if all the characters in the book's description have actual lines. We find that although DAME CLAUDE is in the scenes she doesn't have any lines."
] ]
}, },
{ {
...@@ -1701,7 +1701,7 @@ ...@@ -1701,7 +1701,7 @@
"id": "76yTHt5qjSV-" "id": "76yTHt5qjSV-"
}, },
"source": [ "source": [
"To obtain percentages for every actor for every scene it is necessary to group the data and compute the fractions." "To obtain percentages for every actor for every scene it is necessary to group the data and divide it by the total ammount of lines in each scene."
] ]
}, },
{ {
...@@ -1898,9 +1898,9 @@ ...@@ -1898,9 +1898,9 @@
"id": "r_WK67XM1TXA" "id": "r_WK67XM1TXA"
}, },
"source": [ "source": [
"We also need to know how big is the scene in terms of number of words, compared with other scenes in the play.\n", "We also need to know how big is the scene in terms of number of words, compared to other scenes in the play.\n",
"\n", "\n",
"We normalize the obtained value by the value of the highest scene in all acts in order to obtain a value for each escene that is proportional to the length of the highest scene in the play." "We find the width of every scene taking its total number of words and dividing it by the value of the longest scene in all acts."
] ]
}, },
{ {
...@@ -2123,9 +2123,9 @@ ...@@ -2123,9 +2123,9 @@
"source": [ "source": [
"We display the graph with the information of the number of words per act per scene. \n", "We display the graph with the information of the number of words per act per scene. \n",
"\n", "\n",
"Each bar represents a scene. And inside each bar there is a section for all the actors in the scene that said something, proportional to the total ammount of words said in that scene. \n", "Each bar represents a scene. And inside each bar there is a section for all the actors that said something in the scene. Each section is proportional to the total ammount of words said in the scene. \n",
"\n", "\n",
"The width of each bar represents, how long is the scene when it is compared with all the other scenes in number of words. So the thicker the bar, the higher the ammount of words said in the scene." "The width of each bar represents, how long is the scene when it is compared to all the other scenes in terms of number of words. So the thicker the bar, the larger the ammount of words said in the scene."
] ]
}, },
{ {
...@@ -2225,7 +2225,7 @@ ...@@ -2225,7 +2225,7 @@
"id": "d7_zG_COsBum" "id": "d7_zG_COsBum"
}, },
"source": [ "source": [
"To display the graph of interactions. We assume that, in every scene, each time an actor speaks all the other actors in the scene are going to hear it. With that in mind we create a list of all the lines, with the author that says it as source, and all the other actors in the scene as the destination. " "To display the graph of interactions. We assume that, in every scene, each time an actor speaks all the other actors in the scene are hearing the line. With that in mind we create a list of all the lines, with the author that says it as source, and all the other actors in the scene as the destination. "
] ]
}, },
{ {
...@@ -2377,9 +2377,7 @@ ...@@ -2377,9 +2377,7 @@
" adj[dc[record[1]]][dc[acteur_ecoute.strip()]] += record[2]\n", " adj[dc[record[1]]][dc[acteur_ecoute.strip()]] += record[2]\n",
"print('\\n'.join(['\\t'.join([str(cell) for cell in row]) for row in adj]))\n", "print('\\n'.join(['\\t'.join([str(cell) for cell in row]) for row in adj]))\n",
"max_node_size = np.max(adj*np.identity(len(dc),dtype=int))\n", "max_node_size = np.max(adj*np.identity(len(dc),dtype=int))\n",
"max_edge_w = np.max(adj*((np.identity(len(dc),dtype=int)-1)**2))\n", "max_edge_w = np.max(adj*((np.identity(len(dc),dtype=int)-1)**2))"
"print(max_node_size)\n",
"print(max_edge_w)"
] ]
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment