scriptconv 0.0.1__py3-none-any.whl

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.
scriptconv/translit.py ADDED
@@ -0,0 +1,154 @@
1
+ """Script-level decomposition and transliteration utilities.
2
+
3
+ Hangul syllable blocks decompose arithmetically into their jamo
4
+ letters (Unicode Hangul Syllables, U+AC00–U+D7A3) — a property of the
5
+ WRITING SYSTEM, independent of pronunciation. Jamo tables derived from
6
+ stannam/hangul_to_ipa.
7
+
8
+ Hiragana and Katakana are two encodings of the same kana syllabary,
9
+ separated by a fixed U+0060 codepoint offset (Unicode Hiragana U+3040
10
+ and Katakana U+30A0 blocks); swapping between them is pure orthography.
11
+
12
+ This module deliberately contains no phonology: mapping scripts to
13
+ SOUNDS (grapheme-to-phoneme with contextual rules) is phonemization
14
+ and lives outside scriptconv's scope.
15
+ """
16
+ from __future__ import annotations
17
+
18
+ __all__ = ["decompose_hangul", "hira_to_kana", "kana_to_hira"]
19
+
20
+ # Modern jamo in Unicode order. The 19 leads, 21 vowels and 27 non-empty
21
+ # tails line up index-for-index with both the compatibility jamo block
22
+ # (U+3130) and the conjoining jamo blocks (L U+1100, V U+1161, T U+11A8).
23
+ _ONSETS = "ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ"
24
+ _VOWELS = "ㅏㅐㅑㅒㅓㅔㅕㅖㅗㅘㅙㅚㅛㅜㅝㅞㅟㅠㅡㅢㅣ"
25
+ _CODAS = ("", "ㄱ", "ㄲ", "ㄳ", "ㄴ", "ㄵ", "ㄶ", "ㄷ", "ㄹ", "ㄺ", "ㄻ",
26
+ "ㄼ", "ㄽ", "ㄾ", "ㄿ", "ㅀ", "ㅁ", "ㅂ", "ㅄ", "ㅅ", "ㅆ",
27
+ "ㅇ", "ㅈ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ")
28
+
29
+ _BASE = 0xAC00
30
+ _LAST = 0xD7A3
31
+
32
+ # Conjoining jamo block anchors (Unicode 3.0, "Hangul Jamo").
33
+ _L_BASE = 0x1100 # leading consonants
34
+ _V_BASE = 0x1161 # medial vowels
35
+ _T_BASE = 0x11A8 # trailing consonants (index 0 == first non-empty tail)
36
+
37
+ _SILENT_INITIAL = 11 # onset index of ㅇ (ieung), a placeholder in onset position
38
+
39
+
40
+ def decompose_hangul(
41
+ text: str,
42
+ form: str = "compatibility",
43
+ drop_silent_initial: bool = False,
44
+ ) -> str:
45
+ """Decompose Hangul syllable blocks into their jamo letters.
46
+
47
+ Non-Hangul characters pass through unchanged. Joining behaviour is
48
+ purely orthographic — no sound rules are applied.
49
+
50
+ Parameters
51
+ ----------
52
+ text:
53
+ Input string.
54
+ form:
55
+ ``"compatibility"`` (default) emits Hangul Compatibility Jamo
56
+ (U+3130 block, e.g. ``ㄱ``); ``"conjoining"`` emits conjoining
57
+ jamo (U+1100/1161/11A8 blocks) that recombine into syllables.
58
+ drop_silent_initial:
59
+ When True, omit the placeholder onset ``ㅇ`` (ieung) in
60
+ syllable-initial position — useful when the initial carries no
61
+ consonant. Applies to both forms.
62
+
63
+ Returns
64
+ -------
65
+ str
66
+ The decomposed string.
67
+
68
+ Examples
69
+ --------
70
+ >>> decompose_hangul("가")
71
+ 'ㄱㅏ'
72
+ >>> decompose_hangul("안", drop_silent_initial=True)
73
+ 'ㅏㄴ'
74
+ """
75
+ if form not in ("compatibility", "conjoining"):
76
+ raise ValueError(
77
+ f"form must be 'compatibility' or 'conjoining', not {form!r}"
78
+ )
79
+ conjoining = form == "conjoining"
80
+ out = []
81
+ for ch in text:
82
+ code = ord(ch)
83
+ if _BASE <= code <= _LAST:
84
+ idx = code - _BASE
85
+ o = idx // 588
86
+ v = (idx % 588) // 28
87
+ t = idx % 28
88
+ if drop_silent_initial and o == _SILENT_INITIAL:
89
+ onset = ""
90
+ elif conjoining:
91
+ onset = chr(_L_BASE + o)
92
+ else:
93
+ onset = _ONSETS[o]
94
+ if conjoining:
95
+ vowel = chr(_V_BASE + v)
96
+ coda = chr(_T_BASE + t - 1) if t else ""
97
+ else:
98
+ vowel = _VOWELS[v]
99
+ coda = _CODAS[t]
100
+ out.append(onset + vowel + coda)
101
+ else:
102
+ out.append(ch)
103
+ return "".join(out)
104
+
105
+
106
+ # Hiragana ↔ Katakana are separated by a fixed +0x60 offset. The ranges
107
+ # below cover the letters (small + full kana) and the iteration marks that
108
+ # have a counterpart in both blocks; katakana-only signs (long-vowel mark
109
+ # U+30FC, the U+30F7–30FA v-kana, U+30FF) have no hiragana form and pass
110
+ # through unchanged.
111
+ _HIRA_MIN, _HIRA_MAX = 0x3041, 0x3096
112
+ _KANA_MIN, _KANA_MAX = 0x30A1, 0x30F6
113
+ _ITER_HIRA = (0x309D, 0x309E)
114
+ _ITER_KANA = (0x30FD, 0x30FE)
115
+ _OFFSET = 0x60
116
+
117
+
118
+ def hira_to_kana(text: str) -> str:
119
+ """Transliterate Hiragana to Katakana. Other characters pass through.
120
+
121
+ Examples
122
+ --------
123
+ >>> hira_to_kana("ひらがな")
124
+ 'ヒラガナ'
125
+ """
126
+ out = []
127
+ for ch in text:
128
+ o = ord(ch)
129
+ if _HIRA_MIN <= o <= _HIRA_MAX or o in _ITER_HIRA:
130
+ out.append(chr(o + _OFFSET))
131
+ else:
132
+ out.append(ch)
133
+ return "".join(out)
134
+
135
+
136
+ def kana_to_hira(text: str) -> str:
137
+ """Transliterate Katakana to Hiragana. Other characters pass through.
138
+
139
+ The katakana-only long-vowel mark ``ー`` (U+30FC) has no hiragana
140
+ counterpart and is left unchanged.
141
+
142
+ Examples
143
+ --------
144
+ >>> kana_to_hira("カタカナ")
145
+ 'かたかな'
146
+ """
147
+ out = []
148
+ for ch in text:
149
+ o = ord(ch)
150
+ if _KANA_MIN <= o <= _KANA_MAX or o in _ITER_KANA:
151
+ out.append(chr(o - _OFFSET))
152
+ else:
153
+ out.append(ch)
154
+ return "".join(out)
scriptconv/version.py ADDED
@@ -0,0 +1,10 @@
1
+ # START_VERSION_BLOCK
2
+ VERSION_MAJOR = 0
3
+ VERSION_MINOR = 0
4
+ VERSION_BUILD = 1
5
+ VERSION_ALPHA = 0
6
+ # END_VERSION_BLOCK
7
+
8
+ VERSION_STR = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_BUILD}"
9
+ if VERSION_ALPHA:
10
+ VERSION_STR += f"a{VERSION_ALPHA}"
@@ -0,0 +1,210 @@
1
+ Metadata-Version: 2.4
2
+ Name: scriptconv
3
+ Version: 0.0.1
4
+ Summary: Shared script-conversion core — ISO-15924 detection, IPA↔ARPA/X-SAMPA/Lexique, Buckwalter, Hangul→jamo
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/TigreGotico/scriptconv
7
+ Project-URL: Issues, https://github.com/TigreGotico/scriptconv/issues
8
+ Keywords: ipa,arpabet,x-sampa,lexique,buckwalter,hangul,script,iso15924,tts,g2p,phoneme
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Topic :: Text Processing :: Linguistic
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: OS Independent
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest; extra == "test"
25
+ Requires-Dist: pytest-timeout; extra == "test"
26
+ Dynamic: license-file
27
+
28
+ # scriptconv
29
+
30
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
31
+ [![Build Tests](https://github.com/TigreGotico/scriptconv/actions/workflows/build-tests.yml/badge.svg?branch=dev)](https://github.com/TigreGotico/scriptconv/actions/workflows/build-tests.yml)
32
+ [![PyPI version](https://img.shields.io/pypi/v/scriptconv.svg)](https://pypi.org/project/scriptconv/)
33
+
34
+ **scriptconv** is a zero-dependency Python library for written-script operations:
35
+ ISO-15924 script identification and metadata, character-range detection, language-to-script
36
+ mapping, phoneme-notation transcoding (IPA ↔ ARPABET ↔ X-SAMPA, IPA ↔ Lexique,
37
+ Buckwalter ↔ Arabic script), and orthographic decomposition of Hangul syllable blocks into
38
+ jamo letters. Every conversion is a pure data table or arithmetic operation; no linguistic
39
+ rules, no external files, no runtime dependencies beyond the Python standard library.
40
+
41
+ Transcoding is reversible where the target inventory permits — see
42
+ [Fidelity guarantees](#fidelity-guarantees) for the exact per-notation guarantees.
43
+
44
+ ## Scope
45
+
46
+ scriptconv is exclusively about **written scripts**: identification and metadata,
47
+ transliteration between script representations, re-encoding of phoneme symbols
48
+ between notation systems, and orthographic decomposition. It never phonemizes — anything
49
+ that requires knowing how a language *sounds* (grapheme-to-phoneme rules, allophony,
50
+ coarticulation, sandhi) is outside this library's scope.
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install scriptconv
56
+ ```
57
+
58
+ ### Development
59
+
60
+ ```bash
61
+ uv pip install -e '.[test]'
62
+ pytest tests/
63
+ ```
64
+
65
+ `tests/test_examples.py` runs the scripts under `examples/`, which import the installed
66
+ package — install with `-e` first.
67
+
68
+ ## Quick start
69
+
70
+ ```python
71
+ from scriptconv import (
72
+ detect_script, char_script, script_distribution, script_runs, base_direction,
73
+ lang_to_script, script_to_langs, normalize_script_tag, SCRIPT_REGISTRY,
74
+ arpa_to_ipa, ipa_to_arpa,
75
+ xsampa_to_ipa, ipa_to_xsampa,
76
+ buckwalter_to_arabic, arabic_to_buckwalter,
77
+ lexique_to_ipa, ipa_to_lexique,
78
+ kirshenbaum_to_ipa, ipa_to_kirshenbaum, looks_like_ipa,
79
+ decompose_hangul, hira_to_kana, kana_to_hira,
80
+ convert, can_convert, convert_batch, Notation, NOTATION_INFO,
81
+ )
82
+
83
+ detect_script("안녕하세요") # "Hang"
84
+ char_script("ɑ") # "Latn" (IPA Extensions)
85
+ script_distribution("Hello مرحبا") # {'Latn': 5, 'Arab': 5}
86
+ script_runs("привет hello") # [('Cyrl', 'привет '), ('Latn', 'hello')]
87
+ base_direction("مرحبا بالعالم") # "rtl"
88
+ SCRIPT_REGISTRY["Arab"].script_type # "abjad" (typological class)
89
+
90
+ lang_to_script("pt-BR") # "Latn"
91
+ script_to_langs("Cyrl") # ['av', 'ba', 'be', 'bg', ...]
92
+ normalize_script_tag("syllabics") # "Cans"
93
+ normalize_script_tag("japanese") # "Hira"
94
+
95
+ arpa_to_ipa("HH AH0 L OW1") # "həloʊ"
96
+ ipa_to_arpa("həloʊ") # "HH AX L OW"
97
+
98
+ xsampa_to_ipa("tS") # "tʃ"
99
+ ipa_to_xsampa("ɹ") # "r\\"
100
+
101
+ buckwalter_to_arabic("mrHbA") # "مرحبا"
102
+ arabic_to_buckwalter("مرحبا") # "mrHbA"
103
+
104
+ lexique_to_ipa("b§ZuR") # "bɔ̃ʒuʁ" (bonjour)
105
+ ipa_to_lexique("vɛ̃") # "v5" (vin)
106
+
107
+ kirshenbaum_to_ipa("S") # "ʃ" (espeak-ng ASCII-IPA)
108
+ ipa_to_kirshenbaum("ŋ") # "N"
109
+
110
+ looks_like_ipa("pʰɑtʃ") # True (heuristic: has IPA-distinctive symbols)
111
+ looks_like_ipa("hello") # False
112
+
113
+ decompose_hangul("국민") # "ㄱㅜㄱㅁㅣㄴ" (orthographic jamo, no assimilation)
114
+ hira_to_kana("ひらがな") # "ヒラガナ"
115
+ kana_to_hira("カタカナ") # "かたかな"
116
+
117
+ convert("NG", Notation.ARPA, Notation.XSAMPA) # "N"
118
+ convert("HH AH0 L OW1", "arpa", "kirshenbaum") # "h@loU"
119
+ can_convert("arpa", "x-sampa") # True
120
+ can_convert("buckwalter", "ipa") # False
121
+ list(convert_batch(["HH AH0", "AY1"], "arpa", "ipa")) # ['hə', 'aɪ']
122
+
123
+ NOTATION_INFO[Notation.ARPA].lossless_from_ipa # False (restricted inventory)
124
+ ```
125
+
126
+ ### CLI
127
+
128
+ ```bash
129
+ python -m scriptconv convert arpa ipa "HH AH0 L OW1"
130
+ python -m scriptconv detect "안녕하세요"
131
+ python -m scriptconv distribution "Hello مرحبا"
132
+ python -m scriptconv direction "مرحبا بالعالم"
133
+ python -m scriptconv decompose "국민"
134
+ python -m scriptconv lang ko
135
+ ```
136
+
137
+ ## Modules
138
+
139
+ | Module | Contents |
140
+ |--------|----------|
141
+ | `scriptconv.scripts` | `Script` dataclass (with `script_type`), `SCRIPT_REGISTRY` (34 scripts), `detect_script`, `char_script`, `script_distribution`, `script_runs`, `base_direction`, `lang_to_script`, `script_to_langs`, `normalize_script_tag` |
142
+ | `scriptconv.notation` | `Notation` enum, `NotationInfo`/`NOTATION_INFO` fidelity registry, `convert` facade, `can_convert` predicate, `convert_batch` generator, pair-wise converters (ARPABET ↔ IPA, X-SAMPA ↔ IPA, Buckwalter ↔ Arabic, Lexique ↔ IPA, Kirshenbaum ↔ IPA), `looks_like_ipa` detector |
143
+ | `scriptconv.translit` | `decompose_hangul` (Hangul blocks → jamo, compatibility or conjoining), `hira_to_kana`/`kana_to_hira` — all orthographic only |
144
+
145
+ ## Documentation
146
+
147
+ - [docs/scripts.md](docs/scripts.md) — Script registry, detection, language mapping, label normalisation
148
+ - [docs/notation.md](docs/notation.md) — Notation enum, per-pair converter reference, round-trip guarantees
149
+ - [docs/translit.md](docs/translit.md) — Hangul decomposition arithmetic and scope boundary
150
+
151
+ ## Examples
152
+
153
+ Runnable scripts in [examples/](examples/):
154
+
155
+ | File | Demonstrates |
156
+ |------|-------------|
157
+ | `01_detect_script.py` | Mixed-script text triage |
158
+ | `02_lang_to_script.py` | Language tag → ISO-15924 mapping |
159
+ | `03_arpabet_roundtrip.py` | CMUdict-style line → IPA and back |
160
+ | `04_xsampa.py` | X-SAMPA ↔ IPA, multi-char longest-first cases |
161
+ | `05_buckwalter.py` | Arabic ↔ Buckwalter both directions |
162
+ | `06_lexique.py` | French Lexique codes → IPA |
163
+ | `07_hangul_decompose.py` | Hangul syllable blocks → jamo letters |
164
+ | `08_script_distribution.py` | Character counts per script + base direction |
165
+ | `09_script_to_langs.py` | Reverse lookup: script → languages |
166
+ | `10_new_labels.py` | New normalize_script_tag labels (japanese, jamo, cjk…) |
167
+ | `11_cli.py` | CLI interface: detect, distribution, direction, decompose, lang |
168
+ | `12_kirshenbaum.py` | Kirshenbaum (ASCII-IPA) ↔ IPA, and ARPABET → Kirshenbaum routing |
169
+ | `13_script_runs.py` | Per-script segmentation of mixed-script text |
170
+ | `14_kana_transliteration.py` | Hiragana ↔ Katakana |
171
+
172
+ ## Fidelity guarantees
173
+
174
+ Transcoding faithfulness depends on the target notation's inventory. IPA is the hub;
175
+ notation↔notation goes through IPA. The table below states, for each notation, whether a
176
+ round-trip is exact and what happens to a symbol the table does not know.
177
+
178
+ | Notation | `to_ipa` → `from_ipa` round-trip | `from_ipa` → `to_ipa` round-trip | Unknown-token behaviour |
179
+ |----------|----------------------------------|----------------------------------|-------------------------|
180
+ | **ARPABET** | Exact for base symbols; **stress digits are dropped** and `AH0`↔`AX` (schwa) is not distinguished | **Lossy** — ARPABET is an English-only inventory, so any IPA symbol outside it becomes the *unknown* placeholder | `arpa_to_ipa`: passed through unchanged. `ipa_to_arpa`: diacritics and suprasegmentals (combining marks, length/stress modifiers) are dropped; other out-of-inventory symbols are replaced with `?` by default (`unknown=` param; `unknown=""` drops) |
181
+ | **X-SAMPA** | Exact for all canonical symbols | Exact except aliases (`f\`→ɸ, `&`→æ) normalise to their canonical spelling | Passed through unchanged |
182
+ | **Buckwalter ↔ Arabic** | Exact (the `^` shadda alias normalises to canonical `~`; precomposed lam-alef ligatures decompose to two chars, visually identical) | Exact | Passed through unchanged |
183
+ | **Lexique ↔ IPA** | Exact except the `°`/`3` schwa pair (both → `ə`; reverse always → `°`) | Exact | Passed through unchanged |
184
+ | **Kirshenbaum ↔ IPA** | Exact | **Lossy** — restricted ASCII inventory; IPA outside it passes through | Passed through unchanged |
185
+
186
+ This table is also available programmatically via `NOTATION_INFO`
187
+ (`NotationInfo` records with `lossless_to_ipa`, `lossless_from_ipa`,
188
+ `token_separated`, and a `reference` citation per notation).
189
+
190
+ Notes:
191
+
192
+ - The voiced velar stop is stored as script `ɡ` (U+0261) across all tables; `ipa_to_arpa`
193
+ also accepts ASCII `g` (U+0067) on input.
194
+ - Only `ipa_to_arpa` substitutes for unknowns today (because ARPABET is a restricted
195
+ inventory); every other converter passes unknowns through. See
196
+ [docs/notation.md](docs/notation.md) for the per-symbol detail.
197
+
198
+ ## License and attribution
199
+
200
+ scriptconv is released under the **Apache-2.0** license.
201
+
202
+ Derived tables used internally:
203
+
204
+ | Table | Source | License |
205
+ |-------|--------|---------|
206
+ | ARPABET ↔ IPA | [chorusai/arpa2ipa](https://github.com/chorusai/arpa2ipa) | Apache-2.0 |
207
+ | Buckwalter ↔ Arabic | Tim Buckwalter's Arabic transliteration scheme | — (factual 1:1 mapping) |
208
+ | Lexique phoneme codes | New, B. & Pallier, C. — *Manuel de Lexique 3* v3.11, Tableau 2; [chrplr/openlexicon](https://github.com/chrplr/openlexicon) | CC BY-SA 4.0 |
209
+ | Kirshenbaum ↔ IPA | Kirshenbaum 1993 ASCII-IPA standard (comp.speech), cross-checked against espeak-ng | — (factual symbol mapping) |
210
+ | Hangul jamo tables | [stannam/hangul_to_ipa](https://github.com/stannam/hangul_to_ipa) | — |
@@ -0,0 +1,12 @@
1
+ scriptconv/__init__.py,sha256=N8h4vgW0KIv7WMY3WzvmU8uSOgDooaMIXazHvznFis8,2246
2
+ scriptconv/__main__.py,sha256=iEMH9CcSaENFPQFb1ptcDvbiu_hSClKZ-B2ZOhazsiA,3391
3
+ scriptconv/notation.py,sha256=v5QpEzt1cJnNhEnpG7bZZ94InFMKMxBmSySYG68QPMY,29048
4
+ scriptconv/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ scriptconv/scripts.py,sha256=9LeNLMfTcaglkNByTzaJJj5y1kS4j6z4ZeRhJtrZdcM,24978
6
+ scriptconv/translit.py,sha256=gHiS_wXgXiCdtEqM4vk9lvF3E10jQgGL4GIh_I-9vPA,5082
7
+ scriptconv/version.py,sha256=BBHAnuig_b4qYC9X5LlEdCAxhBIrCC_Q-L9LwjAN6RY,237
8
+ scriptconv-0.0.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
9
+ scriptconv-0.0.1.dist-info/METADATA,sha256=SbkHKSTKvU6GWYH7ztJImbq5ERVFLhCgPmuMcKUyzj4,10740
10
+ scriptconv-0.0.1.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
11
+ scriptconv-0.0.1.dist-info/top_level.txt,sha256=Eu5SqUi1gbXoXGnVhc-nKCrbTFMIzVrYvU3ysXV9RRY,11
12
+ scriptconv-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ scriptconv