janus-llm 3.3.1__py3-none-any.whl → 3.3.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- janus/__init__.py +1 -1
- janus/metrics/reading.py +31 -0
- {janus_llm-3.3.1.dist-info → janus_llm-3.3.2.dist-info}/METADATA +1 -1
- {janus_llm-3.3.1.dist-info → janus_llm-3.3.2.dist-info}/RECORD +7 -7
- {janus_llm-3.3.1.dist-info → janus_llm-3.3.2.dist-info}/LICENSE +0 -0
- {janus_llm-3.3.1.dist-info → janus_llm-3.3.2.dist-info}/WHEEL +0 -0
- {janus_llm-3.3.1.dist-info → janus_llm-3.3.2.dist-info}/entry_points.txt +0 -0
janus/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from langchain_core._api.deprecation import LangChainDeprecationWarning
|
|
5
5
|
from janus.converter.translate import Translator
|
6
6
|
from janus.metrics import * # noqa: F403
|
7
7
|
|
8
|
-
__version__ = "3.3.
|
8
|
+
__version__ = "3.3.2"
|
9
9
|
|
10
10
|
# Ignoring a deprecation warning from langchain_core that I can't seem to hunt down
|
11
11
|
warnings.filterwarnings("ignore", category=LangChainDeprecationWarning)
|
janus/metrics/reading.py
CHANGED
@@ -77,6 +77,21 @@ def flesch(target: str, **kwargs) -> float:
|
|
77
77
|
return get_readability(target).flesch().score
|
78
78
|
|
79
79
|
|
80
|
+
@metric(use_reference=False, help="The Flesch Grade Level Readability score")
|
81
|
+
def flesch_grade(target: str, **kwargs) -> float:
|
82
|
+
"""Calculate the Flesch Score using py-readability-metrics.
|
83
|
+
|
84
|
+
Arguments:
|
85
|
+
target: The target text.
|
86
|
+
|
87
|
+
Returns:
|
88
|
+
The Flesch-Kincaid Grade Level score.
|
89
|
+
"""
|
90
|
+
if not target.strip(): # Check if the target text is blank
|
91
|
+
return None
|
92
|
+
return get_readability(target).flesch_kincaid().score
|
93
|
+
|
94
|
+
|
80
95
|
@metric(use_reference=False, help="The Gunning-Fog Readability score")
|
81
96
|
def gunning_fog(target: str, **kwargs) -> float:
|
82
97
|
"""Calculate the Gunning-Fog Score using py-readability-metrics.
|
@@ -90,3 +105,19 @@ def gunning_fog(target: str, **kwargs) -> float:
|
|
90
105
|
if not target.strip(): # Check if the target text is blank
|
91
106
|
return None
|
92
107
|
return get_readability(target).gunning_fog().score
|
108
|
+
|
109
|
+
|
110
|
+
@metric(use_reference=False, help="The Gunning-Fog Grade Level Readability score")
|
111
|
+
def gunning_fog_grade(target: str, **kwargs) -> float:
|
112
|
+
"""Calculate the Gunning-Fog Grade Level Score using py-readability-metrics.
|
113
|
+
|
114
|
+
Arguments:
|
115
|
+
target: The target text.
|
116
|
+
|
117
|
+
Returns:
|
118
|
+
The Gunning-Fog Grade Level score.
|
119
|
+
"""
|
120
|
+
if not target.strip(): # Check if the target text is blank
|
121
|
+
return None
|
122
|
+
grade_level = get_readability(target).gunning_fog().grade_level
|
123
|
+
return None if grade_level == "na" else grade_level
|
@@ -1,4 +1,4 @@
|
|
1
|
-
janus/__init__.py,sha256=
|
1
|
+
janus/__init__.py,sha256=MyAIBSlNInMKo5GQ3bDD7TxPwy1U-UHo7831cggUHlE,361
|
2
2
|
janus/__main__.py,sha256=lEkpNtLVPtFo8ySDZeXJ_NXDHb0GVdZFPWB4gD4RPS8,64
|
3
3
|
janus/_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
janus/_tests/conftest.py,sha256=V7uW-oq3YbFiRPvrq15YoVVrA1n_83pjgiyTZ-IUGW8,963
|
@@ -77,7 +77,7 @@ janus/metrics/complexity_metrics.py,sha256=9sHxa9tY9IgdFC4grCmDSuu8Nkphm_FWbTecx
|
|
77
77
|
janus/metrics/file_pairing.py,sha256=b0848gbDTqKVge-uGiujtHdsgcbkpJ04nWF2ul_gbCw,3749
|
78
78
|
janus/metrics/llm_metrics.py,sha256=nzzJMSnoZfgtzzltjoCu1l4-Qwuycd-V3z17AtStYdY,5700
|
79
79
|
janus/metrics/metric.py,sha256=nZJQY-_AdiRFz6Af38t6TOam1I_yCns89-aOHwPRIos,17011
|
80
|
-
janus/metrics/reading.py,sha256=
|
80
|
+
janus/metrics/reading.py,sha256=RyOSebENWPGD1m_-QfKM9v2vfNAQVkiZ2Oyynb2HrVI,3253
|
81
81
|
janus/metrics/rouge_score.py,sha256=XnA2ABAceIzzA_9rIYDaMtyD4pphHxXVwxaYvMcqZWE,2878
|
82
82
|
janus/metrics/similarity.py,sha256=NKd-m8hMB27i1_1CQkG5o7HrAK2wTr89B21Y36kqHiE,1630
|
83
83
|
janus/metrics/splitting.py,sha256=610ScHRvALwdkqA6YyGI-tr3a18_cUofldBxGYX0SwE,968
|
@@ -100,8 +100,8 @@ janus/utils/_tests/test_progress.py,sha256=Rs_u5PiGjP-L-o6C1fhwfE1ig8jYu9Xo9s4p8
|
|
100
100
|
janus/utils/enums.py,sha256=AoilbdiYyMvY2Mp0AM4xlbLSELfut2XMwhIM1S_msP4,27610
|
101
101
|
janus/utils/logger.py,sha256=KZeuaMAnlSZCsj4yL0P6N-JzZwpxXygzACWfdZFeuek,2337
|
102
102
|
janus/utils/progress.py,sha256=PIpcQec7SrhsfqB25LHj2CDDkfm9umZx90d9LZnAx6k,1469
|
103
|
-
janus_llm-3.3.
|
104
|
-
janus_llm-3.3.
|
105
|
-
janus_llm-3.3.
|
106
|
-
janus_llm-3.3.
|
107
|
-
janus_llm-3.3.
|
103
|
+
janus_llm-3.3.2.dist-info/LICENSE,sha256=_j0st0a-HB6MRbP3_BW3PUqpS16v54luyy-1zVyl8NU,10789
|
104
|
+
janus_llm-3.3.2.dist-info/METADATA,sha256=NfyvyOPvC1Qj3jNh264MUYWnsA67hOD6jzL7uiIkDq4,4184
|
105
|
+
janus_llm-3.3.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
106
|
+
janus_llm-3.3.2.dist-info/entry_points.txt,sha256=OGhQwzj6pvXp79B0SaBD5apGekCu7Dwe9fZZT_TZ544,39
|
107
|
+
janus_llm-3.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|