tactful_tokenizer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/Manifest CHANGED
@@ -6,3 +6,7 @@ lib/models/lower_words.mar
6
6
  lib/models/non_abbrs.mar
7
7
  lib/tactful_tokenizer.rb
8
8
  lib/word_tokenizer.rb
9
+ test/sample.txt
10
+ test/test.rb
11
+ test/test_out.txt
12
+ test/verification_out.txt
data/README.rdoc CHANGED
@@ -17,8 +17,7 @@ The input text is expected to consist of paragraphs delimited
17
17
  by line breaks.
18
18
 
19
19
  == Installation
20
- git clone http://github.com/SlyShy/Tactful_Tokenizer.git
21
- gem install andand
20
+ gem install tactful_tokenizer
22
21
 
23
22
  == Author
24
23
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('tactful_tokenizer', '0.0.1') do |p|
5
+ Echoe.new('tactful_tokenizer', '0.0.2') do |p|
6
6
  p.description = "A high accuracy naive bayesian sentence tokenizer based on Splitta."
7
7
  p.url = "http://github.com/SlyShy/Tactful_Tokenizer"
8
8
  p.author = "Matthew Bunday"
@@ -78,9 +78,7 @@ module TactfulTokenizer
78
78
  # For each feature in each fragment we hunt up the normalized probability and
79
79
  # multiply. This is a fairly straightforward Bayesian probabilistic algorithm.
80
80
  def classify(doc)
81
- frag = nil
82
- probs = 1
83
- feat = ''
81
+ frag, probs, feat = nil, nil, nil
84
82
  doc.frags.each do |frag|
85
83
  probs = @p0
86
84
  frag.features.each do |feat|
@@ -115,13 +113,11 @@ module TactfulTokenizer
115
113
 
116
114
  if not w2.empty?
117
115
  if w1.chop.is_alphabetic?
118
- frag.features.push "w1length_#{[10, w1.length].min}"
119
- frag.features.push "w1abbr_#{model.non_abbrs[w1.chop]}"
116
+ frag.features.push "w1length_#{[10, w1.length].min}", "w1abbr_#{model.non_abbrs[w1.chop]}"
120
117
  end
121
118
 
122
119
  if w2.chop.is_alphabetic?
123
- frag.features.push "w2cap_#{w2[0].is_upper_case?}"
124
- frag.features.push "w2lower_#{model.lower_words[w2.downcase]}"
120
+ frag.features.push "w2cap_#{w2[0].is_upper_case?}", "w2lower_#{model.lower_words[w2.downcase]}"
125
121
  end
126
122
  end
127
123
  end
@@ -143,8 +139,6 @@ module TactfulTokenizer
143
139
  def initialize(text)
144
140
  @frags = []
145
141
  res = nil
146
- puts "Hey!"
147
- puts text.inspect
148
142
  text.each_line do |line|
149
143
  unless line.strip.empty?
