people 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/LICENSE +8 -0
  2. data/README.rdoc +41 -1
  3. data/VERSION.yml +2 -1
  4. data/people.gemspec +1 -1
  5. metadata +3 -3
data/LICENSE CHANGED
@@ -18,3 +18,11 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ Parts based on the Perl Lingua-EN-NameParse module by Kim Ryan, which has the following license.
23
+
24
+ Copyright (c) 2008 Kim Ryan. All rights reserved.
25
+
26
+ This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
27
+
28
+
@@ -1,6 +1,46 @@
1
1
  = people
2
2
 
3
- Parses names into parts.
3
+ Parses names into parts. Loosely based on the Lingua-EN-NameParser Perl module.
4
+
5
+ = How to install
6
+
7
+ sudo gem install people
8
+
9
+ = How to use
10
+
11
+ require 'people'
12
+
13
+ np = People::NameParser.new
14
+
15
+ name = np.parse( "Matthew E Ericson" )
16
+ puts name[:parsed]
17
+ puts name[:orig]
18
+ puts name[:first]
19
+ puts name[:last]
20
+
21
+ If name successfully parses, name[:parsed] is set to true.
22
+
23
+ Available parts are :title, :first, :middle, :last, :suffix, :first2, :middle2, :title2, :suffix2, :orig, :match_type
24
+
25
+ By default, it will try to proper case names. If you want to leave the capitalization alone, pass :case_mode => 'leave' or for uppercase, 'upper'.
26
+
27
+ np = People::NameParser.new( :case_mode => 'proper' )
28
+ np = People::NameParser.new( :case_mode => 'leave' )
29
+ np = People::NameParser.new( :case_mode => 'upper' )
30
+
31
+ If you have names like "John and Jane Doe", pass :couples => true
32
+
33
+ np = People::NameParser.new( :couples => true, :case_mode => 'upper' )
34
+
35
+ name = np.parse( "John and Jane Doe" )
36
+ puts name[:first]
37
+ puts name[:first2]
38
+ puts name[:last]
39
+
40
+ Try it out online at http://people.ericson.net
41
+
42
+ Send suggestions to mericson at ericson dot net.
43
+
4
44
 
5
45
  == Copyright
6
46
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ :build:
2
3
  :major: 0
3
4
  :minor: 2
4
- :patch: 0
5
+ :patch: 1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{people}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Ericson"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: people
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew Ericson