beta_code 0.1.1 → 1.0.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f5f96b613c7529a9d1df08ad701b073fe512566ac9f9f55d8b0814ac07f31a62
|
4
|
+
data.tar.gz: 469f0c64350b73eaa47fa19d575e41c2fe6372ae2a87f53a3810a8aadadefdcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fc754bedbfcb47a4a4656d77e63338fb22f1f3157e88351aa57d46c582a7c2274f140ed0b095ec135d0c6419124e03d512350a9592e9423383a3207b8e08d0d
|
7
|
+
data.tar.gz: 9f75e55404c52650fe73f57a920db11bb02039fb196fbc79d08054bdf7a7714d3b3127624c9d3db693c03f8cb32e1ef17126d98130bd97af337a098e4701679e
|
data/lib/beta_code.rb
CHANGED
@@ -4,7 +4,7 @@ class BetaCode
|
|
4
4
|
def self.greek_to_beta_code(greek, custom_map: {})
|
5
5
|
map = unicode_to_beta_code_map.merge(stringify_keys(custom_map))
|
6
6
|
|
7
|
-
greek.unicode_normalize.chars.map { |c| map[c] || c }.join
|
7
|
+
greek.unicode_normalize.chars.map { |c| map[c] || c }.join
|
8
8
|
end
|
9
9
|
|
10
10
|
# This method is absurd. But having the logic all in one method makes it easier to work with than
|
@@ -26,7 +26,7 @@ class BetaCode
|
|
26
26
|
|
27
27
|
last = new_start
|
28
28
|
while last <= max_length
|
29
|
-
slice = beta_code_characters[start...last].join
|
29
|
+
slice = beta_code_characters[start...last].join
|
30
30
|
|
31
31
|
if map[slice]
|
32
32
|
current_character = map[slice]
|
@@ -40,7 +40,7 @@ class BetaCode
|
|
40
40
|
start = new_start
|
41
41
|
end
|
42
42
|
|
43
|
-
sigma_to_end_of_word_sigma(greek_characters.join
|
43
|
+
sigma_to_end_of_word_sigma(greek_characters.join)
|
44
44
|
end
|
45
45
|
# rubocop:enable Metrics/MethodLength
|
46
46
|
# rubocop:enable Metrics/AbcSize
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to make participation in the Perseids Project and
|
7
|
+
its associated community a harassment-free experience for everyone, regardless of age,
|
8
|
+
body size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies within project spaces and when
|
49
|
+
an individual is officially representing the project or its community.
|
50
|
+
Examples of representing a project or community include using an official
|
51
|
+
project e-mail address, posting via an official social media account, or acting
|
52
|
+
as an appointed representative at an online or offline event. Representation of
|
53
|
+
a project may be further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at perseids@tufts.edu. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Beta Code JSON
|
2
|
+
|
3
|
+
Map of Greek Beta Code characters to Unicode and from Unicode to Beta Code.
|
4
|
+
|
5
|
+
## Standard
|
6
|
+
|
7
|
+
The mappings in this repository aim mostly to conform to the TLG standard
|
8
|
+
specified [here](http://stephanus.tlg.uci.edu/encoding.php).
|
9
|
+
|
10
|
+
Not every application that uses Greek Beta Code follows the TLG standard exactly.
|
11
|
+
The mappings try to capture these nonstandard uses without breaking Beta Code encoded
|
12
|
+
according to the standard in the following ways:
|
13
|
+
|
14
|
+
* Lowercase Latin letters can be used in the Beta Code (e.g. `a`, `w=`)
|
15
|
+
* Uppercase Greek letters can be keyed 1. asterisk, 2. breathing, 3. accent, 4. iota subscript, 5. letter (e.g. `*(=|W`)
|
16
|
+
* Uppercase Greek letters can be keyed 1. asterisk, 2. letter, 3. breathing, 4. accent, 5. iota subscript (e.g. `*W(=|`)
|
17
|
+
|
18
|
+
## Example uses
|
19
|
+
|
20
|
+
* [https://github.com/perseids-tools/beta-code-js](https://github.com/perseids-tools/beta-code-js)
|
21
|
+
* [https://github.com/perseids-tools/beta-code-rb](https://github.com/perseids-tools/beta-code-rb)
|
22
|
+
* [https://github.com/perseids-tools/beta-code-py](https://github.com/perseids-tools/beta-code-py)
|
@@ -17,11 +17,17 @@
|
|
17
17
|
"*(/u": "Ὕ",
|
18
18
|
"*(/w": "Ὥ",
|
19
19
|
"*(/|A": "ᾍ",
|
20
|
+
"*(/A|": "ᾍ",
|
20
21
|
"*(/|H": "ᾝ",
|
22
|
+
"*(/H|": "ᾝ",
|
21
23
|
"*(/|W": "ᾭ",
|
24
|
+
"*(/W|": "ᾭ",
|
22
25
|
"*(/|a": "ᾍ",
|
26
|
+
"*(/a|": "ᾍ",
|
23
27
|
"*(/|h": "ᾝ",
|
28
|
+
"*(/h|": "ᾝ",
|
24
29
|
"*(/|w": "ᾭ",
|
30
|
+
"*(/w|": "ᾭ",
|
25
31
|
"*(=A": "Ἇ",
|
26
32
|
"*(=H": "Ἧ",
|
27
33
|
"*(=I": "Ἷ",
|
@@ -33,11 +39,17 @@
|
|
33
39
|
"*(=u": "Ὗ",
|
34
40
|
"*(=w": "Ὧ",
|
35
41
|
"*(=|A": "ᾏ",
|
42
|
+
"*(=A|": "ᾏ",
|
36
43
|
"*(=|H": "ᾟ",
|
44
|
+
"*(=H|": "ᾟ",
|
37
45
|
"*(=|W": "ᾯ",
|
46
|
+
"*(=W|": "ᾯ",
|
38
47
|
"*(=|a": "ᾏ",
|
48
|
+
"*(=a|": "ᾏ",
|
39
49
|
"*(=|h": "ᾟ",
|
50
|
+
"*(=h|": "ᾟ",
|
40
51
|
"*(=|w": "ᾯ",
|
52
|
+
"*(=w|": "ᾯ",
|
41
53
|
"*(A": "Ἁ",
|
42
54
|
"*(E": "Ἑ",
|
43
55
|
"*(H": "Ἡ",
|
@@ -61,11 +73,17 @@
|
|
61
73
|
"*(\\u": "Ὓ",
|
62
74
|
"*(\\w": "Ὣ",
|
63
75
|
"*(\\|A": "ᾋ",
|
76
|
+
"*(\\A|": "ᾋ",
|
64
77
|
"*(\\|H": "ᾛ",
|
78
|
+
"*(\\H|": "ᾛ",
|
65
79
|
"*(\\|W": "ᾫ",
|
80
|
+
"*(\\W|": "ᾫ",
|
66
81
|
"*(\\|a": "ᾋ",
|
82
|
+
"*(\\a|": "ᾋ",
|
67
83
|
"*(\\|h": "ᾛ",
|
84
|
+
"*(\\h|": "ᾛ",
|
68
85
|
"*(\\|w": "ᾫ",
|
86
|
+
"*(\\w|": "ᾫ",
|
69
87
|
"*(a": "Ἁ",
|
70
88
|
"*(e": "Ἑ",
|
71
89
|
"*(h": "Ἡ",
|
@@ -75,11 +93,17 @@
|
|
75
93
|
"*(u": "Ὑ",
|
76
94
|
"*(w": "Ὡ",
|
77
95
|
"*(|A": "ᾉ",
|
96
|
+
"*(A|": "ᾉ",
|
78
97
|
"*(|H": "ᾙ",
|
98
|
+
"*(H|": "ᾙ",
|
79
99
|
"*(|W": "ᾩ",
|
100
|
+
"*(W|": "ᾩ",
|
80
101
|
"*(|a": "ᾉ",
|
102
|
+
"*(a|": "ᾉ",
|
81
103
|
"*(|h": "ᾙ",
|
104
|
+
"*(h|": "ᾙ",
|
82
105
|
"*(|w": "ᾩ",
|
106
|
+
"*(w|": "ᾩ",
|
83
107
|
"*)/A": "Ἄ",
|
84
108
|
"*)/E": "Ἔ",
|
85
109
|
"*)/H": "Ἤ",
|
@@ -93,11 +117,17 @@
|
|
93
117
|
"*)/o": "Ὄ",
|
94
118
|
"*)/w": "Ὤ",
|
95
119
|
"*)/|A": "ᾌ",
|
120
|
+
"*)/A|": "ᾌ",
|
96
121
|
"*)/|H": "ᾜ",
|
122
|
+
"*)/H|": "ᾜ",
|
97
123
|
"*)/|W": "ᾬ",
|
124
|
+
"*)/W|": "ᾬ",
|
98
125
|
"*)/|a": "ᾌ",
|
126
|
+
"*)/a|": "ᾌ",
|
99
127
|
"*)/|h": "ᾜ",
|
128
|
+
"*)/h|": "ᾜ",
|
100
129
|
"*)/|w": "ᾬ",
|
130
|
+
"*)/w|": "ᾬ",
|
101
131
|
"*)=A": "Ἆ",
|
102
132
|
"*)=H": "Ἦ",
|
103
133
|
"*)=I": "Ἶ",
|
@@ -107,11 +137,17 @@
|
|
107
137
|
"*)=i": "Ἶ",
|
108
138
|
"*)=w": "Ὦ",
|
109
139
|
"*)=|A": "ᾎ",
|
140
|
+
"*)=A|": "ᾎ",
|
110
141
|
"*)=|H": "ᾞ",
|
142
|
+
"*)=H|": "ᾞ",
|
111
143
|
"*)=|W": "ᾮ",
|
144
|
+
"*)=W|": "ᾮ",
|
112
145
|
"*)=|a": "ᾎ",
|
146
|
+
"*)=a|": "ᾎ",
|
113
147
|
"*)=|h": "ᾞ",
|
148
|
+
"*)=h|": "ᾞ",
|
114
149
|
"*)=|w": "ᾮ",
|
150
|
+
"*)=w|": "ᾮ",
|
115
151
|
"*)A": "Ἀ",
|
116
152
|
"*)E": "Ἐ",
|
117
153
|
"*)H": "Ἠ",
|
@@ -131,11 +167,17 @@
|
|
131
167
|
"*)\\o": "Ὂ",
|
132
168
|
"*)\\w": "Ὢ",
|
133
169
|
"*)\\|A": "ᾊ",
|
170
|
+
"*)\\A|": "ᾊ",
|
134
171
|
"*)\\|H": "ᾚ",
|
172
|
+
"*)\\H|": "ᾚ",
|
135
173
|
"*)\\|W": "ᾪ",
|
174
|
+
"*)\\W|": "ᾪ",
|
136
175
|
"*)\\|a": "ᾊ",
|
176
|
+
"*)\\a|": "ᾊ",
|
137
177
|
"*)\\|h": "ᾚ",
|
178
|
+
"*)\\h|": "ᾚ",
|
138
179
|
"*)\\|w": "ᾪ",
|
180
|
+
"*)\\w|": "ᾪ",
|
139
181
|
"*)a": "Ἀ",
|
140
182
|
"*)e": "Ἐ",
|
141
183
|
"*)h": "Ἠ",
|
@@ -143,11 +185,17 @@
|
|
143
185
|
"*)o": "Ὀ",
|
144
186
|
"*)w": "Ὠ",
|
145
187
|
"*)|A": "ᾈ",
|
188
|
+
"*)A|": "ᾈ",
|
146
189
|
"*)|H": "ᾘ",
|
190
|
+
"*)H|": "ᾘ",
|
147
191
|
"*)|W": "ᾨ",
|
192
|
+
"*)W|": "ᾨ",
|
148
193
|
"*)|a": "ᾈ",
|
194
|
+
"*)a|": "ᾈ",
|
149
195
|
"*)|h": "ᾘ",
|
196
|
+
"*)h|": "ᾘ",
|
150
197
|
"*)|w": "ᾨ",
|
198
|
+
"*)w|": "ᾨ",
|
151
199
|
"*+I": "Ϊ",
|
152
200
|
"*+U": "Ϋ",
|
153
201
|
"*+i": "Ϊ",
|
@@ -197,14 +197,14 @@
|
|
197
197
|
"ᾅ": "a(/|",
|
198
198
|
"ᾆ": "a)=|",
|
199
199
|
"ᾇ": "a(=|",
|
200
|
-
"ᾈ": "*)|
|
201
|
-
"ᾉ": "*(|
|
202
|
-
"ᾊ": "*)
|
203
|
-
"ᾋ": "*(
|
204
|
-
"ᾌ": "*)
|
205
|
-
"ᾍ": "*(
|
206
|
-
"ᾎ": "*)
|
207
|
-
"ᾏ": "*(
|
200
|
+
"ᾈ": "*)a|",
|
201
|
+
"ᾉ": "*(a|",
|
202
|
+
"ᾊ": "*)\\a|",
|
203
|
+
"ᾋ": "*(\\a|",
|
204
|
+
"ᾌ": "*)/a|",
|
205
|
+
"ᾍ": "*(/a|",
|
206
|
+
"ᾎ": "*)=a|",
|
207
|
+
"ᾏ": "*(=a|",
|
208
208
|
"ᾐ": "h)|",
|
209
209
|
"ᾑ": "h(|",
|
210
210
|
"ᾒ": "h)\\|",
|
@@ -213,14 +213,14 @@
|
|
213
213
|
"ᾕ": "h(/|",
|
214
214
|
"ᾖ": "h)=|",
|
215
215
|
"ᾗ": "h(=|",
|
216
|
-
"ᾘ": "*)|
|
217
|
-
"ᾙ": "*(|
|
218
|
-
"ᾚ": "*)
|
219
|
-
"ᾛ": "*(
|
220
|
-
"ᾜ": "*)
|
221
|
-
"ᾝ": "*(
|
222
|
-
"ᾞ": "*)
|
223
|
-
"ᾟ": "*(
|
216
|
+
"ᾘ": "*)h|",
|
217
|
+
"ᾙ": "*(h|",
|
218
|
+
"ᾚ": "*)\\h|",
|
219
|
+
"ᾛ": "*(\\h|",
|
220
|
+
"ᾜ": "*)/h|",
|
221
|
+
"ᾝ": "*(/h|",
|
222
|
+
"ᾞ": "*)=h|",
|
223
|
+
"ᾟ": "*(=h|",
|
224
224
|
"ᾠ": "w)|",
|
225
225
|
"ᾡ": "w(|",
|
226
226
|
"ᾢ": "w)\\|",
|
@@ -229,21 +229,21 @@
|
|
229
229
|
"ᾥ": "w(/|",
|
230
230
|
"ᾦ": "w)=|",
|
231
231
|
"ᾧ": "w(=|",
|
232
|
-
"ᾨ": "*)|
|
233
|
-
"ᾩ": "*(|
|
234
|
-
"ᾪ": "*)
|
235
|
-
"ᾫ": "*(
|
236
|
-
"ᾬ": "*)
|
237
|
-
"ᾭ": "*(
|
238
|
-
"ᾮ": "*)
|
239
|
-
"ᾯ": "*(
|
232
|
+
"ᾨ": "*)w|",
|
233
|
+
"ᾩ": "*(w|",
|
234
|
+
"ᾪ": "*)\\w|",
|
235
|
+
"ᾫ": "*(\\w|",
|
236
|
+
"ᾬ": "*)/w|",
|
237
|
+
"ᾭ": "*(/w|",
|
238
|
+
"ᾮ": "*)=w|",
|
239
|
+
"ᾯ": "*(=w|",
|
240
240
|
"ᾲ": "a\\|",
|
241
241
|
"ᾳ": "a|",
|
242
242
|
"ᾴ": "a/|",
|
243
243
|
"ᾶ": "a=",
|
244
244
|
"ᾷ": "a=|",
|
245
245
|
"Ὰ": "*\\a",
|
246
|
-
"ᾼ": "
|
246
|
+
"ᾼ": "*a|",
|
247
247
|
"᾽": "'",
|
248
248
|
"ῂ": "h\\|",
|
249
249
|
"ῃ": "h|",
|
@@ -252,7 +252,7 @@
|
|
252
252
|
"ῇ": "h=|",
|
253
253
|
"Ὲ": "*\\e",
|
254
254
|
"Ὴ": "*\\h",
|
255
|
-
"ῌ": "
|
255
|
+
"ῌ": "*h|",
|
256
256
|
"ῒ": "i\\+",
|
257
257
|
"ῖ": "i=",
|
258
258
|
"ῗ": "i=+",
|
@@ -271,6 +271,6 @@
|
|
271
271
|
"ῷ": "w=|",
|
272
272
|
"Ὸ": "*\\o",
|
273
273
|
"Ὼ": "*\\w",
|
274
|
-
"ῼ": "
|
274
|
+
"ῼ": "*w|",
|
275
275
|
"—": "_"
|
276
276
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beta_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- perseids
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gnar-style
|
@@ -46,14 +46,16 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- lib/beta_code.rb
|
49
|
+
- vendor/beta-code-json/CODE_OF_CONDUCT.md
|
49
50
|
- vendor/beta-code-json/LICENSE
|
51
|
+
- vendor/beta-code-json/README.md
|
50
52
|
- vendor/beta-code-json/beta_code_to_unicode.json
|
51
53
|
- vendor/beta-code-json/unicode_to_beta_code.json
|
52
54
|
homepage: https://github.com/perseids-tools/beta-code-rb
|
53
55
|
licenses:
|
54
56
|
- MIT
|
55
57
|
metadata: {}
|
56
|
-
post_install_message:
|
58
|
+
post_install_message:
|
57
59
|
rdoc_options: []
|
58
60
|
require_paths:
|
59
61
|
- lib
|
@@ -61,16 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
63
|
requirements:
|
62
64
|
- - ">="
|
63
65
|
- !ruby/object:Gem::Version
|
64
|
-
version: 2.
|
66
|
+
version: 2.5.0
|
65
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
68
|
requirements:
|
67
69
|
- - ">="
|
68
70
|
- !ruby/object:Gem::Version
|
69
71
|
version: '0'
|
70
72
|
requirements: []
|
71
|
-
|
72
|
-
|
73
|
-
signing_key:
|
73
|
+
rubygems_version: 3.1.4
|
74
|
+
signing_key:
|
74
75
|
specification_version: 4
|
75
76
|
summary: Converts Greek Beta Code to Greek characters and vice versa
|
76
77
|
test_files: []
|