类似下面这篇文章A
    Jane Austen, a famous English writer, was born at Steventon, Hampshire, on December 16, 1775, and died on July 18, 1817. She began writing early in life, although the prejudices of her times forced her to have her books published anonymously ( 匿名 ).
    But Jane Austen is perhaps the best known and best loved of Bath's many famous local people and visitors. She paid two long visits here during the last five years of the eighteenth century and from 1801 to 1806, Bath was her home. Her deep knowledge of the city is fully seen in two of her novels, Northanger Abbey and Persuasion, which are largely set in Bath. The city is still very much as Jane Austen knew it, keeping in its streets and public buildings the well-ordered world that she described so well in her novels. Now the pleasure of learning Jane Austen's Bath can be enhanced (增强) by visiting the Jane Austen Centre in Gay Street. Here, in a Georgian town house in the heart of the city, you can find out more about Bath in Jane Austen's time and the importance of Bath in her life and work.
    The Centre has been set up with the help and guidance of members of the Jane Austen Society. After your visit to the Centre, you can look round the attractive shop, which offers a huge collection of Jane Austen related books, cards and many specially designed gifts. Jane Austen quizzes are offered to keep the children busy.
    You can also have walking tours of Jane Austen's Bath, which is a great way to find out more about Jane Austen and discover the wonderful Georgian city of Bath. The tour lasts about one and a half hours. The experienced guides will take you to the places where Jane lived, walked and shopped.B
    Hi, everybody!
    Welcome to our newly-opened Richards Cinema Bookstore!
    Now let me introduce to you some of the new film books in our store.
    Are you Chinese film fans? OK, here comes the latest 25 New Takes about Chinese films. It is a collection of 25 fresh readings of different Chinese films from the 1930s to the present. In recent years, Chinese films are very popular in the States, such as Crouching Tiger and Hidden Dragon, Hero, and Flowers of Shanghai.
    Do you like French films? Well, here is The French Cinema Book. It covers French films from the 1890s to the beginning of the 21st century. It is written for all lovers of French cinema: students and teachers, specialists and fans, and so on.
    Maybe you are Indian film fans and star-chasers. Then here is Encyclopedia ( 百科全书 ) of Indian Cinema. The book is a complete introduction to all the best Indian films. It also offers a full list of names of the famous and successful film stars in the past ten years. You know, the Indian film industry is the largest in the world after our Hollywood.
    If you like British films, we have The British Cinema Book. It is a good review of British cinema. This book contains a good many nice pictures.
    In our bookstore, you can also find books about Mexican, Japanese, Australian, German and Italian films.
    Well, please help yourselves to some coffee or tea, and have a good time here!C
    The Sahara Festival is a celebration of the very recent past. The three-day event is not fixed to the same dates each year, but generally takes place in November or December. It is well attended by tourists, but even better attended by locals.
    During the opening ceremonies (仪式), after the official greetings from the government leaders, people who attend the festival begin to march smartly before the viewing stands, and white camels (骆驼) transport their riders across the sands. Horsemen from different nations display their beautiful clothes and their fine horsemanship. One following another, groups of musicians and dancers from all over the Sahara take their turn to show off their wonderful traditional culture (传统文化). Groups of men in blue and yellow play horns and beat drums as they dance in different designs. On their knees in the sand, a group of women in long dark dresses dance with their hair: their long, dark, shiny hair is thrown back and forth in the wind to the rhythm of their dance.
    The local and visiting Italian dogs are anxious to run after hares. The crowd is on its feet for the camel races. Camels and riders run far into the distance, and then return to the finish Line in front of the cheering people.
    Towards the evening, there comes the grand finale of the opening day, an extremely exciting horserace. All the riders run very fast on horseback. Some riders hang off the side of their saddles. Some even ride upside down—their legs and feet straight up in the air—all at full speed. Others rush down the course together, men arm in arm, on different horses. On and on they went. So fast and so wonderful!D
    Animals can move from place to place, but plants cannot. When an animal is under attack, it can run away or fight back. Plants certainly cannot run away, and they lack teeth and claws. But plants can defend themselves by using both physical and chemical means.
    Some plants have their own ways to keep animals away. For example, the leaves of the holly plant have sharp spines (刺) that discourage grass-eating animals. Holly leaves on lower branches have more spines than leaves on upper branches. This is because the lower leaves are easier for most animals to reach.
    Some plants, such as the oak tree, have thick and hard leaves that are difficult for animals to eat. Some grasses may contain a sandy material; eating such grasses wears down the animal's teeth.
    Many plants also have chemical defenses. Some plants produce chemicals that taste bitter or cause an unpleasant reaction. Some plants may fight against an attack by increasing the production of these chemicals. When a caterpillar (毛虫) bites a tobacco leaf, the leaf produces a chemical messenger. This messenger sends to the roots the information to produce more nicotine. The higher levels of nicotine discourage the caterpillar.
    Many plants depend on both physical and chemical defenses. A certain plant in China, for instance, has prickly (多刺的) leaves, and each prickle contains poisonous venom (毒液). A single experience with this kind of plant will teach an animal to stay away from it in the future.E
    The twentieth century saw greater changes than any century before: changes for the better, changes for the worse; changes that brought a lot of benefits(益处) to human beings, changes that put man in danger. Many things caused the changes, but, in my opinion, the most important was the progress in science.
    Scientific research in physics and biology has vastly broadened our views. It has given us a deeper knowledge of the structure(结构)of matter and of the universe; it has brought us a better understanding of the nature of life and of its continuous development. Technology in the application(应用)of science has made big advances that have benefited us in nearly every part of life. 
    The continuation of such activities in the twenty-first century will result in even greater advantages to human beings: in pure science—a wider and deeper knowledge in all fields of learning; in applied science—a more reasonable sharing of material benefits, and better protection of the environment.
    Sadly, however, there is another side to the picture. The creativity of science has been employed in doing damage to mankind. The application of science and technology to the development and production of weapons(武器)of mass destruction has created a real danger to the continued existence of the human race on this planet. We have seen this happen in the case of nuclear weapons. Although their actual use has so far occurred only in the Second World War, the number of nuclear weapons that were produced and made ready for use was so large that if the weapons had actually been used, the result could have been the ruin of the human race, as well as of many kinds of animals.
    William Shakespeare said, "The web of our life is of a mingled yarn (纱线), good and ill together." The above brief review of the application of only one part of human activities—science—seems to prove what Shakespeare said. But does it have to be so? Must the ill always go together with the good? Are we biologically programmed for war?F
     On May 27, 1995, our life was suddenly changed. It happened a few minutes past three, when my husband, Chris, fell from his horse as it jumped over a fence. Chris was paralyzed (瘫痪) from the chest down, unable to breathe normally. As he was thrown from his horse, we entered into a life of convenience with lots of unexpected challenges( 挑战). We went from the "haves" to the “have-nots". Or so we thought.
     Yet what we discovered later were all the gifts that came out of sharing  difficulties. We came to learn that something wonderful could happen in a disaster. All over the world people cared for Chris so much that letters and postcards poured in every day. By the end of the third week in a medical center in Virginia, about 35,000 pieces of mail had been received and sorted.
      As a family, we opened letter after letter. They gave us comfort and became a source of strength for us. We used them to encourage ourselves. I would go to the pile of letters ed with "Funny" if we needed a laugh, or to the "Disabled" box to find advice from people in wheelchairs or even in bed living happily and successfully.
      These letters, we realized, had to be shared. And so here we offer one of them to you.
