{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import spacy\n", "from spacy import displacy" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "text = \"\"\"\n", "ANSWER: None QUESTION: Please tell us your full name.\n", "\n", "ANSWER: Marie Zosnika Schwartzman.\n", "\n", "QUESTION: And where were you born?\n", "\n", "ANSWER: In Paris . Day, August 21st, 1925.\n", "\n", "QUESTION: Let's talk about your family. What was your father's name?\n", "\n", "ANSWER: Avram.\n", "\n", "QUESTION: And what did he do?\n", "\n", "ANSWER: He was like a clothes designer.\n", "\n", "QUESTION: And where -- where did he come from?\n", "\n", "ANSWER: Poland .\n", "\n", "QUESTION: What -- what city in Poland ?\n", "\n", "ANSWER: Ciechanow . Don't ask me to spell it.\n", "\n", "QUESTION: Okay. And you -- ANSWER: But I think it's in the thing there.\n", "\n", "QUESTION: And what was your mother's name?\n", "\n", "ANSWER: Tovah.\n", "\n", "QUESTION: And her maiden name? Do you know that?\n", "\n", "ANSWER: Mifda (phonetic). Q: And where was she from originally?\n", "\n", "ANSWER: The same town , Ciechanow .\n", "\n", "QUESTION: Uh-huh. And was your family a very religious family?\n", "\n", "ANSWER: I don't think so. Not my father anyway. He was not religious. I think my mother was a little bit more religious. But we were not raised religiously. Just we kept to traditions and that's it.\n", "\n", "QUESTION: Now, you said you were born in Paris .\n", "\n", "ANSWER: Yes.\n", "\n", "QUESTION: When did your family come to Paris ?\n", "\n", "ANSWER: In 1922.\n", "\n", "QUESTION: What brought them there?\n", "\n", "ANSWER: My father came much earlier. And my family -- my mother joined with my oldest sister in Paris -- to Paris .\n", "\n", "QUESTION: What brought your father to Paris ?\n", "\n", "ANSWER: I think the Army, to a certain extent, and a job, a good job.\n", "\n", "QUESTION: How large was your family?\n", "\n", "ANSWER: Well, I had four sisters, two brothers, and my mother and father. I had a lot of family in Poland ; my grandparents, my aunts, my uncles, my cousins.\n", "\n", "QUESTION: But you were born in Paris . Did you go back to Poland to visit?\n", "\n", "ANSWER: Yes, my grandfather, we went to visit.\n", "\n", "QUESTION: And you stayed with large extended family there?\n", "\n", "ANSWER: Yes, my grandfather didn't make my mother go home , go back.\n", "\n", "QUESTION: He wanted her to stay?\n", "\n", "ANSWER: Yes.\n", "\n", "QUESTION: Yeah. And so where were you in the order of children? Were you the second?\n", "\n", "ANSWER: Second.\n", "\n", "QUESTION: You were the second child?\n", "\n", "ANSWER: Right.\n", "\n", "QUESTION: Yeah. And what kind of neighborhood did you live in in Paris ?\n", "\n", "ANSWER: We lived in a mixed neighborhood .\n", "\n", "QUESTION: Non-Jews and -- ANSWER: Non-Jews and Jews.\n", "\n", "QUESTION: Uh-huh. And did you have non-Jewish friends?\n", "\n", "ANSWER: Yes. Actually, I was -- when I came back from the camp , I lived with my friend I went to school with when we was six and a half years old.\n", "\n", "QUESTION: Uh-huh.\n", "\n", "ANSWER: And she was Catholic.\n", "\n", "QUESTION: Uh-huh.\n", "\n", "ANSWER: My Jewish family didn't have room for me.\n", "\n", "QUESTION: Uh-huh. Let's talk a little bit about your schooling. When did you begin school ? How old were you?\n", "\n", "ANSWER: We begin school early in France . We go to first the maternelle, which was maybe about three years old. And the -- QUESTION: Is this a public school ?\n", "\n", "ANSWER: Yes.\n", "\n", "QUESTION: So there were Jews and non-Jews in your class?\n", "\n", "ANSWER: Yes, Jews and non-Jews. But mostly there were non-Jews in my school . And then first grade, we start -- I think I was six, six and a half. And when I was arrested, I was in lycee . And didn't finish my education, therefore. Q: Yeah. Yeah.\n", "\n", "ANSWER: Six years.\n", "\n", "QUESTION: Yeah. We'll get to that in a few minutes. So you -- you went to a regular public school .\n", "\n", "ANSWER: Uh-huh.\n", "\n", "QUESTION: That's now what we call elementary school .\n", "\n", "ANSWER: Yes.\n", "\n", "QUESTION: Was there any problems there? You said 1t was mixed.\n", "\n", "ANSWER: Yeah. No problem.\n", "\n", "QUESTION: No problems?\n", "\n", "ANSWER: No.\n", "\n", "QUESTION: You were accepted?\n", "\n", "ANSWER: Yes. No problem. On the contrary, our teachers liked us very much. We were five girls in the same school , because we had girls' schools and boys' schools . It was not mixed schools . And the -- my principal, when we were arrested, came every single day to see if there were news from us. So it was no problem at all.\n", "\n", "QUESTION: Uh-huh. What kind of neighborhood did you live in? Was it upper class or middle class neighborhood?\n", "\n", "ANSWER: Probably middle class, I would say.\n", "\n", "QUESTION: Uh-huh. Did you live in a house or an apartment ?\n", "\n", "ANSWER: A house .\n", "\n", "QUESTION: And was it in the center of the city or the outskirts?\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "nlp = spacy.load(\"training/md/model-best/\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "doc = nlp(text)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " ANSWER : None QUESTION : Please tell us your full name . \n", "\n", " ANSWER : Marie Zosnika Schwartzman . \n", "\n", " QUESTION : And where were you born ? \n", "\n", " ANSWER : In \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ". Day , August 21st , 1925 . \n", "\n", " QUESTION : Let 's talk about your family . What was your father 's name ? \n", "\n", " ANSWER : Avram . \n", "\n", " QUESTION : And what did he do ? \n", "\n", " ANSWER : He was like a clothes designer . \n", "\n", " QUESTION : And where -- where did he come from ? \n", "\n", " ANSWER : \n", "\n", " Poland\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " COUNTRY\n", " \n", "\n", "\n", "\n", "\n", ". \n", "\n", " QUESTION : What -- what \n", "\n", " city\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "in \n", "\n", " Poland\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " COUNTRY\n", " \n", "\n", "\n", "\n", "\n", "? \n", "\n", " ANSWER : Ciechanow . Do n't ask me to spell it . \n", "\n", " QUESTION : Okay . And you -- ANSWER : But I think it 's in the thing there . \n", "\n", " QUESTION : And what was your mother 's name ? \n", "\n", " ANSWER : Tovah . \n", "\n", " QUESTION : And her maiden name ? Do you know that ? \n", "\n", " ANSWER : Mifda ( phonetic ) . Q : And where was she from originally ? \n", "\n", " ANSWER : The same \n", "\n", " town\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ", \n", "\n", " Ciechanow\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ". \n", "\n", " QUESTION : Uh - huh . And was your family a very religious family ? \n", "\n", " ANSWER : I do n't think so . Not my father anyway . He was not religious . I think my mother was a little bit more religious . But we were not raised religiously . Just we kept to traditions and that 's it . \n", "\n", " QUESTION : Now , you said you were born in \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ". \n", "\n", " ANSWER : Yes . \n", "\n", " QUESTION : When did your family come to \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "? \n", "\n", " ANSWER : In 1922 . \n", "\n", " QUESTION : What brought them there ? \n", "\n", " ANSWER : My father came much earlier . And my family -- my mother joined with my oldest sister in \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "-- to \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ". \n", "\n", " QUESTION : What brought your father to \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "? \n", "\n", " ANSWER : I think the Army , to a certain extent , and a job , a good job . \n", "\n", " QUESTION : How large was your family ? \n", "\n", " ANSWER : Well , I had four sisters , two brothers , and my mother and father . I had a lot of family in \n", "\n", " Poland\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " COUNTRY\n", " \n", "\n", "\n", "\n", "\n", "; my grandparents , my aunts , my uncles , my cousins . \n", "\n", " QUESTION : But you were born in \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ". Did you go back to \n", "\n", " Poland\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " COUNTRY\n", " \n", "\n", "\n", "\n", "\n", "to visit ? \n", "\n", " ANSWER : Yes , my grandfather , we went to visit . \n", "\n", " QUESTION : And you stayed with large extended family there ? \n", "\n", " ANSWER : Yes , my grandfather did n't make my mother go \n", "\n", " home\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", ", go back . \n", "\n", " QUESTION : He wanted her to stay ? \n", "\n", " ANSWER : Yes . \n", "\n", " QUESTION : Yeah . And so where were you in the order of children ? Were you the second ? \n", "\n", " ANSWER : Second . \n", "\n", " QUESTION : You were the second child ? \n", "\n", " ANSWER : Right . \n", "\n", " QUESTION : Yeah . And what kind of \n", "\n", " neighborhood\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "did you live in in \n", "\n", " Paris\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "? \n", "\n", " ANSWER : We lived in a mixed neighborhood . \n", "\n", " QUESTION : Non - Jews and -- ANSWER : Non - Jews and Jews . \n", "\n", " QUESTION : Uh - huh . And did you have non - Jewish friends ? \n", "\n", " ANSWER : Yes . Actually , I was -- when I came back from the \n", "\n", " camp\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", ", I lived with my friend I went to \n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "with when we was six and a half years old . \n", "\n", " QUESTION : Uh - huh . \n", "\n", " ANSWER : And she was Catholic . \n", "\n", " QUESTION : Uh - huh . \n", "\n", " ANSWER : My Jewish family did n't have \n", "\n", " room\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " INT_SPACE\n", " \n", "\n", "\n", "\n", "\n", "for me . \n", "\n", " QUESTION : Uh - huh . Let 's talk a little bit about your schooling . When did you begin \n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "? How old were you ? \n", "\n", " ANSWER : We begin \n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "early in \n", "\n", " France\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " COUNTRY\n", " \n", "\n", "\n", "\n", "\n", ". We go to first the maternelle , which was maybe about three years old . And the -- QUESTION : Is this a \n", "\n", " public\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", "? \n", "\n", " ANSWER : Yes . \n", "\n", " QUESTION : So there were Jews and non - Jews in your class ? \n", "\n", " ANSWER : Yes , Jews and non - Jews . But mostly there were non - Jews in my \n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", ". And then first grade , we start -- I think I was six , six and a half . And when I was arrested , I was in lycee . And did n't finish my education , therefore . Q : Yeah . Yeah . \n", "\n", " ANSWER : Six years . \n", "\n", " QUESTION : Yeah . We 'll get to that in a few minutes . So you -- you went to a regular \n", "\n", " public\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", ". \n", "\n", " ANSWER : Uh - huh . \n", "\n", " QUESTION : That 's now what we call \n", "\n", " elementary\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", ". \n", "\n", " ANSWER : Yes . \n", "\n", " QUESTION : Was there any problems there ? You said 1 t was mixed . \n", "\n", " ANSWER : Yeah . No problem . \n", "\n", " QUESTION : No problems ? \n", "\n", " ANSWER : No . \n", "\n", " QUESTION : You were accepted ? \n", "\n", " ANSWER : Yes . No problem . On the contrary , our teachers liked us very much . We were five girls in the same \n", "\n", " school\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", ", because we had \n", "\n", " girls\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", " '\n", " \n", "\n", "\n", "\n", " \n", "\n", "\n", "\n", " schools\n", " \n", "\n", "\n", "\n", " \n", "\n", "and \n", "\n", " boys\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", " '\n", " \n", "\n", "\n", "\n", " \n", "\n", "\n", "\n", " schools\n", " \n", "\n", "\n", "\n", " \n", "\n", ". It was not mixed \n", "\n", " schools\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", ". And the -- my principal , when we were arrested , came every single day to see if there were news from us . So it was no problem at all . \n", "\n", " QUESTION : Uh - huh . What kind of \n", "\n", " neighborhood\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "did you live in ? Was it upper class or middle class neighborhood ? \n", "\n", " ANSWER : Probably middle class , I would say . \n", "\n", " QUESTION : Uh - huh . Did you live in a \n", "\n", " house\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", "or an \n", "\n", " apartment\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " INT_SPACE\n", " \n", "\n", "\n", "\n", "\n", "? \n", "\n", " ANSWER : A \n", "\n", " house\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " BUILDING\n", " \n", "\n", "\n", "\n", "\n", ". \n", "\n", " QUESTION : And was it in the center of the \n", "\n", " city\n", " \n", "\n", "\n", "\n", " \n", "\n", " \n", " POPULATED_PLACE\n", " \n", "\n", "\n", "\n", "\n", "or the outskirts ? \n", "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "displacy.render(doc, style=\"span\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "holocaust", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.13" } }, "nbformat": 4, "nbformat_minor": 2 }