parse_jiqiao.py 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. # -*-coding:UTF-8-*-
  2. import re
  3. import traceback
  4. from pprint import pprint
  5. from JiQiaoDianBo.html_clearn import html_parse
  6. from JiQiaoDianBo.error_check import CheckError
  7. pat1 = re.compile(r"\d+[.、.](.*)")
  8. pat24 = re.compile(r"A[.、.](.*?)B[.、.](.*?)C[.、.](.*?)D[.、.](.*)")
  9. pat22 = re.compile(r"A[.、.](.*?)B[.、.](.*)")
  10. pat33 = re.compile(r"C[.、.](.*?)D[.、.](.*)")
  11. pat4 = re.compile(r"([ABCD])[.、.](.*)")
  12. pat5 = re.compile(r"[ABCD]")
  13. def parse_txt(string_list, topics_list):
  14. item = []
  15. for one_topic in topics_list:
  16. one_topic_list = string_list[one_topic[0]:one_topic[-1]]
  17. one_item = dict()
  18. item_content = ""
  19. slaves_list = []
  20. # 解析slaves里面的内容
  21. slave = []
  22. slaves_item = dict()
  23. slave_content = ""
  24. options = list()
  25. options2 = list()
  26. errcodes = 0
  27. for i, line in enumerate(one_topic_list):
  28. # 考点提取
  29. if str(line).replace(" ", "").strip().startswith("【考点】"):
  30. new_line = str(line).replace("【考点】", "").strip()
  31. one_item["exam_point"] = new_line
  32. elif "【实战演练】" in str(line):
  33. if str(line).replace(" ", "").strip() == "【实战演练】":
  34. pass
  35. else:
  36. slaves_list.append(line)
  37. elif "【答案】" in str(line):
  38. try:
  39. slaves_item["answer"] = re.search(r"[ABCD]", str(line)).group()
  40. except:
  41. slaves_item["answer"] = ""
  42. # 解析提取
  43. elif str(line).strip().startswith("【技巧解析】"):
  44. topic_parse = "".join(one_topic_list[i:]).replace("【技巧解析】", "")
  45. one_item["parse"] = topic_parse
  46. break
  47. else:
  48. slaves_list.append(line)
  49. try:
  50. for j, line2 in enumerate(slaves_list):
  51. # # 内容--非ABCD和数字 开头则为内容
  52. if not pat1.match(str(line2).strip()) and (not re.match(r"[ABCD][.、.]", str(line2).strip())):
  53. # 题干--如果是非ABCD和数字 开头,但是下一行却是选项,说明这一行还是题干,有可能被老师漏了题号
  54. if pat24.match(slaves_list[j + 1]) or pat22.match(slaves_list[j + 1]) or pat4.match(
  55. slaves_list[j + 1]):
  56. slave_content += str(line2)
  57. else:
  58. # 内容--非ABCD和数字 开头则为内容
  59. item_content += str(line2)
  60. # #题干--如果是数字开头则有可能是题干,也有可能是内容,需要判断下一行是不是ABCD开头
  61. elif pat1.match(str(line2).strip()):
  62. # 如果下一行是"AxxBxxCxxD"或者“AxxBxx"则该行就是题干
  63. if pat24.match(slaves_list[j + 1]):
  64. slave_content += str(line2)
  65. options.append({"content": pat24.match(slaves_list[j + 1]).group(1), "option": "A"})
  66. options.append({"content": pat24.match(slaves_list[j + 1]).group(2), "option": "B"})
  67. options.append({"content": pat24.match(slaves_list[j + 1]).group(3), "option": "C"})
  68. options.append({"content": pat24.match(slaves_list[j + 1]).group(4), "option": "D"})
  69. slaves_item["options"] = options
  70. break
  71. # 如果下一行是“AxxBxx",则该行就是题干
  72. elif pat22.match(slaves_list[j + 1]):
  73. slave_content += str(line2)
  74. options.append({"content": pat22.match(slaves_list[j + 1]).group(1), "option": "A"})
  75. options.append({"content": pat22.match(slaves_list[j + 1]).group(2), "option": "B"})
  76. options.append({"content": pat33.match(slaves_list[j + 2]).group(1), "option": "C"})
  77. options.append({"content": pat33.match(slaves_list[j + 2]).group(2), "option": "D"})
  78. slaves_item["options"] = options
  79. break
  80. # 如果下一行仅是"A."开头则判断下一行是不是B.开头
  81. elif pat4.match(slaves_list[j + 1]):
  82. # 如果下一行是A开头,下两行是B开头,则改行是题干
  83. if pat4.match(slaves_list[j + 2]):
  84. slave_content += str(line2)
  85. options.append(
  86. {"content": re.match(r"A[.、.](.*)", slaves_list[j + 1]).group(1), "option": "A"})
  87. options.append(
  88. {"content": re.match(r"B[.、.](.*)", slaves_list[j + 2]).group(1), "option": "B"})
  89. options.append(
  90. {"content": re.match(r"C[.、.](.*)", slaves_list[j + 3]).group(1), "option": "C"})
  91. options.append(
  92. {"content": re.match(r"D[.、.](.*)", slaves_list[j + 4]).group(1), "option": "D"})
  93. slaves_item["options"] = options
  94. break
  95. # 否则是内容
  96. else:
  97. item_content += str(line2)
  98. # 如果下一行还是数字开头,那么这个就是内容
  99. elif pat1.match(slaves_list[j + 1]):
  100. item_content += str(line2)
  101. # 否则是内容
  102. else:
  103. item_content += str(line2)
  104. else:
  105. # # 选项提取--"AXXXBXXXCXXXDXXX"
  106. if slaves_item.get("options", None):
  107. break
  108. else:
  109. if pat24.match(str(line2)):
  110. options2.append({"content": pat24.match(str(line2)).group(1), "option": "A"})
  111. options2.append({"content": pat24.match(str(line2)).group(2), "option": "B"})
  112. options2.append({"content": pat24.match(str(line2)).group(3), "option": "C"})
  113. options2.append({"content": pat24.match(str(line2)).group(4), "option": "D"})
  114. # # 选项提取--"AXXXBXXX"和"CXXXDXXX"
  115. elif pat22.match(str(line2)):
  116. options2.append({"content": pat22.match(str(line2)).group(1), "option": "A"})
  117. options2.append({"content": pat22.match(str(line2)).group(2), "option": "B"})
  118. elif pat33.match(str(line2)):
  119. options2.append({"content": pat33.match(str(line2)).group(1), "option": "C"})
  120. options2.append({"content": pat33.match(str(line2)).group(2), "option": "D"})
  121. # # 选项提取--"AXXX"、"BXXX"、"CXXX"、"DXXX", 如果是A开头,下一行是B开头,则是选项
  122. elif pat4.match(str(line2)):
  123. options2.append({"content": pat4.match(str(line2)).group(2),
  124. "option": "{}".format(pat4.match(str(line2)).group(1))})
  125. if not slaves_item.get("options", None):
  126. slaves_item["options"] = options2
  127. try:
  128. slaves_item["content"] = pat1.match(slave_content).group(1)
  129. except:
  130. errcodes = 113
  131. slaves_item["content"] = slave_content
  132. slave.append(slaves_item)
  133. except:
  134. print(traceback.print_exc())
  135. slaves_item_answer = slaves_item.get('answer', "")
  136. slaves_item_content = slaves_item.get('content', slave_content)
  137. slaves_item_options = slaves_item.get('options', [])
  138. slave = [{'answer': slaves_item_answer,
  139. 'content': slaves_item_content,
  140. 'options': slaves_item_options}]
  141. one_item["slave"] = slave
  142. one_item["topic_type_name"] = "技巧点拨"
  143. one_item["topic_type_id"] = 21
  144. item_content_list = str(item_content).replace("【实战演练】\n", "").split("\n")
  145. one_item["content"] = str(item_content).replace("【实战演练】\n", "")
  146. one_item["topic_no"] = "1-%s" % len(slave)
  147. # 错误机制检查
  148. error_dict = CheckError(one_item, errcodes=errcodes)()
  149. one_item.update(error_dict)
  150. item.append(one_item)
  151. dd = {"items": item}
  152. return dd
  153. class MyParse(object):
  154. def __init__(self, html):
  155. self.html = html
  156. self.__after_clean_list = None
  157. def clean_html(self):
  158. after_clean_list = html_parse(self.html)
  159. self.__after_clean_list = after_clean_list
  160. return after_clean_list
  161. def split_txt(self):
  162. topic_list = []
  163. split_num = []
  164. num = 1
  165. if self.__after_clean_list:
  166. string_list = self.__after_clean_list
  167. else:
  168. string_list = self.clean_html()
  169. try:
  170. for i, line in enumerate(string_list):
  171. if str(line).strip().replace(" ", "").startswith("【考点】"):
  172. if num == 1:
  173. num += 1
  174. split_num.append(i)
  175. else:
  176. split_num.append(i)
  177. topic_list.append(split_num)
  178. start = i
  179. split_num = list()
  180. split_num.append(start)
  181. split_num.append(len(string_list))
  182. topic_list.append(split_num)
  183. except:
  184. print("切割试题出现错误")
  185. topic_list = []
  186. return topic_list
  187. def parse_html(self):
  188. topics_list = self.split_txt()
  189. if self.__after_clean_list:
  190. string_list = self.__after_clean_list
  191. else:
  192. string_list = self.clean_html()
  193. if topics_list:
  194. result_structure = parse_txt(string_list, topics_list)
  195. else:
  196. result_structure = []
  197. return result_structure
  198. def __call__(self):
  199. result = self.parse_html()
  200. return result
  201. if __name__ == '__main__':
  202. strings = """<p>&nbsp; 【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Exploit your parking space</p><p style="height: 0;">&nbsp;</p><p>An unused parking space or garage can make money. If you live near a city center or an airport, you could make anything up to &amp;pound;200 or &amp;pound;300 a week. Put an advertisement(广告)for free on Letpark or Atmyhousepark.</p><p style="height: 0;">&nbsp;</p><p>Rent a room</p><p style="height: 0;">&nbsp;</p><p>Spare room? Not only will a lodger(房客)earn you an income, but also, thanks to the government-backed “rent a room” program, you won’t have to pay any tax on the first &amp;pound;4500 you make per year. Try advertising your room on Roomspare or Roommateeasy.</p><p style="height: 0;">&nbsp;</p><p>1. For whom is the text most probably written?</p><p style="height: 0;">&nbsp;</p><p>A. Lodgers. &nbsp; B. House owners.</p><p style="height: 0;">&nbsp;</p><p>C. Advertisers. &nbsp;D. Online companies.</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“probably written”可知,本题考查读者群体。在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的人称相关段落或语句,根据首句“An unused parking space or garage can make money.”及小标题Exploit your parking space和Rent a room可知,文章提到开发停车空间、租出房子等内容,是写给房主的。审视选项,A.房客,B.房主,C.广告商,D.网络公司,故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Sometimes you’ll hear people say that you can’t love others until you love yourself. Sometimes you’ll hear people say that you can’t expect someone else to love you until you love yourself. Either way, you’ve got to love yourself first and this can be tricky. Sure we all know that we’re the apple of our parents’ eyes, and that our Grandmas think we’re great talents and our Uncle Roberts think that we will go to the Olympics. But sometimes it’s a lot harder to think such nice thoughts about ourselves. If you find that believing in yourself is a challenge, it is time you build a positive self-image and learn to love yourself.</p><p style="height: 0;">&nbsp;</p><p>1. Who are the intended readers of the passage?</p><p style="height: 0;">&nbsp;</p><p>A. Parents. B. Adolescents. C. Educators. D. People in general.</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“the intended readers”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的人称相关段落或语句,由此定位到第四句话“we’re the apple of our parents’ eyes...our Grandmas think we’re...and our Uncle Roberts think that we will go to the Olympics”,可知文章中提到了我们的父母,我们的爷爷奶奶,我们的叔叔。审视选项,A、C项首先排除;而D项(大众)过于宽泛,故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>It’s normal for any student’s college wish list to change throughout high school. But when it comes time to apply, many seniors have a hard time narrowing down their choices.</p><p style="height: 0;">&nbsp;</p><p>There’s no hard and fast answer: but there are several things you can do and ask yourself to make the decision easier. Here are three pieces of advice that might help.</p><p style="height: 0;">&nbsp;</p><p>1. What is the passage mainly for?</p><p style="height: 0;">&nbsp;</p><p>A. Researchers. B. Educators. C. Applicants. D. Sophomores.</p><p style="height: 0;">&nbsp;</p><p>【答案】C</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“mainly for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词汇,人称,时态等,那么由此找到有指向性单词“student’s college wish”,“student’s college wish”,“things you can do”,可知文章是给那些即将高中毕业、准备申请大学的学生提供的一些建议。审视选项,A、B项首先排除;而D项(大二年级学生)不属于此范畴,故选C。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>I know lots of women who skip breakfast, and they have a ton of different excuses for doing it.</p><p style="height: 0;">&nbsp;</p><p>But the bottom line is that eating in the morning is very important when you’re trying to lose weight.</p><p style="height: 0;">&nbsp;</p><p>Breakfast is one meal I never miss, and the same goes for most weight loss success stories. Research shows that eating breakfast keeps you from overeating later in the day. Breakfast skippers have a bigger chance of gaining weight than those who regularly have a morning meal.</p><p style="height: 0;">&nbsp;</p><p>1. The text is written mainly for those _______</p><p style="height: 0;">&nbsp;</p><p>A. who go to work early. B. who want to lose weight.</p><p style="height: 0;">&nbsp;</p><p>C. who stay up late. D. who eat before sleep.</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“mainly for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词汇,人称,时态等,那么由此找到有指向性的人称相关段落或语句,由此定位到第二段“But the bottom line is that eating in the morning is very important when you’re trying to lose weight.”,可知主要针对那些对吃早餐有误解,为了减肥不吃早餐的人群。审视选项,A、C项首先排除;而D项(在睡前吃东西)与文章内容无相关性,故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>The principles about applying for jobs have altered greatly lately. In the past, people preferred a hand-written application letter. However, nowadays it is becoming more and more common to apply for a job through the Internet. You can find information on the Internet about how to apply for jobs. Information can be found about how to fulfill your application letter, the clothes that you should wear and how to carry out the interview itself.</p><p style="height: 0;">&nbsp;</p><p>1. What kind of people is the text mainly meant for?</p><p style="height: 0;">&nbsp;</p><p>A. Interviewers. B. Job-hunting people. C. Employers. D. Lay-off workers.</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“mainly for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的单词相关段落或语句,由此定位到文中句子“The principles about applying for jobs have altered greatly lately”及“You can find information on the Internet about how to apply for jobs”,可知本文主要讲求职的一些途径和注意事项,所以本文的写作对象是求职者。审视选项,A、C项首先排除;而D项(下岗工人)不符合题意,故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>To become a successful fish scientist, you need to have a curious mind and be able to work on your own. You also need to be able to handle equipment and perform experiments; but most importantly, you must love fish. To become an ichthyologist, you will need to train at a university to pass a Bachelor of Science degree. For this, you will need to be good at mathematics, physical science and biology. Then, you will need to study for another year to complete an honours degree in ichthyology. This honours degree contains coursework about all aspects of fish. You also need to complete a research paper.</p><p style="height: 0;">&nbsp;</p><p>1. The passage is probably written for _____.</p><p style="height: 0;">&nbsp;</p><p>A. university students &nbsp;B. science researchers</p><p style="height: 0;">&nbsp;</p><p>C. fisheries experts &nbsp;D. fish farmers</p><p style="height: 0;">&nbsp;</p><p>【答案】A</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“written for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到文中句子“To become a successful fish scientist, you need to have a curious mind and be able to work on your own.”及“To become an ichthyologist, you will need to train at a university to pass a Bachelor of Science degree.”可知,本文主要谈到成为鱼类学家的条件,例如得到理科学位,此外进行鱼类学习。审视选项,C、D项首先排除;而B项(科学研究人员)太过宽泛,故选A。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Reading is very important to help you learn English. To learn as much as you can from reading, you need to read different kinds of English. This book provides not only different kinds of English but also a good way to check your reading ability.</p><p style="height: 0;">&nbsp;</p><p>1. The passage is most probably written for _________.</p><p style="height: 0;">&nbsp;</p><p>A. test designers B. students C. test-takers D. teachers</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“written for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,由此找到有指向性的词汇相关段落或语句,由此定位到文中句子“Reading is very important to help you learn English”及“to learn as much as you can from reading”都使用到了“learn”一词,由此判断句子中的人称代词“you”指的是学生。故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>How a few members of the animal kingdom handle the transition to adulthood?</p><p style="height: 0;">&nbsp;</p><p>African elephants</p><p style="height: 0;">&nbsp;</p><p>These beautiful beasts come close to imitate teen rebellion. Calves spend a decade with their mothers in female-dominated groups — and ladies stay there — but adolescent boys leave mom for noisy crews of bros. In their 20s, they often downsize to smaller male groups.</p><p style="height: 0;">&nbsp;</p><p>Orangutans (猩猩)</p><p style="height: 0;">&nbsp;</p><p>Slow metabolism allows these primates to survive food shortages — times when weather makes ripe fruit scarce. But energy efficiency comes at a cost; growth and maturation take time.</p><p style="height: 0;">&nbsp;</p><p>1.Who will be interested in this passage?</p><p style="height: 0;">&nbsp;</p><p>A. A student who is doing a project on animal growth.</p><p style="height: 0;">&nbsp;</p><p>B. A kid who is keen on animal watching.</p><p style="height: 0;">&nbsp;</p><p>C. A zoo-worker who is responsible for visitors’ safety.</p><p style="height: 0;">&nbsp;</p><p>D. A doctor who specializes in animals’ health.</p><p style="height: 0;">&nbsp;</p><p>【答案】A</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“who”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的单词相关段落或语句,由此定位到文中句子“How a few members of the animal kingdom handle the transition to adulthood?”及后面的小标题可知本文介绍了几种动物的成长特点,由此推断文章是写给对动物成长感兴趣的人看的。审视选项,C、D项首先排除;而B项(喜欢看动物的孩子)不够精确,此文应该给对动物成长感兴趣的人看的,故选A。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Hot Spots for Retirees to Start Their Encore Career</p><p style="height: 0;">&nbsp;</p><p>Encore Career: Vocational School Instructor</p><p style="height: 0;">&nbsp;</p><p>Retire in: Los Angeles, CA</p><p style="height: 0;">&nbsp;</p><p>Ever since IBM CEO Ginni Rometty coined the term “new collar” to describe well-paid jobs that require specific skills but not necessarily a degree, vocational schools have made a serious comeback. Apparently instructors are in short supply in sunny L.A., where there are 13 jobs at vocational schools for every applicant on the market. This is a great opportunity for skilled retirees since, unlike teaching at a public school that requires a state certificate, the only requirement here is that you be a seasoned expert in your field.</p><p style="height: 0;">&nbsp;</p><p>1.Who is the text intended for?</p><p style="height: 0;">&nbsp;</p><p>A.Children B.Graduates C.Retirees D.Tourists</p><p style="height: 0;">&nbsp;</p><p>【答案】C</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“intended for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到文中标题句子“Hot Spots for Retirees to Start Their Encore Career”及文章主要介绍了几个退休人员可以重新开始职业生涯的地方。审视选项,A、D项首先排除;而B项(毕业生)与文章标题内容不符合,故选C。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>If&nbsp;you’ll&nbsp;be&nbsp;taking&nbsp;vacation&nbsp;time&nbsp;in&nbsp;the&nbsp;coming&nbsp;year&nbsp;and&nbsp;plan&nbsp;on&nbsp;flying,&nbsp;&nbsp;here&nbsp;are&nbsp;some&nbsp;shopping&nbsp;tips&nbsp;for&nbsp;you.&nbsp;Those&nbsp;who&nbsp;fly&nbsp;first&nbsp;class&nbsp;and&nbsp;don’t&nbsp;care&nbsp;what&nbsp;airline&nbsp;tickets&nbsp;cost&nbsp;are&nbsp;excused&nbsp;from&nbsp;this&nbsp;lesson.</p><p style="height: 0;">&nbsp;</p><p>★&nbsp;When&nbsp;to&nbsp;buy</p><p style="height: 0;">&nbsp;</p><p>If you are shopping for domestic (国内的) flights, check prices on Tuesday afternoon. This is an old tip but still useful because most U.S. carriers continue to release sales on Tuesday morning, and competitors quickly drop their fares to match the better deals.</p><p style="height: 0;">&nbsp;</p><p>1.Who&nbsp;is&nbsp;the&nbsp;text&nbsp;intended&nbsp;for?</p><p style="height: 0;">&nbsp;</p><p>A.Those&nbsp;who&nbsp;usually&nbsp;choose&nbsp;first&nbsp;class&nbsp;for&nbsp;their&nbsp;flights.</p><p style="height: 0;">&nbsp;</p><p>B.Those&nbsp;who&nbsp;want&nbsp;to&nbsp;find&nbsp;suggestions&nbsp;on&nbsp;where&nbsp;to&nbsp;fly.</p><p style="height: 0;">&nbsp;</p><p>C.Those&nbsp;who&nbsp;are&nbsp;traveling&nbsp;during&nbsp;the&nbsp;spring&nbsp;break.</p><p style="height: 0;">&nbsp;</p><p>D.Those&nbsp;who&nbsp;are&nbsp;looking&nbsp;for&nbsp;the&nbsp;best&nbsp;airline&nbsp;ticket&nbsp;prices.</p><p style="height: 0;">&nbsp;</p><p>【答案】D</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“intended&nbsp;for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,根据句子“If&nbsp;you’ll&nbsp;be&nbsp;taking&nbsp;vacation&nbsp;time&nbsp;in&nbsp;the&nbsp;coming&nbsp;year&nbsp;and&nbsp;plan&nbsp;on&nbsp;flying,&nbsp;&nbsp;here&nbsp;are&nbsp;some&nbsp;shopping&nbsp;tips&nbsp;for&nbsp;you.”以及第一个小标题段落中看准时间买票可知文章是给那些计划坐飞机的人提供购买便宜机票的方式。审视选项,B、C项首先排除;而A项(经常选择头等舱飞行的人)不符合逻辑,此文应该写给那些寻找性价比最高机票的人,故选D。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Home stay provides English language students with the opportunity to speak English outside the classroom and the experience of being part of a British home.</p><p style="height: 0;">&nbsp;</p><p>What to Expect</p><p style="height: 0;">&nbsp;</p><p>The host will provide accommodation and meals. Rooms will be cleaned and bedcovers changed at least once a week. You will be given the house key and the host is there to offer help and advice as well as to take an interest in your physical and mental health.</p><p style="height: 0;">&nbsp;</p><p>1.The passage is probably written for________.</p><p style="height: 0;">&nbsp;</p><p>A.host willing to receive foreign students</p><p style="height: 0;">&nbsp;</p><p>B.foreigners hoping to build British culture</p><p style="height: 0;">&nbsp;</p><p>C.travelers planning to visit families in London</p><p style="height: 0;">&nbsp;</p><p>D.English learners applying to like in English homes</p><p style="height: 0;">&nbsp;</p><p>【答案】D</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“written for”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到第一段句子“Home stay provides English language students with the opportunity to speak English...”可知,这篇文章是写给申请入住英国家庭的英语学习者的。故选D。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>People born in winter are more likely to suffer mental health disorders, according to a recent study carried out by re searchers at Vanderbilt University in Tennessee.</p><p style="height: 0;">&nbsp;</p><p>.........</p><p style="height: 0;">&nbsp;</p><p>“We know that the biological clock regulates mood in humans,” said study researcher McMahon. “If the mechanism(机制)similar to the one that we found in mice operates in humans, then it could not only have an effect on a number of behavioral disorders, but also have a more general effect on personality.</p><p style="height: 0;">&nbsp;</p><p>1.Who is the appropriate reader of the passage?</p><p style="height: 0;">&nbsp;</p><p>A. A job-hunter. B. A student in the university.</p><p style="height: 0;">&nbsp;</p><p>C. A newly-married couple. D. An experienced dentist.</p><p style="height: 0;">&nbsp;</p><p>【答案】C</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“the appropriate reader”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到第一段句子“People born in winter are more likely to suffer mental health disorders, according to a recent study carried out by re searchers at Vanderbilt University in Tennessee.”可知这篇文章介绍我们出生时间对人的精神健康的影响。审视选项,A、D项首先排除;而B项(在校大学生)不会对人的出生对情绪的影响做研究,此文应该写给新婚夫妇应是最合适的读者,那样新婚夫妇可以在情况允许下选择孩子的出生时间,故选C。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Dear All,</p><p style="height: 0;">&nbsp;</p><p>Happy New Year! A list of important dates for this term is attached to this letter.</p><p style="height: 0;">&nbsp;</p><p>......</p><p style="height: 0;">&nbsp;</p><p>As the foggy(多雾)mornings start to appear,a number of parents have raised concerns over the safety of those children who walk to school.Our dark green uniforms are not particularly visible to motorists.Hopefully, the “Uniform Committee” to be set up this term will deal with this particular issue.I will keep parents informed of the channels through which views may be expressed in future newsletters.</p><p style="height: 0;">&nbsp;</p><p>1.This letter was mainly written to__________ .</p><p style="height: 0;">&nbsp;</p><p>A. teachers B. visitors C. students D. parents</p><p style="height: 0;">&nbsp;</p><p>【答案】D</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“mainly written to”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位最后一段句子“I will keep parents informed of the channels through which views may be expressed in future newsletters”(我将会与家长联系)可知是给家长的。审视选项,排除A、B、C项;故选D。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>Set up a daily plan for yourself and ensure that you reserve enough time for your homework. Also, don’t forget to spare some time for play! Stop being lazy and start participating in your life instead of just watching it pass by. Try to do something fun and constructive every day. Read a book. write something interesting in your diary, try a new hobby: spend time with your friends, or just watch your favorite show on television, and you will see how every moment of your day unfolds. You’ ll achieve better results, and ultimately greater success.</p><p style="height: 0;">&nbsp;</p><p>1. Who are the intended readers of the passage?</p><p style="height: 0;">&nbsp;</p><p>A Teachers &nbsp;B. Students &nbsp;C. Workers &nbsp;D. People in general</p><p style="height: 0;">&nbsp;</p><p>【答案】B</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“intended readers”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到第一段句子“Set up a daily plan for yourself and ensure that you reserve enough time for your homework”可知,这篇文章的读者人群是学生。故选B。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>How to buy train tickets</p><p style="height: 0;">&nbsp;</p><p>Unless you can read Chinese there are only two ways to make train reservations in China:</p><p style="height: 0;">&nbsp;</p><p>How to read train tickets</p><p style="height: 0;">&nbsp;</p><p>When reading your train ticket, please take note of the Chinese characters and Pinyin printed next to your departure/arrival city. Directions(North, South, East and West)appear in Pinyin(Bei,Nan, Dong and Xi), not English.Please make sure you are going to the correct train station.</p><p style="height: 0;">&nbsp;</p><p>1. Who are the intended readers of the passage?</p><p style="height: 0;">&nbsp;</p><p>A. Native tourists. &nbsp;B. Travel agencies. C. Businessmen. D. Foreign travelers.</p><p style="height: 0;">&nbsp;</p><p>【答案】D</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“intended readers”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到小标题“How to buy train tickets”以及“How to read train tickets”下第一句“When reading your train ticket, please take note of the Chinese characters and Pinyin printed next to your departure/arrival city.”可知,文章在介绍订票、看车票信息时提到了汉字、拼音,可推知这篇文章的受众是不懂汉语的人,即外国人。A项,“本地游客”;B项,“旅行社”;C项,“商人”,均不符合文意。故正确答案为D。</p><p style="height: 0;">&nbsp;</p><p>【考点】读者群体</p><p style="height: 0;">&nbsp;</p><p>【实战演练】</p><p style="height: 0;">&nbsp;</p><p>“This research provides a positive outcome by reminding people that personality goes a long way toward determining your attractiveness; it can even change people’s impressions of how good-looking you are,” said Lewandowski.</p><p style="height: 0;">&nbsp;</p><p>1.Who are the intended readers of this passage?</p><p style="height: 0;">&nbsp;</p><p>A.People with positive characteristics.</p><p style="height: 0;">&nbsp;</p><p>B.Good-looking people.</p><p style="height: 0;">&nbsp;</p><p>C.People with negative characteristics.</p><p style="height: 0;">&nbsp;</p><p>D.General people.</p><p style="height: 0;">&nbsp;</p><p>【答案】D</p><p style="height: 0;">&nbsp;</p><p>【技巧解析】本题是读者群体题。由题干“intended readers”可知,本题考查读者群体,在处理此类题型时特别要注意文章中指向性的词语,人称,时态等,那么由此找到有指向性的词汇相关段落或语句,由此定位到句子“This research provides a positive outcome by reminding people that personality goes a long way toward determining your attractiveness; it can even change people’s impressions of how good-looking you are”其中通过“people”可知这个这个实验的结论适用于所有人,由此可知这篇文章的目标读者也是所有人,审视选项,A、C项为两个对立选项,以偏概全;而B项(好看的人)不符合题意,故选D。</p>"""
  203. # strings = open(r"D:\Objects\English_teacher\11.html", encoding="utf-8").read()
  204. res = MyParse(strings)()
  205. pprint(res)