skrutable 2.5.0__tar.gz → 2.5.2__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-2.5.0 → skrutable-2.5.2}/PKG-INFO +1 -1
- skrutable-2.5.2/src/skrutable/__init__.py +1 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/meter_identification.py +14 -14
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable.egg-info/PKG-INFO +1 -1
- skrutable-2.5.0/src/skrutable/__init__.py +0 -1
- {skrutable-2.5.0 → skrutable-2.5.2}/LICENSE.md +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/README.md +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/setup.cfg +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/setup.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/config.json +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/config.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/generate_scheme_vectors.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/impossible_bigrams.json +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/manual.md +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/meter_patterns.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/phonemes.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/run_examples.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/scansion.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/scheme_detection.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/scheme_maps.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/scheme_vectors.json +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/scheme_vectors_mbh.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/splitting.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/transliteration.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/utils.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable/virAma_avoidance.py +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable.egg-info/SOURCES.txt +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable.egg-info/dependency_links.txt +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable.egg-info/requires.txt +0 -0
- {skrutable-2.5.0 → skrutable-2.5.2}/src/skrutable.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.5.2"
|
|
@@ -59,9 +59,9 @@ def flush_profiling_report(write_file=False):
|
|
|
59
59
|
return
|
|
60
60
|
import sys, os
|
|
61
61
|
scan_keys = ('scan_clean', 'scan_translit', 'scan_syllabify', 'scan_weights', 'scan_morae_gana')
|
|
62
|
-
type_keys = ('anuzwuB', '
|
|
62
|
+
type_keys = ('anuzwuB', 'samavftta', 'upajAti', 'vizamavftta', 'jAti')
|
|
63
63
|
type_abbrev = {
|
|
64
|
-
'anuzwuB': 'anuṣṭ', '
|
|
64
|
+
'anuzwuB': 'anuṣṭ', 'samavftta': 'samav', 'upajAti': 'upajāti', 'vizamavftta': 'vizama', 'jAti': 'jāti',
|
|
65
65
|
}
|
|
66
66
|
scan_abbrev = {'scan_clean': 'clean', 'scan_translit': 'transl', 'scan_syllabify': 'syl', 'scan_weights': 'wts', 'scan_morae_gana': 'mor+g'}
|
|
67
67
|
cat_order = ['anuṣṭubh', 'samavṛtta', 'upajāti', 'ardhasamavṛtta', 'viṣamavṛtta', 'jāti', 'na kiṃcid adhyavasitam']
|
|
@@ -903,7 +903,7 @@ class VerseTester(object):
|
|
|
903
903
|
# test perfect samavṛtta
|
|
904
904
|
if self.pAdasamatva_count == 4:
|
|
905
905
|
# definitely checks out, id_score == 9
|
|
906
|
-
self.evaluate_samavftta(Vrs)
|
|
906
|
+
timed('samavftta')(self.evaluate_samavftta)(Vrs)
|
|
907
907
|
return 1 # max score already reached
|
|
908
908
|
|
|
909
909
|
# test perfect ardhasamavftta
|
|
@@ -919,10 +919,10 @@ class VerseTester(object):
|
|
|
919
919
|
|
|
920
920
|
# test perfect single pāda of samavṛtta
|
|
921
921
|
if ( self.pAdasamatva_count == 0 and self.resplit_option == "single_pAda"):
|
|
922
|
-
self.evaluate_samavftta(Vrs)
|
|
922
|
+
timed('samavftta')(self.evaluate_samavftta)(Vrs)
|
|
923
923
|
|
|
924
924
|
# test perfect viṣamavṛtta
|
|
925
|
-
if self.pAdasamatva_count == 0 and self.is_vizamavftta(Vrs):
|
|
925
|
+
if self.pAdasamatva_count == 0 and timed('vizamavftta')(self.is_vizamavftta)(Vrs):
|
|
926
926
|
# will give id_score == 9
|
|
927
927
|
# label and score already set in is_vizamavftta if test was successful
|
|
928
928
|
return 1 # max score already reached
|
|
@@ -933,14 +933,14 @@ class VerseTester(object):
|
|
|
933
933
|
unique_sorted_lens.sort()
|
|
934
934
|
if len(unique_sorted_lens) == 1: # all same length
|
|
935
935
|
# will give id_score in [8, 7], may tie with above
|
|
936
|
-
self.evaluate_upajAti(Vrs)
|
|
936
|
+
timed('upajAti')(self.evaluate_upajAti)(Vrs)
|
|
937
937
|
if Vrs.identification_score == 8: return 1 # best score compared to below
|
|
938
938
|
# otherwise, max score not necessarily yet reached, don't return
|
|
939
939
|
|
|
940
940
|
# test imperfect samavftta
|
|
941
941
|
if self.pAdasamatva_count in [2, 3]:
|
|
942
942
|
# will give id_score in [7, 6], may tie with above
|
|
943
|
-
self.evaluate_samavftta(Vrs)
|
|
943
|
+
timed('samavftta')(self.evaluate_samavftta)(Vrs)
|
|
944
944
|
# max score not necessarily yet reached, don't return
|
|
945
945
|
|
|
946
946
|
# test imperfect ardhasamavftta? seems hard
|
|
@@ -952,7 +952,7 @@ class VerseTester(object):
|
|
|
952
952
|
unique_sorted_lens == [11, 12]
|
|
953
953
|
): # either not all same length or triṣṭubh-jagatī mix
|
|
954
954
|
# will give id_score in [6, 5, 4], may tie with above
|
|
955
|
-
self.evaluate_upajAti(Vrs)
|
|
955
|
+
timed('upajAti')(self.evaluate_upajAti)(Vrs)
|
|
956
956
|
|
|
957
957
|
# return success
|
|
958
958
|
if Vrs.meter_label != None:
|
|
@@ -1297,7 +1297,7 @@ class VerseTester(object):
|
|
|
1297
1297
|
return 1
|
|
1298
1298
|
|
|
1299
1299
|
# samavftta, upajAti, vizamavftta, ardhasamavftta
|
|
1300
|
-
success_samavftta_etc =
|
|
1300
|
+
success_samavftta_etc = self.test_as_samavftta_etc(Vrs)
|
|
1301
1301
|
if success_samavftta_etc and Vrs.identification_score >= 8:
|
|
1302
1302
|
return 1
|
|
1303
1303
|
# i.e., if upajāti or anything imperfect, also continue on to check jāti
|
|
@@ -1478,14 +1478,14 @@ class MeterIdentifier(object):
|
|
|
1478
1478
|
|
|
1479
1479
|
self.Scanner = S = Sc()
|
|
1480
1480
|
|
|
1481
|
-
# gets back mostly populated Verse object
|
|
1482
|
-
V = S.scan(rw_str, from_scheme=from_scheme)
|
|
1483
|
-
|
|
1484
1481
|
if _DEBUG_TIMING:
|
|
1485
1482
|
_pre_keys = ('scan_clean', 'scan_translit', 'scan_syllabify', 'scan_weights', 'scan_morae_gana',
|
|
1486
|
-
'anuzwuB', '
|
|
1483
|
+
'anuzwuB', 'samavftta', 'upajAti', 'vizamavftta', 'jAti')
|
|
1487
1484
|
_pre = {k: _section_totals.get(k, 0.0) for k in _pre_keys}
|
|
1488
1485
|
|
|
1486
|
+
# gets back mostly populated Verse object
|
|
1487
|
+
V = S.scan(rw_str, from_scheme=from_scheme)
|
|
1488
|
+
|
|
1489
1489
|
self.VerseTester = VT = VerseTester()
|
|
1490
1490
|
self.VerseTester.resplit_option = resplit_option
|
|
1491
1491
|
self.VerseTester.resplit_keep_midpoint = resplit_keep_midpoint
|
|
@@ -1568,7 +1568,7 @@ class MeterIdentifier(object):
|
|
|
1568
1568
|
|
|
1569
1569
|
if _DEBUG_TIMING:
|
|
1570
1570
|
all_keys = ('scan_clean', 'scan_translit', 'scan_syllabify', 'scan_weights', 'scan_morae_gana',
|
|
1571
|
-
'anuzwuB', '
|
|
1571
|
+
'anuzwuB', 'samavftta', 'upajAti', 'vizamavftta', 'jAti')
|
|
1572
1572
|
verse_times = {k: _section_totals.get(k, 0.0) - _pre[k] for k in all_keys}
|
|
1573
1573
|
verse_times['scan'] = sum(verse_times[k] for k in ('scan_clean', 'scan_translit', 'scan_syllabify', 'scan_weights', 'scan_morae_gana'))
|
|
1574
1574
|
cat = _meter_label_to_category(V.meter_label)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.5.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
|
|
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
|