janus-llm 3.3.0__tar.gz → 3.3.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {janus_llm-3.3.0 → janus_llm-3.3.2}/PKG-INFO +1 -1
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/__init__.py +1 -1
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/reading.py +31 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/pyproject.toml +1 -1
- {janus_llm-3.3.0 → janus_llm-3.3.2}/LICENSE +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/README.md +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/__main__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/_tests/conftest.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/_tests/test_cli.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/cli.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/_tests/test_translate.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/converter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/diagram.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/document.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/evaluate.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/requirements.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/converter/translate.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/_tests/test_collections.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/_tests/test_database.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/_tests/test_vectorize.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/collections.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/database.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/embedding_models_info.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/embedding/vectorize.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/_tests/test_combine.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/_tests/test_splitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/alc/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/alc/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/alc/_tests/test_alc.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/alc/alc.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/binary/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/binary/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/binary/_tests/test_binary.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/binary/binary.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/binary/reveng/decompile_script.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/block.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/combine.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/file.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/mumps/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/mumps/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/mumps/_tests/test_mumps.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/mumps/mumps.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/mumps/patterns.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/basic_splitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/chunk_splitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/registry.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/simple_ast.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/naive/tag_splitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/node.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/splitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/treesitter/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/treesitter/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/treesitter/_tests/test_treesitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/language/treesitter/treesitter.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/llm/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/llm/model_callbacks.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/llm/models_info.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/reference.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/target.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_bleu.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_chrf.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_file_pairing.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_llm.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_reading.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_rouge_score.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_similarity_score.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/_tests/test_treesitter_metrics.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/bleu.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/chrf.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/cli.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/complexity_metrics.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/file_pairing.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/llm_metrics.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/metric.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/rouge_score.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/similarity.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/metrics/splitting.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/_tests/test_code_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/code_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/doc_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/eval_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/refiner_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/reqs_parser.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/parsers/uml.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/prompts/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/prompts/prompt.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/refiners/refiner.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/_tests/__init__.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/_tests/test_logger.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/_tests/test_progress.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/enums.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/logger.py +0 -0
- {janus_llm-3.3.0 → janus_llm-3.3.2}/janus/utils/progress.py +0 -0
@@ -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)
|
@@ -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,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "janus-llm"
|
3
|
-
version = "3.3.
|
3
|
+
version = "3.3.2"
|
4
4
|
description = "A transcoding library using LLMs."
|
5
5
|
authors = ["Michael Doyle <mdoyle@mitre.org>", "Chris Glasz <cglasz@mitre.org>",
|
6
6
|
"Chris Tohline <ctohline@mitre.org>", "William Macke <wmacke@mitre.org>",
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|