Dear Chris,
      My husband and I were so sorry to hear of your riding accident last week. No doubt your family and your friends are giving you the strength to face this difficult challenge. People everywhere are also giving you best wishes every day and we are among those who are keeping you alive.
Yours Sincerely,
Nancy Reagan

解决方案 »

  1.   

    提取出如:
    Jane,Austen,English,Steventon,Hampshire,Georgian,Chinese,...
      

  2.   

    斯坦福大学给出了一个基于Java的NLP实现。http://nlp.stanford.edu/software/CRF-NER.shtml
      

  3.   

    这是个办法,如果出现那种情形,那基本上正确性就应该可以。
    但是,出现那种情形的机率,是没法保证的。
    比如上文:
    Jane Austen, a famous English writer, ……
    But Jane Austen ……
    这样是可以的。但如果它的形式是这样:
    Jane Austen, a famous English writer, ……
    But Austen ……
    就无法保证仍能辨别出Jane Austen是一个完整的名字。
    所以,还是得结合一些语法和词库等多种手段。
    这种需求,要做就得专业,不专业也干脆就无需做了。
      

  4.   

    分词lucene.net
    人名,地名设置词库
      

  5.   

    我自己写了个正则,可以实现获取所有不在句子的第一个单词,且首字母大写的单词,还有比这效率更高点的正则吗?
    (?<=\w\s+)[A-Z][a-z]+
      

  6.   

    (?<=\w\s+)[A-Z]\w+
      

  7.   

    (?<=\w[ |\t]+)[A-Z]\w+
      

  8.   

    (?<=\w[ |\t]+)[A-Z]\w+
      

  9.   

    Jane,Austen,English,Steventon,Hampshire,Georgian,Chinese,...
      

  10.   

    正则,你总要有规则啊。大写就可以么?连续的两个大写单词认为是一个地名或人名?
    \b[A-Z]\w+(\s*[A-Z]\w+)*\b
      

  11.   

    如果考虑句子第一个字母也是大写。剔除的话。
    (?<![,.?!]\s*)\b[A-Z]\w+(\s*[A-Z]\w+)*\b
      

  12.   

    谢谢各位,我现在用的是这个正则
    (?<=\w[ |\t]+)[A-Z]\w+
      

  13.   

    [ |\t]+
    这就表示
    \s+外加一个|符号。|在这里不表示或者的意思,是一个符号。如果你想表达或者。可以写
    ( |\t)+
    或是
    [ \t]+