!7 // Text + questions from https://lingua.com/english/reading/john/ cmodule John > DynPrintLog { transient ReadingComprehensionTest test; switchable S text = [[ Hi! Nice to meet you! My name is John Smith. I am 19 and a student in college. I go to college in New York. My favorite courses are Geometry, French, and History. English is my hardest course. My professors are very friendly and smart. It’s my second year in college now. I love it! I live in a big house on Ivy Street. It’s near the college campus. I share the house with three other students. Their names are Bill, Tony, and Paul. We help each other with homework. On the weekend, we play football together. I have a younger brother. He just started high school. He is 14 and lives with my parents. They live on Mulberry Street in Boston. Sometimes they visit me in New York. I am happy when they visit. My Mom always brings me sweets and candy when they come. I really miss them, too! Question 1: Where does John Smith go to college? 1 Berlin 2 Boston 3 New York 4 Paris Question 2: What is John Smith’s hardest course? 1 Art 2 English 3 Math 4 French Question 3: Who shares a house with John Smith? 1 Anna, Margaret, and Tanya 2 Bill, John, and Tom 3 Frank, Tony, and Mike 4 Bill, Tony, and Paul Question 4: How old is John Smith’s younger brother? 1 fourteen 2 eleven 3 seven 4 thirteen Question 5: What does John Smith’s Mom bring him when they visit? 1 Candy and ice cream 2 Fruits and vegetables 3 Sweets and candy 4 Flowers and coffee ]]; start-thread { test = ai_parseReadingComprehensionTest_v1(text, printText := false); LS sentences = switcheroo_iToSpeakersName(test.sentences); pnl(sentences); Set brw = ai_backReferencingWords(); FullPhraseCache nounStash = fullPhraseCache(ai_nounsAndNounPhrases()); for (S s : sentences) { LS tok = wordTok(s); L indices = indicesOfCodeTokensContainedInSet(tok, brw); L nounIndices = fullPhraseCache_intRanges(nounStash, tok); LS nouns = map_curry joinSubList_intRange(tok, nounIndices); print(sfu(nouns) + " | " + sfu(getIndices(tok, indices)) + " | " + s); } for (S s : sentences) { //fullPhraseCache_intRanges(mechFullPhraseCache(sentences)); } } }