比如有一篇txt文本,内容如下:April
April is the fourth month of the year with 30 days. The name April comes from that Latin word 
April in poetry.
Poets use "April" to mean the end of winter. For example: "April showers bring May flowers."Autonomous communities of Spain
Spain has fifty smaller parts called provinces. In 1978 these parts came together, making the autonomous communities.
Before then, some of these provinces were together but were broken. The groups that were has two cities on the north coast of Africa: Ceuta and Melilla. They are called "autonomous cities".也就是一个标题,下面几段文字。这就是一个段落。一个空行,下面是新的标题+文字。现在要读取这个txt,然后计算每个单词在,比如“good”在文中的:1)一共出现在多少段落中。2)出现该单词的段落的标题是什么,以及在此段落中出现了几次。   讲结果存入TreeMap中。  未来可以输入一个单词,比如“good”,就能得出{标题,次数}这样的结果。 java单词