skrutable 1.3.0.dev4__tar.gz → 1.3.1__tar.gz
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.
- skrutable-1.3.1/PKG-INFO +31 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/setup.py +9 -5
- skrutable-1.3.1/src/skrutable/__init__.py +1 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/config.json +1 -1
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/meter_identification.py +7 -8
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/transliteration.py +20 -10
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/virAma_avoidance.py +1 -1
- skrutable-1.3.1/src/skrutable.egg-info/PKG-INFO +31 -0
- skrutable-1.3.1/src/skrutable.egg-info/requires.txt +5 -0
- skrutable-1.3.0.dev4/PKG-INFO +0 -33
- skrutable-1.3.0.dev4/src/skrutable/__init__.py +0 -1
- skrutable-1.3.0.dev4/src/skrutable.egg-info/PKG-INFO +0 -33
- skrutable-1.3.0.dev4/src/skrutable.egg-info/requires.txt +0 -2
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/LICENSE.md +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/README.md +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/setup.cfg +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/config.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/manual.md +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/meter_patterns.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/phonemes.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/scansion.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/scheme_detection.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/scheme_maps.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/scheme_vectors_mbh.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/skrutable_one.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable/splitter/wrapper.py +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable.egg-info/SOURCES.txt +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable.egg-info/dependency_links.txt +0 -0
- {skrutable-1.3.0.dev4 → skrutable-1.3.1}/src/skrutable.egg-info/top_level.txt +0 -0
skrutable-1.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: skrutable
|
|
3
|
+
Version: 1.3.1
|
|
4
|
+
Summary: skrutable library for working with Sanskrit text
|
|
5
|
+
Home-page: https://github.com/tylergneill/skrutable
|
|
6
|
+
Author: Tyler Neill
|
|
7
|
+
Author-email: tyler.g.neill@gmail.com
|
|
8
|
+
License: CC BY-SA 4.0
|
|
9
|
+
Description: # skrutable
|
|
10
|
+
|
|
11
|
+
A toolkit and online workbench providing
|
|
12
|
+
transliteration, scansion, and meter identification for Sanskrit text,
|
|
13
|
+
as well access to powerful sandhi and compound splitting.
|
|
14
|
+
|
|
15
|
+
Web-app interface live online at [skrutable.info](https://www.skrutable.info).
|
|
16
|
+
|
|
17
|
+
Install package from [PyPi](https://pypi.org/project/skrutable/) with `pip install skrutable`.
|
|
18
|
+
|
|
19
|
+
See [manual.md](https://github.com/tylergneill/skrutable/blob/main/src/skrutable/manual.md) for instructions.
|
|
20
|
+
|
|
21
|
+
Feedback welcome!
|
|
22
|
+
My name is Tyler
|
|
23
|
+
([Academia](https://uni-leipzig1.academia.edu/TylerNeill),
|
|
24
|
+
[LinkedIn](https://www.linkedin.com/in/tyler-g-neill/))
|
|
25
|
+
and my Gmail is tyler.g.neill.
|
|
26
|
+
|
|
27
|
+
And please share and share-alike! Licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
|
28
|
+
Keywords: Sanskrit text transliteration scansion meter identification sandhi compound splitting
|
|
29
|
+
Platform: UNKNOWN
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
Provides-Extra: testing
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from setuptools import setup
|
|
1
|
+
from setuptools import setup
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
def find_version():
|
|
@@ -35,8 +35,12 @@ setup(
|
|
|
35
35
|
url='https://github.com/tylergneill/skrutable',
|
|
36
36
|
keywords='Sanskrit text transliteration scansion meter identification sandhi compound splitting',
|
|
37
37
|
install_requires=[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
'numpy',
|
|
39
|
+
'requests',
|
|
40
|
+
],
|
|
41
|
+
extras_require={
|
|
42
|
+
"testing": [
|
|
43
|
+
"pytest",
|
|
44
|
+
]
|
|
45
|
+
},
|
|
42
46
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.3.1"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"default_scheme_in" : "IAST",
|
|
3
3
|
"default_scheme_out" : "IAST",
|
|
4
4
|
"avoid_virAma_indic_scripts" : true,
|
|
5
|
-
"
|
|
5
|
+
"avoid_virAma_non_indic_scripts" : false,
|
|
6
6
|
"scansion_syllable_separator" : " ",
|
|
7
7
|
"additional_pAda_separators" : ["\t", ";", ",", " / ", " | ", " । "],
|
|
8
8
|
"default_resplit_option" : "resplit_lite",
|
|
@@ -373,13 +373,13 @@ class VerseTester(object):
|
|
|
373
373
|
wbp = Vrs.syllable_weights.split('\n') # weights by pāda
|
|
374
374
|
wbp_lens = [ len(line) for line in wbp ]
|
|
375
375
|
|
|
376
|
-
# make sure full four pādas
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
376
|
+
# make sure either full four pādas or one and single-pāda mode
|
|
377
|
+
if len(wbp) >= 4 or (
|
|
378
|
+
len(wbp) == 1 and self.resplit_option == "single_pAda"
|
|
379
|
+
):
|
|
380
|
+
pass
|
|
381
|
+
else:
|
|
382
|
+
return 0
|
|
383
383
|
|
|
384
384
|
self.count_pAdasamatva(Vrs) # [0,2,3,4]
|
|
385
385
|
|
|
@@ -406,7 +406,6 @@ class VerseTester(object):
|
|
|
406
406
|
# test perfect single pāda of samavṛtta
|
|
407
407
|
if ( self.pAdasamatva_count == 0 and self.resplit_option == "single_pAda"):
|
|
408
408
|
self.evaluate_samavftta(Vrs)
|
|
409
|
-
#....
|
|
410
409
|
|
|
411
410
|
# test perfect viṣamavṛtta
|
|
412
411
|
if self.pAdasamatva_count == 0 and self.is_vizamavftta(Vrs):
|
|
@@ -8,10 +8,10 @@ import re
|
|
|
8
8
|
|
|
9
9
|
# load config variables
|
|
10
10
|
config = load_config_dict_from_json_file()
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
DEFAULT_SCHEME_IN = config["default_scheme_in"] # e.g. "auto"
|
|
12
|
+
DEFAULT_SCHEME_OUT = config["default_scheme_out"] # e.g. "IAST"
|
|
13
|
+
AVOID_VIRAMA_INDIC_SCRIPTS_DEFAULT = config["avoid_virAma_indic_scripts"] # e.g. True
|
|
14
|
+
AVOID_VIRAMA_NON_INDIC_SCRIPTS_DEFAULT = config["avoid_virAma_non_indic_scripts"] # e.g. False
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class Transliterator():
|
|
@@ -29,12 +29,12 @@ class Transliterator():
|
|
|
29
29
|
self.contents = None
|
|
30
30
|
|
|
31
31
|
if from_scheme == None:
|
|
32
|
-
from_scheme =
|
|
32
|
+
from_scheme = DEFAULT_SCHEME_IN
|
|
33
33
|
from_scheme = from_scheme.upper()
|
|
34
34
|
self.scheme_in = from_scheme
|
|
35
35
|
|
|
36
36
|
if to_scheme == None:
|
|
37
|
-
to_scheme =
|
|
37
|
+
to_scheme = DEFAULT_SCHEME_OUT
|
|
38
38
|
to_scheme = to_scheme.upper()
|
|
39
39
|
self.scheme_out = to_scheme
|
|
40
40
|
|
|
@@ -135,7 +135,14 @@ class Transliterator():
|
|
|
135
135
|
self.contents = content_out # hybrid
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
def transliterate(
|
|
138
|
+
def transliterate(
|
|
139
|
+
self,
|
|
140
|
+
cntnts,
|
|
141
|
+
from_scheme=None,
|
|
142
|
+
to_scheme=None,
|
|
143
|
+
avoid_virAma_indic_scripts: bool = AVOID_VIRAMA_INDIC_SCRIPTS_DEFAULT,
|
|
144
|
+
avoid_virAma_non_indic_scripts: bool = AVOID_VIRAMA_NON_INDIC_SCRIPTS_DEFAULT,
|
|
145
|
+
):
|
|
139
146
|
"""
|
|
140
147
|
User-facing method.
|
|
141
148
|
|
|
@@ -172,9 +179,12 @@ class Transliterator():
|
|
|
172
179
|
self.map_replace(self.scheme_in, 'SLP')
|
|
173
180
|
|
|
174
181
|
# avoid undesirable virāmas specified in virāma_avoidance.py
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
if (
|
|
183
|
+
self.scheme_out in scheme_maps.indic_schemes
|
|
184
|
+
and avoid_virAma_indic_scripts == True
|
|
185
|
+
) or (
|
|
186
|
+
self.scheme_out not in scheme_maps.indic_schemes
|
|
187
|
+
and avoid_virAma_non_indic_scripts == True):
|
|
178
188
|
self.avoid_virAmas()
|
|
179
189
|
|
|
180
190
|
# then transliterate to desired scheme
|
|
@@ -3,7 +3,7 @@ from skrutable import phonemes
|
|
|
3
3
|
|
|
4
4
|
vowels = ''.join(phonemes.SLP_vowels)
|
|
5
5
|
unvoiced_consonants = ''.join(phonemes.SLP_unvoiced_consonants)
|
|
6
|
-
unvoiced_consonants_subset = ['k','K','t','T','p','P','s']
|
|
6
|
+
unvoiced_consonants_subset = ''.join(['k','K','t','T','p','P','s'])
|
|
7
7
|
voiced_consonants = ''.join(phonemes.SLP_voiced_consonants)
|
|
8
8
|
|
|
9
9
|
"""The following regexes aim at avoiding virāma and space,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: skrutable
|
|
3
|
+
Version: 1.3.1
|
|
4
|
+
Summary: skrutable library for working with Sanskrit text
|
|
5
|
+
Home-page: https://github.com/tylergneill/skrutable
|
|
6
|
+
Author: Tyler Neill
|
|
7
|
+
Author-email: tyler.g.neill@gmail.com
|
|
8
|
+
License: CC BY-SA 4.0
|
|
9
|
+
Description: # skrutable
|
|
10
|
+
|
|
11
|
+
A toolkit and online workbench providing
|
|
12
|
+
transliteration, scansion, and meter identification for Sanskrit text,
|
|
13
|
+
as well access to powerful sandhi and compound splitting.
|
|
14
|
+
|
|
15
|
+
Web-app interface live online at [skrutable.info](https://www.skrutable.info).
|
|
16
|
+
|
|
17
|
+
Install package from [PyPi](https://pypi.org/project/skrutable/) with `pip install skrutable`.
|
|
18
|
+
|
|
19
|
+
See [manual.md](https://github.com/tylergneill/skrutable/blob/main/src/skrutable/manual.md) for instructions.
|
|
20
|
+
|
|
21
|
+
Feedback welcome!
|
|
22
|
+
My name is Tyler
|
|
23
|
+
([Academia](https://uni-leipzig1.academia.edu/TylerNeill),
|
|
24
|
+
[LinkedIn](https://www.linkedin.com/in/tyler-g-neill/))
|
|
25
|
+
and my Gmail is tyler.g.neill.
|
|
26
|
+
|
|
27
|
+
And please share and share-alike! Licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
|
28
|
+
Keywords: Sanskrit text transliteration scansion meter identification sandhi compound splitting
|
|
29
|
+
Platform: UNKNOWN
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
Provides-Extra: testing
|
skrutable-1.3.0.dev4/PKG-INFO
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: skrutable
|
|
3
|
-
Version: 1.3.0.dev4
|
|
4
|
-
Summary: skrutable library for working with Sanskrit text
|
|
5
|
-
Home-page: https://github.com/tylergneill/skrutable
|
|
6
|
-
Author: Tyler Neill
|
|
7
|
-
Author-email: tyler.g.neill@gmail.com
|
|
8
|
-
License: CC BY-SA 4.0
|
|
9
|
-
Keywords: Sanskrit text transliteration scansion meter identification sandhi compound splitting
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE.md
|
|
12
|
-
Requires-Dist: numpy
|
|
13
|
-
Requires-Dist: requests
|
|
14
|
-
|
|
15
|
-
# skrutable
|
|
16
|
-
|
|
17
|
-
A toolkit and online workbench providing
|
|
18
|
-
transliteration, scansion, and meter identification for Sanskrit text,
|
|
19
|
-
as well access to powerful sandhi and compound splitting.
|
|
20
|
-
|
|
21
|
-
Web-app interface live online at [skrutable.info](https://www.skrutable.info).
|
|
22
|
-
|
|
23
|
-
Install package from [PyPi](https://pypi.org/project/skrutable/) with `pip install skrutable`.
|
|
24
|
-
|
|
25
|
-
See [manual.md](https://github.com/tylergneill/skrutable/blob/main/src/skrutable/manual.md) for instructions.
|
|
26
|
-
|
|
27
|
-
Feedback welcome!
|
|
28
|
-
My name is Tyler
|
|
29
|
-
([Academia](https://uni-leipzig1.academia.edu/TylerNeill),
|
|
30
|
-
[LinkedIn](https://www.linkedin.com/in/tyler-g-neill/))
|
|
31
|
-
and my Gmail is tyler.g.neill.
|
|
32
|
-
|
|
33
|
-
And please share and share-alike! Licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.3.0.dev4"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: skrutable
|
|
3
|
-
Version: 1.3.0.dev4
|
|
4
|
-
Summary: skrutable library for working with Sanskrit text
|
|
5
|
-
Home-page: https://github.com/tylergneill/skrutable
|
|
6
|
-
Author: Tyler Neill
|
|
7
|
-
Author-email: tyler.g.neill@gmail.com
|
|
8
|
-
License: CC BY-SA 4.0
|
|
9
|
-
Keywords: Sanskrit text transliteration scansion meter identification sandhi compound splitting
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE.md
|
|
12
|
-
Requires-Dist: numpy
|
|
13
|
-
Requires-Dist: requests
|
|
14
|
-
|
|
15
|
-
# skrutable
|
|
16
|
-
|
|
17
|
-
A toolkit and online workbench providing
|
|
18
|
-
transliteration, scansion, and meter identification for Sanskrit text,
|
|
19
|
-
as well access to powerful sandhi and compound splitting.
|
|
20
|
-
|
|
21
|
-
Web-app interface live online at [skrutable.info](https://www.skrutable.info).
|
|
22
|
-
|
|
23
|
-
Install package from [PyPi](https://pypi.org/project/skrutable/) with `pip install skrutable`.
|
|
24
|
-
|
|
25
|
-
See [manual.md](https://github.com/tylergneill/skrutable/blob/main/src/skrutable/manual.md) for instructions.
|
|
26
|
-
|
|
27
|
-
Feedback welcome!
|
|
28
|
-
My name is Tyler
|
|
29
|
-
([Academia](https://uni-leipzig1.academia.edu/TylerNeill),
|
|
30
|
-
[LinkedIn](https://www.linkedin.com/in/tyler-g-neill/))
|
|
31
|
-
and my Gmail is tyler.g.neill.
|
|
32
|
-
|
|
33
|
-
And please share and share-alike! Licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|