namae 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -1
- data/lib/namae/parser.rb +35 -35
- data/lib/namae/parser.y +1 -1
- data/lib/namae/version.rb +1 -1
- data/namae.gemspec +4 -4
- data/spec/namae/parser_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5886d09f3a99ae9c6d897af710e9e21e4d3cf61beb26594218206793e34e10f3
|
4
|
+
data.tar.gz: 261c350457bd0b93b2dbf9f3af7cfa66df193094116c93dcb604461cce8a444f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69638c2a57cfd916cd57d09eba680a905c0c6d35bb3d67bbfb009406e799529badfef261e50c53222fea7dd1656cde3618abd62eebf44de743c8f26d4b2a2cd8
|
7
|
+
data.tar.gz: 96e040cd84b8bddb1bc08b9448aa5d5c9e0d26a6f5254e4b97cfda6383ffc72c6ec9b9dec2af4d6c5989378f20474ad4b054cdda3023e3bc82ca18ec6c576991
|
data/.travis.yml
CHANGED
data/lib/namae/parser.rb
CHANGED
@@ -19,7 +19,7 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 106)
|
|
19
19
|
:comma => ',',
|
20
20
|
:stops => ',;',
|
21
21
|
:separator => /\s*(\band\b|\&|;)\s*/i,
|
22
|
-
:title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|pastor|pr|reverend|rev|elder|deacon|deaconess|father|fr|vicar|prof|dr|md|ph\.?d)\.?)(\s+|$)/i,
|
22
|
+
:title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|pastor|pr|reverend|rev|elder|deacon|deaconess|father|fr|rabbi|cantor|vicar|prof|dr|md|ph\.?d)\.?)(\s+|$)/i,
|
23
23
|
:suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/,
|
24
24
|
:appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i
|
25
25
|
}
|
@@ -195,40 +195,40 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 106)
|
|
195
195
|
##### State transition tables begin ###
|
196
196
|
|
197
197
|
racc_action_table = [
|
198
|
-
-39,
|
199
|
-
-39, -40, 67, -40, -40, 66, 53, 52, 54,
|
200
|
-
59,
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
31,
|
207
|
-
30, 28, 31,
|
208
|
-
|
198
|
+
-39, 53, 52, 54, -40, 39, 62, -39, 39, -39,
|
199
|
+
-39, -40, 67, -40, -40, 66, 53, 52, 54, 32,
|
200
|
+
59, 16, 58, -34, 53, 52, 54, -38, 17, -22,
|
201
|
+
30, 39, 31, 45, -38, 53, 52, 54, 14, 12,
|
202
|
+
15, 68, 39, 7, 8, 14, 12, 15, 58, 33,
|
203
|
+
7, 8, 14, 22, 15, 24, 14, 22, 15, 24,
|
204
|
+
-19, -19, -19, 30, 42, 31, 30, 28, 31, -20,
|
205
|
+
-20, -20, 30, 46, 31, 53, 52, 54, 30, 28,
|
206
|
+
31, 30, 28, 31, 30, 28, 31, -19, -19, -19,
|
207
|
+
30, 28, 31, 14, 22, 15, 53, 52, 54, 39,
|
208
|
+
58, 59, 39, 59, 39 ]
|
209
209
|
|
210
210
|
racc_action_check = [
|
211
|
-
14,
|
212
|
-
14, 15, 50, 15, 15, 49, 49, 49, 49,
|
213
|
-
50,
|
214
|
-
|
215
|
-
|
216
|
-
17,
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
211
|
+
14, 32, 32, 32, 15, 64, 44, 14, 32, 14,
|
212
|
+
14, 15, 50, 15, 15, 49, 49, 49, 49, 11,
|
213
|
+
50, 1, 70, 49, 45, 45, 45, 12, 1, 12,
|
214
|
+
43, 45, 43, 27, 12, 62, 62, 62, 0, 0,
|
215
|
+
0, 57, 62, 0, 0, 17, 17, 17, 60, 16,
|
216
|
+
17, 17, 20, 20, 20, 20, 9, 9, 9, 9,
|
217
|
+
22, 22, 22, 24, 24, 24, 25, 25, 25, 28,
|
218
|
+
28, 28, 29, 29, 29, 73, 73, 73, 21, 21,
|
219
|
+
21, 35, 35, 35, 41, 41, 41, 42, 42, 42,
|
220
|
+
10, 10, 10, 5, 5, 5, 67, 67, 67, 61,
|
221
|
+
37, 38, 40, 72, 23 ]
|
222
222
|
|
223
223
|
racc_action_pointer = [
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
nil, nil,
|
228
|
-
|
229
|
-
10, nil, nil, nil, nil, nil, nil,
|
230
|
-
|
231
|
-
|
224
|
+
35, 21, nil, nil, nil, 90, nil, nil, nil, 53,
|
225
|
+
87, 17, 27, nil, 0, 4, 49, 42, nil, nil,
|
226
|
+
49, 75, 57, 94, 60, 63, nil, 31, 66, 69,
|
227
|
+
nil, nil, -2, nil, nil, 78, nil, 91, 91, nil,
|
228
|
+
92, 81, 84, 27, 4, 21, nil, nil, nil, 13,
|
229
|
+
10, nil, nil, nil, nil, nil, nil, 32, nil, nil,
|
230
|
+
39, 89, 32, nil, -5, nil, nil, 93, nil, nil,
|
231
|
+
13, nil, 93, 72, nil ]
|
232
232
|
|
233
233
|
racc_action_default = [
|
234
234
|
-1, -49, -2, -4, -5, -49, -8, -9, -10, -23,
|
@@ -242,7 +242,7 @@ racc_action_default = [
|
|
242
242
|
|
243
243
|
racc_goto_table = [
|
244
244
|
3, 37, 26, 50, 56, 18, 2, 9, 47, 23,
|
245
|
-
|
245
|
+
73, 64, 20, 26, 19, 27, 50, 3, 60, 1,
|
246
246
|
23, 63, 26, 34, 9, nil, 36, 69, 21, 40,
|
247
247
|
44, 43, 25, 50, nil, 72, 26, 74, 71, 70,
|
248
248
|
55, nil, nil, 35, nil, nil, 61, 41, nil, 65,
|
@@ -252,7 +252,7 @@ racc_goto_table = [
|
|
252
252
|
|
253
253
|
racc_goto_check = [
|
254
254
|
3, 8, 17, 16, 9, 3, 2, 7, 12, 3,
|
255
|
-
|
255
|
+
14, 15, 7, 17, 4, 10, 16, 3, 8, 1,
|
256
256
|
3, 12, 17, 2, 7, nil, 10, 9, 11, 10,
|
257
257
|
10, 7, 11, 16, nil, 16, 17, 9, 12, 8,
|
258
258
|
10, nil, nil, 11, nil, nil, 10, 11, nil, 3,
|
@@ -261,8 +261,8 @@ racc_goto_check = [
|
|
261
261
|
nil, nil, nil, 3 ]
|
262
262
|
|
263
263
|
racc_goto_pointer = [
|
264
|
-
nil,
|
265
|
-
5, 23, -24, nil, -
|
264
|
+
nil, 19, 6, 0, 9, nil, nil, 7, -22, -33,
|
265
|
+
5, 23, -24, nil, -57, -38, -29, -7, nil ]
|
266
266
|
|
267
267
|
racc_goto_default = [
|
268
268
|
nil, nil, nil, 51, 4, 5, 6, 29, nil, nil,
|
data/lib/namae/parser.y
CHANGED
@@ -110,7 +110,7 @@ require 'strscan'
|
|
110
110
|
:comma => ',',
|
111
111
|
:stops => ',;',
|
112
112
|
:separator => /\s*(\band\b|\&|;)\s*/i,
|
113
|
-
:title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|pastor|pr|reverend|rev|elder|deacon|deaconess|father|fr|vicar|prof|dr|md|ph\.?d)\.?)(\s+|$)/i,
|
113
|
+
:title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|pastor|pr|reverend|rev|elder|deacon|deaconess|father|fr|rabbi|cantor|vicar|prof|dr|md|ph\.?d)\.?)(\s+|$)/i,
|
114
114
|
:suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/,
|
115
115
|
:appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i
|
116
116
|
}
|
data/lib/namae/version.rb
CHANGED
data/namae.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: namae 1.0.
|
5
|
+
# stub: namae 1.0.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "namae".freeze
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Sylvester Keil".freeze, "Dan Collis-Puro".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2018-01-08"
|
15
15
|
s.description = " Namae (\u540D\u524D) is a parser for human names. It recognizes personal names of various cultural backgrounds and tries to split them into their component parts (e.g., given and family names, honorifics etc.). ".freeze
|
16
16
|
s.email = ["sylvester@keil.or.at".freeze, "dan@collispuro.com".freeze]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
|
|
54
54
|
]
|
55
55
|
s.homepage = "https://github.com/berkmancenter/namae".freeze
|
56
56
|
s.licenses = ["AGPL-3.0".freeze]
|
57
|
-
s.rubygems_version = "2.
|
57
|
+
s.rubygems_version = "2.7.3".freeze
|
58
58
|
s.summary = "Namae (\u540D\u524D) parses personal names and splits them into their component parts.".freeze
|
59
59
|
|
60
60
|
if s.respond_to? :specification_version then
|
data/spec/namae/parser_spec.rb
CHANGED
@@ -115,7 +115,7 @@ module Namae
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
-
%w{Pastor Pr. Reverend Rev. Elder Deacon Deaconess Father Fr. Vicar}.each do |title|
|
118
|
+
%w{Pastor Pr. Reverend Rev. Elder Deacon Deaconess Father Fr. Vicar Rabbi Cantor}.each do |title|
|
119
119
|
describe "the next token is #{title.inspect}" do
|
120
120
|
before { parser.send(:input).string = title }
|
121
121
|
it 'returns a TITLE token' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: namae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: racc
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.7.3
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Namae (名前) parses personal names and splits them into their component parts.
|