150
144
  line.split(/(.*?[.!?](?:["')\]}]|(?:<.*>))*[\s])/).each do |res|
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tactful_tokenizer}
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Matthew Bunday"]
9
9
  s.cert_chain = ["/home/slyshy/.ssh/gem-public_cert.pem"]
10
- s.date = %q{2010-03-23}
10
+ s.date = %q{2010-04-04}
11
11
  s.description = %q{A high accuracy naive bayesian sentence tokenizer based on Splitta.}
12
12
  s.email = %q{mkbunday @nospam@ gmail.com}
13
13
  s.extra_rdoc_files = ["README.rdoc", "lib/models/features.mar", "lib/models/lower_words.mar", "lib/models/non_abbrs.mar", "lib/tactful_tokenizer.rb", "lib/word_tokenizer.rb"]
14
- s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/models/features.mar", "lib/models/lower_words.mar", "lib/models/non_abbrs.mar", "lib/tactful_tokenizer.rb", "lib/word_tokenizer.rb", "tactful_tokenizer.gemspec"]
14
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/models/features.mar", "lib/models/lower_words.mar", "lib/models/non_abbrs.mar", "lib/tactful_tokenizer.rb", "lib/word_tokenizer.rb", "test/sample.txt", "test/test.rb", "test/test_out.txt", "test/verification_out.txt", "tactful_tokenizer.gemspec"]
15
15
  s.homepage = %q{http://github.com/SlyShy/Tactful_Tokenizer}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tactful_tokenizer", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
data/test/sample.txt ADDED
@@ -0,0 +1,98 @@
1
+ Maria and Ted Bobola grow sweet corn.
2
+
3
+ But with little corn to harvest because of a plant-withering drought, the Bobolas were forced to buy corn from Georgia to supply their produce and flower shop just outside Dover.
4
+
5
+ And most years, the strawberry picking season runs three to five weeks, but not this year, store manager Dee Chambers said.
6
+
7
+ ``It was so hot and dry that even though we irrigated, we had only two weeks in the season,'' she said.
8
+
9
+ They did not recoup $70,000 they paid for strawberry plants last year in this year's harvest.
10
+
11
+ ``It was just a hard growing season.''
12
+
13
+ Similar stories are being told by farmers across the Delmarva peninsula this year.
14
+
15
+ The drought and record high temperatures in late June and early July in the mid-Atlantic region has lowered the yields of corn and soybean the two most important field crops in Delmarva. Meanwhile, farmers in the Midwest and the South are enjoying a bumper crop. The plentiful supply has lowered prices across the nation.
16
+
17
+ Anticipating low prices, many Delmarva farmers switched this year to fruits and vegetables such as watermelons, cantaloupes, tomatoes, potatoes, peas, beans. That also has turned out to be a bad move, farmers and agricultural officials say.
18
+
19
+ The unusually warm temperatures have sped the growing season in Pennsylvania, New Jersey and New York, so the Delmarva market is experiencing a glut. Translation: Rock-bottom prices for local growers.
20
+
21
+ ``You're going to lose farmers to bankruptcy; there's no way else to say it,'' says Turp Garrett, the agricultural extension agent for Worcester County, Md. ``It's not very pretty.''
22
+
23
+ And if bankruptcy doesn't do them in, many farmers will likely quit because the financial stress is simply too much, he said. This is the second year in a row that Delmarva farmers are experiencing a less-than-stellar growing season.
24
+
25
+ Consumers most likely will not see lower prices in the grocery stores.
26
+
27
+ ``It's not being passed on to the consumer by any means. The middleman always makes money in these situations,'' said Francis Breeding of the University of Maryland's Cooperative Extension Office in Queen Anne's County, Md.
28
+
29
+ Normally, the growing season is staggered along the Eastern seaboard, which helps stabilize prices and supply, Breeding said.
30
+
31
+ This year, ideal weather in the South led to longer growing and harvesting seasons and unusually warm weather ushered in the season earlier up north, Breeding said.
32
+
33
+ Delmarva farmers are finding themselves squeezed.
34
+
35
+ ``This is the absolute worst year in history. There's absolute nothing ... that's making the economics work out,'' said Ray Wolf, who owns the 70-acre Cornerstone Farm in Hurlock, Md. ``At today's grain prices ... somebody's going to go hungry.''
36
+
37
+ How bad are the grain prices? Growers normally need about $2 per dozen ears of corn to break even, but this year they'd be lucky if they could they could get $1.10 per dozen from grocery stores, Wolf said. At his own stand, he was able to sell a dozen ears of corn for $3 in previous years, but is charging only $2 this season to stay competitive.
38
+
39
+ Fruits and vegetables are faring no better. A 20-pound watermelon usually fetches about $2 wholesale, but now the same fruit is going for about 60 cents, Breeding said.
40
+
41
+ The Bessette family enjoyed a relatively quiet life before Carolyn Bessette married into America's most famous family. Now the Bessettes are in seclusion as they await further word on their two beautiful daughters and their son-in-law all presumed dead in a plane crash.
42
+
43
+ Friends of Carolyn Bessette Kennedy and Lauren Bessette gathered Sunday at a Mass in the town where the young women grew up, offering condolences and memories of women who they say were captivating long before they joined the Kennedy clan.
44
+
45
+ Some said they were praying for a miracle. Others simply prayed for strength for two families.
46
+
47
+ ``For the Kennedys, it's more than any family should have to bear. And for the Bessettes, I feel so sorry for this family who are waiting for two daughters to come home,'' said Olive Curran, who knelt in the front pew of St. Michael's Church in Greenwich and said a special rosary for both families.
48
+
49
+ Curran, a native of Ireland, said she became friends with JFK Jr.'s aunt, Jean Kennedy Smith, during Kennedy Smith's 1993-98 stint as ambassador to Ireland.
50
+
51
+ John F. Kennedy Jr., 38; his wife, Bessette Kennedy, 33; and her sister, Lauren Bessette, 35, have been missing since Friday evening when Kennedy's plane left Fairfield, N.J., for Cape Cod, Mass., for a Kennedy cousin's wedding.
52
+
53
+ Authorities conceded late Sunday, after two days of searching waters off Martha's Vineyard, that the three were presumed dead.
54
+
55
+ ``It's just tragic,'' said Debbie Lamoureux, who attended St. Mary High School with the former Carolyn Bessette.
56
+
57
+ Robert Cardini, who attended middle school with Carolyn, hasn't seen her in nearly 20 years. He and another childhood friend stopped by St. Michael's on Sunday to drop off two bouquets.
58
+
59
+ ``We wanted to let her know we're thinking about her,'' he said. ``She was a great kid. She was always smiling a beautiful girl.''
60
+
61
+ The flowers were placed in front of three white candles lit for Kennedy, his wife and sister-in-law.
62
+
63
+ The Rev. Michael Moynihan, pastor of St. Michael's, gathered a group of about 40 children by the altar to explain what had happened. He told them that some of their parents went to St. Mary High School with Carolyn Bessette.
64
+
65
+ ``We pray in a very special way today for three people who were in a plane accident,'' Moynihan said.
66
+
67
+ The Bessette family stayed inside their home Sunday as a steady stream of visitors came and went. Greenwich police stationed cruisers outside the modest cape house and at the end of the private road that leads to it.
68
+
69
+ Carolyn and her twin sisters, Lauren and Lisa, were raised by their mother, Ann Freeman, a teacher and administrator in the New York public schools, and their stepfather, orthopedic surgeon Richard Freeman.
70
+
71
+ Lauren Bessette, 18 months older than Carolyn, graduated from Greenwich High School in 1982. She worked as an investment banker at Morgan Stanley Dean Witter in New York City; a card from that company bearing her name was found attached to luggage that washed ashore off Martha's Vineyard on Saturday.
72
+
73
+ Bessette Kennedy, 33, married Kennedy in September 1996. When she graduated from St. Mary's in 1983, she was voted ``The Ultimate Beautiful Person'' by her classmates.
74
+
75
+ Lamoureux said the award was given to her because she ``was beautiful inside and out.''
76
+
77
+ ``Everybody in the entire class loved her,'' she said. ``We kind of knew she was really in a different realm than the rest of us.''
78
+
79
+ Authorities conceded late Sunday that John F. Kennedy Jr., his wife and her sister likely were dead. ``We are going to shift, and I say shift very purposefully, from our focus on search and rescue to search and recovery,'' Coast Guard Rear Adm. Richard M. Larrabee, the head of the search operation, said at a news conference. Larrabee noted that it would be difficult for a person to survive more than 18 hours in the area's 68-degree waters. He also said the search for Kennedy's missing plane, which has covered almost 9,000 square miles, on Sunday produced no major finds but authorities were focusing on ``a couple of targets.''
80
+
81
+ Cable and broadcast news shows focused on the fate of John F. Kennedy Jr., his wife, Carolyn Bessette Kennedy, and his sister-in-law Lauren Bessette, who were feared dead after their plane went down off the Massachusetts coast Friday night. Sunday's newspapers devoted page after page to coverage of the search. While The New York Times placed the story on the left-hand, secondary spot on its front page, The Washington Post ran the banner headline ``JFK Jr. Feared Dead in Plane Crash,'' and the New York Post cried, ``MORE TEARS.''
82
+
83
+ An Iraqi opposition group claimed Sunday that its guerrillas in southern Iraq killed four security officials and wounded two others in an attack on a checkpoint. The Islamic Action Organization, or IAO, a Shiite Muslim group based in Syria, said the attack was carried out Saturday after locals complained about ``despicable behavior'' by the security officials at the checkpoint. The claim could not be independently verified. The Iraqi government does not respond to reports by opposition groups.
84
+
85
+ President Jiang Zemin told President Clinton Sunday that China has not ruled out using force against Taiwan if the island tries to split from the mainland, according to the official Xinhua News Agency. The report was the highest-level threat yet in an eight-day-old Chinese war of words against the island, which Beijing regards as a renegade province. Jiang made the comment in a telephone call to Clinton, Xinhua said. China and Taiwan have been ruled separately since a civil war 50 years ago. Both say they are part of the same country. China's comments came hours after Taiwan dismissed reports that China was preparing military action.
86
+
87
+ More than 1,000 of some 15,000 Kosovo refugees taken in by Germany have returned home, with more volunteering to return next week, the Interior Ministry said Sunday. Two flights bearing a total of 220 more refugees are due to leave the northwestern town of Muenster tomorrow and Tuesday to fly to the Macedonian capital of Skopje, the ministry said. From Skopje, the refugees will be taken by bus into Kosovo, the ministry said in a statement.
88
+
89
+ Americans were victims of about 8.1 million violent crimes last year, a 7 percent drop from 1997 and the lowest number reported since the Justice Department began tracking the figure in 1973. A report released Sunday called the one-year drop ``marginally significant,'' driven by a small but significant decline in aggravated assault rates. Attorney General Janet Reno said several Clinton administration policies, including more police officers on the streets, tougher sentences, more prosecutions, better prevention programs and a healthy economy led to the decline.
90
+
91
+ Japanese stocks rose Monday morning, bolstered by Friday's record closing-high on Wall Street and expectations the Japanese government may consider a supplementary budget. The Nikkei rose 178.40 points to finish the morning session at 18,426.70. In New York on Friday, the Dow rose 23.43 points to 11,209.84.
92
+
93
+ David Cone dazzled the Montreal Expos with a wide assortment of pitches, throwing the 14th perfect game in modern history to lead the Yankees to a 6-0 victory. After getting Orlando Cabrera to hit a popup for the final out, Cone dropped to his knees, grabbed his head in disbelief and was mobbed by his joyous teammates. It was replay of the scene from last year when David Wells pitched the only other regular-season perfect game in Yankees' history.
94
+
95
+ The Seattle Mariners on Sunday announced they signed high school catcher Ryan Christianson, their first-round pick and the 11th overall selection in last month's baseball draft.
96
+
97
+ Christianson, 18, from Arlington High School in Riverside, Calif., will report to the Mariners' rookie league team in Peoria, Ariz. If he plays well there, he could be elevated to Class A Everett of the Northwest League in ``a couple of weeks,'' said Frank Mattox, the team's director of scouting.
98
+
data/test/test.rb ADDED
@@ -0,0 +1,21 @@
1
+ require '../lib/tactful_tokenizer'
2
+ require 'test/unit'
3
+
4
+ class TactfulTokenize < Test::Unit::TestCase
5
+ def test_simple
6
+ m = TactfulTokenizer::Model.new
7
+ File.open("sample.txt") do |f|
8
+ text = f.read
9
+ text = m.tokenize_text(text)
10
+ File.open("test_out.txt","w+") do |g|
11
+ text.each do |line|
12
+ g.puts line unless line.empty?
13
+ end
14
+ g.rewind
15
+ t2 = g.read
16
+ t1 = File.open("verification_out.txt").read
17
+ assert_equal(t1, t2)
18
+ end
19
+ end
20
+ end
21
+ end
data/test/test_out.txt ADDED
@@ -0,0 +1,94 @@
1
+ Maria and Ted Bobola grow sweet corn.
2
+ But with little corn to harvest because of a plant-withering drought, the Bobolas were forced to buy corn from Georgia to supply their produce and flower shop just outside Dover.
3
+ And most years, the strawberry picking season runs three to five weeks, but not this year, store manager Dee Chambers said.
4
+ ``It was so hot and dry that even though we irrigated, we had only two weeks in the season,'' she said.
5
+ They did not recoup $70,000 they paid for strawberry plants last year in this year's harvest.
6
+ ``It was just a hard growing season.''
7
+ Similar stories are being told by farmers across the Delmarva peninsula this year.
8
+ The drought and record high temperatures in late June and early July in the mid-Atlantic region has lowered the yields of corn and soybean the two most important field crops in Delmarva.
9
+ Meanwhile, farmers in the Midwest and the South are enjoying a bumper crop.
10
+ The plentiful supply has lowered prices across the nation.
11
+ Anticipating low prices, many Delmarva farmers switched this year to fruits and vegetables such as watermelons, cantaloupes, tomatoes, potatoes, peas, beans.
12
+ That also has turned out to be a bad move, farmers and agricultural officials say.
13
+ The unusually warm temperatures have sped the growing season in Pennsylvania, New Jersey and New York, so the Delmarva market is experiencing a glut.
14
+ Translation: Rock-bottom prices for local growers.
15
+ ``You're going to lose farmers to bankruptcy; there's no way else to say it,'' says Turp Garrett, the agricultural extension agent for Worcester County, Md.
16
+ ``It's not very pretty.''
17
+ And if bankruptcy doesn't do them in, many farmers will likely quit because the financial stress is simply too much, he said.
18
+ This is the second year in a row that Delmarva farmers are experiencing a less-than-stellar growing season.
19
+ Consumers most likely will not see lower prices in the grocery stores.
20
+ ``It's not being passed on to the consumer by any means.
21
+ The middleman always makes money in these situations,'' said Francis Breeding of the University of Maryland's Cooperative Extension Office in Queen Anne's County, Md.
22
+ Normally, the growing season is staggered along the Eastern seaboard, which helps stabilize prices and supply, Breeding said.
23
+ This year, ideal weather in the South led to longer growing and harvesting seasons and unusually warm weather ushered in the season earlier up north, Breeding said.
24
+ Delmarva farmers are finding themselves squeezed.
25
+ ``This is the absolute worst year in history.
26
+ There's absolute nothing ... that's making the economics work out,'' said Ray Wolf, who owns the 70-acre Cornerstone Farm in Hurlock, Md.
27
+ ``At today's grain prices ... somebody's going to go hungry.''
28
+ How bad are the grain prices?
29
+ Growers normally need about $2 per dozen ears of corn to break even, but this year they'd be lucky if they could they could get $1.10 per dozen from grocery stores, Wolf said.
30
+ At his own stand, he was able to sell a dozen ears of corn for $3 in previous years, but is charging only $2 this season to stay competitive.
31
+ Fruits and vegetables are faring no better.
32
+ A 20-pound watermelon usually fetches about $2 wholesale, but now the same fruit is going for about 60 cents, Breeding said.
33
+ The Bessette family enjoyed a relatively quiet life before Carolyn Bessette married into America's most famous family.
34
+ Now the Bessettes are in seclusion as they await further word on their two beautiful daughters and their son-in-law all presumed dead in a plane crash.
35
+ Friends of Carolyn Bessette Kennedy and Lauren Bessette gathered Sunday at a Mass in the town where the young women grew up, offering condolences and memories of women who they say were captivating long before they joined the Kennedy clan.
36
+ Some said they were praying for a miracle.
37
+ Others simply prayed for strength for two families.
38
+ ``For the Kennedys, it's more than any family should have to bear.
39
+ And for the Bessettes, I feel so sorry for this family who are waiting for two daughters to come home,'' said Olive Curran, who knelt in the front pew of St. Michael's Church in Greenwich and said a special rosary for both families.
40
+ Curran, a native of Ireland, said she became friends with JFK Jr.'s aunt, Jean Kennedy Smith, during Kennedy Smith's 1993-98 stint as ambassador to Ireland.
41
+ John F. Kennedy Jr., 38; his wife, Bessette Kennedy, 33; and her sister, Lauren Bessette, 35, have been missing since Friday evening when Kennedy's plane left Fairfield, N.J., for Cape Cod, Mass., for a Kennedy cousin's wedding.
42
+ Authorities conceded late Sunday, after two days of searching waters off Martha's Vineyard, that the three were presumed dead.
43
+ ``It's just tragic,'' said Debbie Lamoureux, who attended St. Mary High School with the former Carolyn Bessette.
44
+ Robert Cardini, who attended middle school with Carolyn, hasn't seen her in nearly 20 years.
45
+ He and another childhood friend stopped by St. Michael's on Sunday to drop off two bouquets.
46
+ ``We wanted to let her know we're thinking about her,'' he said.
47
+ ``She was a great kid.
48
+ She was always smiling a beautiful girl.''
49
+ The flowers were placed in front of three white candles lit for Kennedy, his wife and sister-in-law.
50
+ The Rev. Michael Moynihan, pastor of St. Michael's, gathered a group of about 40 children by the altar to explain what had happened.
51
+ He told them that some of their parents went to St. Mary High School with Carolyn Bessette.
52
+ ``We pray in a very special way today for three people who were in a plane accident,'' Moynihan said.
53
+ The Bessette family stayed inside their home Sunday as a steady stream of visitors came and went.
54
+ Greenwich police stationed cruisers outside the modest cape house and at the end of the private road that leads to it.
55
+ Carolyn and her twin sisters, Lauren and Lisa, were raised by their mother, Ann Freeman, a teacher and administrator in the New York public schools, and their stepfather, orthopedic surgeon Richard Freeman.
56
+ Lauren Bessette, 18 months older than Carolyn, graduated from Greenwich High School in 1982.
57
+ She worked as an investment banker at Morgan Stanley Dean Witter in New York City; a card from that company bearing her name was found attached to luggage that washed ashore off Martha's Vineyard on Saturday.
58
+ Bessette Kennedy, 33, married Kennedy in September 1996.
59
+ When she graduated from St. Mary's in 1983, she was voted ``The Ultimate Beautiful Person'' by her classmates.
60
+ Lamoureux said the award was given to her because she ``was beautiful inside and out.''
61
+ ``Everybody in the entire class loved her,'' she said.
62
+ ``We kind of knew she was really in a different realm than the rest of us.''
63
+ Authorities conceded late Sunday that John F. Kennedy Jr., his wife and her sister likely were dead.
64
+ ``We are going to shift, and I say shift very purposefully, from our focus on search and rescue to search and recovery,'' Coast Guard Rear Adm. Richard M. Larrabee, the head of the search operation, said at a news conference.
65
+ Larrabee noted that it would be difficult for a person to survive more than 18 hours in the area's 68-degree waters.
66
+ He also said the search for Kennedy's missing plane, which has covered almost 9,000 square miles, on Sunday produced no major finds but authorities were focusing on ``a couple of targets.''
67
+ Cable and broadcast news shows focused on the fate of John F. Kennedy Jr., his wife, Carolyn Bessette Kennedy, and his sister-in-law Lauren Bessette, who were feared dead after their plane went down off the Massachusetts coast Friday night.
68
+ Sunday's newspapers devoted page after page to coverage of the search.
69
+ While The New York Times placed the story on the left-hand, secondary spot on its front page, The Washington Post ran the banner headline ``JFK Jr. Feared Dead in Plane Crash,'' and the New York Post cried, ``MORE TEARS.''
70
+ An Iraqi opposition group claimed Sunday that its guerrillas in southern Iraq killed four security officials and wounded two others in an attack on a checkpoint.
71
+ The Islamic Action Organization, or IAO, a Shiite Muslim group based in Syria, said the attack was carried out Saturday after locals complained about ``despicable behavior'' by the security officials at the checkpoint.
72
+ The claim could not be independently verified.
73
+ The Iraqi government does not respond to reports by opposition groups.
74
+ President Jiang Zemin told President Clinton Sunday that China has not ruled out using force against Taiwan if the island tries to split from the mainland, according to the official Xinhua News Agency.
75
+ The report was the highest-level threat yet in an eight-day-old Chinese war of words against the island, which Beijing regards as a renegade province.
76
+ Jiang made the comment in a telephone call to Clinton, Xinhua said.
77
+ China and Taiwan have been ruled separately since a civil war 50 years ago.
78
+ Both say they are part of the same country.
79
+ China's comments came hours after Taiwan dismissed reports that China was preparing military action.
80
+ More than 1,000 of some 15,000 Kosovo refugees taken in by Germany have returned home, with more volunteering to return next week, the Interior Ministry said Sunday.
81
+ Two flights bearing a total of 220 more refugees are due to leave the northwestern town of Muenster tomorrow and Tuesday to fly to the Macedonian capital of Skopje, the ministry said.
82
+ From Skopje, the refugees will be taken by bus into Kosovo, the ministry said in a statement.
83
+ Americans were victims of about 8.1 million violent crimes last year, a 7 percent drop from 1997 and the lowest number reported since the Justice Department began tracking the figure in 1973.
84
+ A report released Sunday called the one-year drop ``marginally significant,'' driven by a small but significant decline in aggravated assault rates.
85
+ Attorney General Janet Reno said several Clinton administration policies, including more police officers on the streets, tougher sentences, more prosecutions, better prevention programs and a healthy economy led to the decline.
86
+ Japanese stocks rose Monday morning, bolstered by Friday's record closing-high on Wall Street and expectations the Japanese government may consider a supplementary budget.
87
+ The Nikkei rose 178.40 points to finish the morning session at 18,426.70.
88
+ In New York on Friday, the Dow rose 23.43 points to 11,209.84.
89
+ David Cone dazzled the Montreal Expos with a wide assortment of pitches, throwing the 14th perfect game in modern history to lead the Yankees to a 6-0 victory.
90
+ After getting Orlando Cabrera to hit a popup for the final out, Cone dropped to his knees, grabbed his head in disbelief and was mobbed by his joyous teammates.
91
+ It was replay of the scene from last year when David Wells pitched the only other regular-season perfect game in Yankees' history.
92
+ The Seattle Mariners on Sunday announced they signed high school catcher Ryan Christianson, their first-round pick and the 11th overall selection in last month's baseball draft.
93
+ Christianson, 18, from Arlington High School in Riverside, Calif., will report to the Mariners' rookie league team in Peoria, Ariz.
94
+ If he plays well there, he could be elevated to Class A Everett of the Northwest League in ``a couple of weeks,'' said Frank Mattox, the team's director of scouting.
@@ -0,0 +1,94 @@
1
+ Maria and Ted Bobola grow sweet corn.
2
+ But with little corn to harvest because of a plant-withering drought, the Bobolas were forced to buy corn from Georgia to supply their produce and flower shop just outside Dover.
3
+ And most years, the strawberry picking season runs three to five weeks, but not this year, store manager Dee Chambers said.
4
+ ``It was so hot and dry that even though we irrigated, we had only two weeks in the season,'' she said.
5
+ They did not recoup $70,000 they paid for strawberry plants last year in this year's harvest.
6
+ ``It was just a hard growing season.''
7
+ Similar stories are being told by farmers across the Delmarva peninsula this year.
8
+ The drought and record high temperatures in late June and early July in the mid-Atlantic region has lowered the yields of corn and soybean the two most important field crops in Delmarva.
9
+ Meanwhile, farmers in the Midwest and the South are enjoying a bumper crop.
10
+ The plentiful supply has lowered prices across the nation.
11
+ Anticipating low prices, many Delmarva farmers switched this year to fruits and vegetables such as watermelons, cantaloupes, tomatoes, potatoes, peas, beans.
12
+ That also has turned out to be a bad move, farmers and agricultural officials say.
13
+ The unusually warm temperatures have sped the growing season in Pennsylvania, New Jersey and New York, so the Delmarva market is experiencing a glut.
14
+ Translation: Rock-bottom prices for local growers.
15
+ ``You're going to lose farmers to bankruptcy; there's no way else to say it,'' says Turp Garrett, the agricultural extension agent for Worcester County, Md.
16
+ ``It's not very pretty.''
17
+ And if bankruptcy doesn't do them in, many farmers will likely quit because the financial stress is simply too much, he said.
18
+ This is the second year in a row that Delmarva farmers are experiencing a less-than-stellar growing season.
19
+ Consumers most likely will not see lower prices in the grocery stores.
20
+ ``It's not being passed on to the consumer by any means.
21
+ The middleman always makes money in these situations,'' said Francis Breeding of the University of Maryland's Cooperative Extension Office in Queen Anne's County, Md.
22
+ Normally, the growing season is staggered along the Eastern seaboard, which helps stabilize prices and supply, Breeding said.
23
+ This year, ideal weather in the South led to longer growing and harvesting seasons and unusually warm weather ushered in the season earlier up north, Breeding said.
24
+ Delmarva farmers are finding themselves squeezed.
25
+ ``This is the absolute worst year in history.
26
+ There's absolute nothing ... that's making the economics work out,'' said Ray Wolf, who owns the 70-acre Cornerstone Farm in Hurlock, Md.
27
+ ``At today's grain prices ... somebody's going to go hungry.''
28
+ How bad are the grain prices?
29
+ Growers normally need about $2 per dozen ears of corn to break even, but this year they'd be lucky if they could they could get $1.10 per dozen from grocery stores, Wolf said.
30
+ At his own stand, he was able to sell a dozen ears of corn for $3 in previous years, but is charging only $2 this season to stay competitive.
31
+ Fruits and vegetables are faring no better.
32
+ A 20-pound watermelon usually fetches about $2 wholesale, but now the same fruit is going for about 60 cents, Breeding said.
33
+ The Bessette family enjoyed a relatively quiet life before Carolyn Bessette married into America's most famous family.
34
+ Now the Bessettes are in seclusion as they await further word on their two beautiful daughters and their son-in-law all presumed dead in a plane crash.
35
+ Friends of Carolyn Bessette Kennedy and Lauren Bessette gathered Sunday at a Mass in the town where the young women grew up, offering condolences and memories of women who they say were captivating long before they joined the Kennedy clan.
36
+ Some said they were praying for a miracle.
37
+ Others simply prayed for strength for two families.
38
+ ``For the Kennedys, it's more than any family should have to bear.
39
+ And for the Bessettes, I feel so sorry for this family who are waiting for two daughters to come home,'' said Olive Curran, who knelt in the front pew of St. Michael's Church in Greenwich and said a special rosary for both families.
40
+ Curran, a native of Ireland, said she became friends with JFK Jr.'s aunt, Jean Kennedy Smith, during Kennedy Smith's 1993-98 stint as ambassador to Ireland.
41
+ John F. Kennedy Jr., 38; his wife, Bessette Kennedy, 33; and her sister, Lauren Bessette, 35, have been missing since Friday evening when Kennedy's plane left Fairfield, N.J., for Cape Cod, Mass., for a Kennedy cousin's wedding.
42
+ Authorities conceded late Sunday, after two days of searching waters off Martha's Vineyard, that the three were presumed dead.
43
+ ``It's just tragic,'' said Debbie Lamoureux, who attended St. Mary High School with the former Carolyn Bessette.
44
+ Robert Cardini, who attended middle school with Carolyn, hasn't seen her in nearly 20 years.
45
+ He and another childhood friend stopped by St. Michael's on Sunday to drop off two bouquets.
46
+ ``We wanted to let her know we're thinking about her,'' he said.
47
+ ``She was a great kid.
48
+ She was always smiling a beautiful girl.''
49
+ The flowers were placed in front of three white candles lit for Kennedy, his wife and sister-in-law.
50
+ The Rev. Michael Moynihan, pastor of St. Michael's, gathered a group of about 40 children by the altar to explain what had happened.
51
+ He told them that some of their parents went to St. Mary High School with Carolyn Bessette.
52
+ ``We pray in a very special way today for three people who were in a plane accident,'' Moynihan said.
53
+ The Bessette family stayed inside their home Sunday as a steady stream of visitors came and went.
54
+ Greenwich police stationed cruisers outside the modest cape house and at the end of the private road that leads to it.
55
+ Carolyn and her twin sisters, Lauren and Lisa, were raised by their mother, Ann Freeman, a teacher and administrator in the New York public schools, and their stepfather, orthopedic surgeon Richard Freeman.
56
+ Lauren Bessette, 18 months older than Carolyn, graduated from Greenwich High School in 1982.
57
+ She worked as an investment banker at Morgan Stanley Dean Witter in New York City; a card from that company bearing her name was found attached to luggage that washed ashore off Martha's Vineyard on Saturday.
58
+ Bessette Kennedy, 33, married Kennedy in September 1996.
59
+ When she graduated from St. Mary's in 1983, she was voted ``The Ultimate Beautiful Person'' by her classmates.
60
+ Lamoureux said the award was given to her because she ``was beautiful inside and out.''
61
+ ``Everybody in the entire class loved her,'' she said.
62
+ ``We kind of knew she was really in a different realm than the rest of us.''
63
+ Authorities conceded late Sunday that John F. Kennedy Jr., his wife and her sister likely were dead.
64
+ ``We are going to shift, and I say shift very purposefully, from our focus on search and rescue to search and recovery,'' Coast Guard Rear Adm. Richard M. Larrabee, the head of the search operation, said at a news conference.
65
+ Larrabee noted that it would be difficult for a person to survive more than 18 hours in the area's 68-degree waters.
66
+ He also said the search for Kennedy's missing plane, which has covered almost 9,000 square miles, on Sunday produced no major finds but authorities were focusing on ``a couple of targets.''
67
+ Cable and broadcast news shows focused on the fate of John F. Kennedy Jr., his wife, Carolyn Bessette Kennedy, and his sister-in-law Lauren Bessette, who were feared dead after their plane went down off the Massachusetts coast Friday night.
68
+ Sunday's newspapers devoted page after page to coverage of the search.
69
+ While The New York Times placed the story on the left-hand, secondary spot on its front page, The Washington Post ran the banner headline ``JFK Jr. Feared Dead in Plane Crash,'' and the New York Post cried, ``MORE TEARS.''
70
+ An Iraqi opposition group claimed Sunday that its guerrillas in southern Iraq killed four security officials and wounded two others in an attack on a checkpoint.
71
+ The Islamic Action Organization, or IAO, a Shiite Muslim group based in Syria, said the attack was carried out Saturday after locals complained about ``despicable behavior'' by the security officials at the checkpoint.
72
+ The claim could not be independently verified.
73
+ The Iraqi government does not respond to reports by opposition groups.
74
+ President Jiang Zemin told President Clinton Sunday that China has not ruled out using force against Taiwan if the island tries to split from the mainland, according to the official Xinhua News Agency.
75
+ The report was the highest-level threat yet in an eight-day-old Chinese war of words against the island, which Beijing regards as a renegade province.
76
+ Jiang made the comment in a telephone call to Clinton, Xinhua said.
77
+ China and Taiwan have been ruled separately since a civil war 50 years ago.
78
+ Both say they are part of the same country.
79
+ China's comments came hours after Taiwan dismissed reports that China was preparing military action.
80
+ More than 1,000 of some 15,000 Kosovo refugees taken in by Germany have returned home, with more volunteering to return next week, the Interior Ministry said Sunday.
81
+ Two flights bearing a total of 220 more refugees are due to leave the northwestern town of Muenster tomorrow and Tuesday to fly to the Macedonian capital of Skopje, the ministry said.
82
+ From Skopje, the refugees will be taken by bus into Kosovo, the ministry said in a statement.
83
+ Americans were victims of about 8.1 million violent crimes last year, a 7 percent drop from 1997 and the lowest number reported since the Justice Department began tracking the figure in 1973.
84
+ A report released Sunday called the one-year drop ``marginally significant,'' driven by a small but significant decline in aggravated assault rates.
85
+ Attorney General Janet Reno said several Clinton administration policies, including more police officers on the streets, tougher sentences, more prosecutions, better prevention programs and a healthy economy led to the decline.
86
+ Japanese stocks rose Monday morning, bolstered by Friday's record closing-high on Wall Street and expectations the Japanese government may consider a supplementary budget.
87
+ The Nikkei rose 178.40 points to finish the morning session at 18,426.70.
88
+ In New York on Friday, the Dow rose 23.43 points to 11,209.84.
89
+ David Cone dazzled the Montreal Expos with a wide assortment of pitches, throwing the 14th perfect game in modern history to lead the Yankees to a 6-0 victory.
90
+ After getting Orlando Cabrera to hit a popup for the final out, Cone dropped to his knees, grabbed his head in disbelief and was mobbed by his joyous teammates.
91
+ It was replay of the scene from last year when David Wells pitched the only other regular-season perfect game in Yankees' history.
92
+ The Seattle Mariners on Sunday announced they signed high school catcher Ryan Christianson, their first-round pick and the 11th overall selection in last month's baseball draft.
93
+ Christianson, 18, from Arlington High School in Riverside, Calif., will report to the Mariners' rookie league team in Peoria, Ariz.
94
+ If he plays well there, he could be elevated to Class A Everett of the Northwest League in ``a couple of weeks,'' said Frank Mattox, the team's director of scouting.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Bunday
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3+l7cSZt
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2010-03-23 00:00:00 -05:00
38
+ date: 2010-04-04 00:00:00 -05:00
39
39
  default_executable:
40
40
  dependencies: []
41
41
 
@@ -61,6 +61,10 @@ files:
61
61
  - lib/models/non_abbrs.mar
62
62
  - lib/tactful_tokenizer.rb
63
63
  - lib/word_tokenizer.rb
64
+ - test/sample.txt
65
+ - test/test.rb
66
+ - test/test_out.txt
67
+ - test/verification_out.txt
64
68
  - tactful_tokenizer.gemspec
65
69
  has_rdoc: true
66
70
  homepage: http://github.com/SlyShy/Tactful_Tokenizer
metadata.gz.sig CHANGED
Binary file