nomener 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/nomener/compounders.rb +1 -0
- data/lib/nomener/suffixes.rb +5 -1
- data/lib/nomener/titles.rb +2 -2
- data/lib/nomener/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5762b1f570b9c2f0b389d4e024032626db1df55a
|
|
4
|
+
data.tar.gz: 655fa7880f037c3588e839478d0a3f413e273b38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2f07a6b144c146ae69f9db8099fce9b241510148a7e36d54c576564c37ff608816c1a2cee92f288f3a6881270cbe8835677417ca42e410b327d022ad44e1e8b
|
|
7
|
+
data.tar.gz: c8bfc7bc996638f3043029008de2b4bdb7c93114244591eb79d23173f556fed9757f1b1510ee4a51b8d0d20959454d28d8f8661476b10da307bef398fdc0e23a
|
data/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Nomener
|
|
2
|
+
[](http://badge.fury.io/rb/nomener)
|
|
2
3
|
|
|
3
4
|
Nomener assists with parsing peoples names that they give themselves (or other people). Nomener is a fork of [People](https://github.com/dan-ding/people) as it uses some code contributed there. It's currently geared towards western style name formatting, however other cultural name formatting is (or would like to be supported).Currently it attempts to parse names through pattern matching without using dictionary/library/data files (except for name decorations and suffixes, see usage). It may not be possible to do without such in all languages.
|
|
4
5
|
|
data/lib/nomener/compounders.rb
CHANGED
data/lib/nomener/suffixes.rb
CHANGED
|
@@ -9,10 +9,13 @@ module Nomener
|
|
|
9
9
|
| B[AS]c? # Bachelor of Arts, Bachelor of Science
|
|
10
10
|
| C\.?P\.?A\.?
|
|
11
11
|
| CHB
|
|
12
|
+
| DBE
|
|
12
13
|
| D\.?[DMOPV]\.?[SMD]?\.? # DMD, DO, DPM, DDM, DVM
|
|
13
14
|
| DSC
|
|
14
15
|
| Esq(?:\.|uire\.?)? # Esq, Esquire
|
|
15
16
|
| FAC(?:P|S) # FACP, FACS
|
|
17
|
+
| fils
|
|
18
|
+
| FRSL
|
|
16
19
|
| [(?:X{1,3})(?:IX|IV|V)(?:I{0,3})]{1,}\b # roman numbers I - XXXXVIII, if they're written proper
|
|
17
20
|
| Jn?r\.?
|
|
18
21
|
| Junior
|
|
@@ -21,13 +24,14 @@ module Nomener
|
|
|
21
24
|
| MPH
|
|
22
25
|
| P\.?\p{Blank}?A\.?
|
|
23
26
|
| PC
|
|
27
|
+
| p[èe]re
|
|
24
28
|
| Ph\.?\p{Blank}?D\.?
|
|
25
29
|
| RN
|
|
26
30
|
| SC
|
|
27
31
|
| Sn?r\.? # Snr, Sr
|
|
28
32
|
| Senior
|
|
29
33
|
| V\.?M\.?D\.?
|
|
30
|
-
)!
|
|
34
|
+
)!x
|
|
31
35
|
end
|
|
32
36
|
end
|
|
33
37
|
|
data/lib/nomener/titles.rb
CHANGED
|
@@ -2,7 +2,7 @@ module Nomener
|
|
|
2
2
|
module Titles
|
|
3
3
|
|
|
4
4
|
# Internal: Regex for matching name prefixes such as honorifics and other formalities
|
|
5
|
-
TITLES = %r
|
|
5
|
+
TITLES = %r!\b(
|
|
6
6
|
خانم # Persian Mrs ?
|
|
7
7
|
| (?:רעב|'ר) # Yiddish Mr.
|
|
8
8
|
| አቶ # Amharic Mr.
|
|
@@ -95,6 +95,6 @@ module Nomener
|
|
|
95
95
|
| Sr(?:a|ta)?\.?
|
|
96
96
|
| V\.?\ Revd?\.?
|
|
97
97
|
| Very\ Rever[e|a]nd
|
|
98
|
-
)!xi
|
|
98
|
+
)\b!xi
|
|
99
99
|
end
|
|
100
100
|
end
|
data/lib/nomener/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nomener
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dante Piombino
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-04-
|
|
11
|
+
date: 2015-04-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|