swarmauri_evaluatorpool_accessibility 0.1.1.dev1__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.
@@ -0,0 +1,227 @@
1
+ import logging
2
+ import os
3
+ import re
4
+ from typing import Any, Dict, Literal, Tuple
5
+
6
+ from pydantic import PrivateAttr
7
+
8
+ import nltk
9
+ from nltk.corpus import cmudict
10
+ from nltk.tokenize import sent_tokenize, word_tokenize
11
+ from swarmauri_base.evaluators.EvaluatorBase import EvaluatorBase
12
+ from swarmauri_base.ComponentBase import ComponentBase
13
+ from swarmauri_standard.programs.Program import Program
14
+
15
+ logger = logging.getLogger(__name__)
16
+
17
+ # Custom download dir for environments like CI
18
+ NLTK_DATA_DIR = os.getenv("NLTK_DATA_DIR", "/tmp/nltk_data")
19
+ nltk.data.path.append(NLTK_DATA_DIR)
20
+
21
+
22
+ @ComponentBase.register_type(EvaluatorBase, "FleschReadingEaseEvaluator")
23
+ class FleschReadingEaseEvaluator(EvaluatorBase, ComponentBase):
24
+ """
25
+ Evaluator that computes the Flesch Reading Ease score for text content.
26
+
27
+ The Flesch Reading Ease score is a readability metric that uses sentence length
28
+ and syllable count to determine how easy a text is to read. The formula is:
29
+ FRE = 206.835 - 1.015*(words/sentences) - 84.6*(syllables/words)
30
+
31
+ Higher scores (closer to 100) indicate text that is easier to read, while lower
32
+ scores indicate more complex text.
33
+
34
+ Attributes:
35
+ type: The type identifier for this evaluator
36
+ """
37
+
38
+ type: Literal["FleschReadingEaseEvaluator"] = "FleschReadingEaseEvaluator"
39
+ _cmu_dict = PrivateAttr(default=None)
40
+
41
+ def __init__(self, **kwargs):
42
+ """Initialize the Flesch Reading Ease evaluator."""
43
+ super().__init__(**kwargs)
44
+ # Download necessary NLTK resources if not already present
45
+ try:
46
+ nltk.data.find("tokenizers/punkt")
47
+ except LookupError:
48
+ logger.info("Downloading NLTK punkt tokenizer")
49
+ nltk.download("punkt", quiet=True, download_dir=NLTK_DATA_DIR)
50
+
51
+ try:
52
+ nltk.data.find("corpora/cmudict")
53
+ except LookupError:
54
+ logger.info("Downloading CMU Pronouncing Dictionary")
55
+ nltk.download("cmudict", quiet=True, download_dir=NLTK_DATA_DIR)
56
+
57
+ # Load the CMU dictionary for syllable counting
58
+ self._cmu_dict = cmudict.dict() if cmudict else None
59
+
60
+ @property
61
+ def cmu_dict(self):
62
+ """Access the CMU Pronouncing Dictionary used for syllable counts."""
63
+ return self._cmu_dict
64
+
65
+ def _compute_score(
66
+ self, program: Program, **kwargs
67
+ ) -> Tuple[float, Dict[str, Any]]:
68
+ """
69
+ Compute the Flesch Reading Ease score for the given program.
70
+
71
+ Args:
72
+ program: The program containing text to evaluate
73
+ **kwargs: Additional parameters for the evaluation process
74
+
75
+ Returns:
76
+ A tuple containing:
77
+ - float: The Flesch Reading Ease score (0-100, higher is easier to read)
78
+ - Dict[str, Any]: Metadata including sentence and syllable statistics
79
+
80
+ Raises:
81
+ ValueError: If the text cannot be processed
82
+ """
83
+ # Extract text from the program
84
+ text = program.get_content()
85
+ if not text or not isinstance(text, str):
86
+ logger.warning("Program content is empty or not a string")
87
+ return 0.0, {"error": "No valid text content found"}
88
+
89
+ # Clean the text (remove extra whitespace, etc.)
90
+ text = self._clean_text(text)
91
+
92
+ # Tokenize the text into sentences and words
93
+ sentences = sent_tokenize(text)
94
+ words = word_tokenize(text)
95
+
96
+ # Filter out punctuation from words
97
+ words = [word for word in words if re.match(r"\w+", word)]
98
+
99
+ # Count sentences, words, and syllables
100
+ sentence_count = len(sentences)
101
+ word_count = len(words)
102
+
103
+ if sentence_count == 0 or word_count == 0:
104
+ logger.warning("Text contains no sentences or words")
105
+ return 0.0, {"error": "Text contains no sentences or words"}
106
+
107
+ # Count syllables in each word
108
+ total_syllables = sum(self._count_syllables(word) for word in words)
109
+
110
+ # Calculate average sentence length and syllables per word
111
+ avg_sentence_length = word_count / sentence_count
112
+ avg_syllables_per_word = total_syllables / word_count
113
+
114
+ # Calculate Flesch Reading Ease score
115
+ # FRE = 206.835 - 1.015*(words/sentences) - 84.6*(syllables/words)
116
+ fre_score = (
117
+ 206.835 - (1.015 * avg_sentence_length) - (84.6 * avg_syllables_per_word)
118
+ )
119
+
120
+ # Ensure score is within 0-100 range
121
+ fre_score = max(0, min(100, fre_score))
122
+
123
+ # Prepare metadata
124
+ metadata = {
125
+ "sentence_count": sentence_count,
126
+ "word_count": word_count,
127
+ "syllable_count": total_syllables,
128
+ "avg_sentence_length": avg_sentence_length,
129
+ "avg_syllables_per_word": avg_syllables_per_word,
130
+ "readability_interpretation": self._interpret_score(fre_score),
131
+ }
132
+
133
+ logger.info(
134
+ f"Flesch Reading Ease score: {fre_score:.2f} ({metadata['readability_interpretation']})"
135
+ )
136
+ return fre_score, metadata
137
+
138
+ def _clean_text(self, text: str) -> str:
139
+ """
140
+ Clean text by removing extra whitespace and normalizing.
141
+
142
+ Args:
143
+ text: The input text to clean
144
+
145
+ Returns:
146
+ Cleaned text
147
+ """
148
+ # Replace multiple whitespace with a single space
149
+ text = re.sub(r"\s+", " ", text)
150
+ # Remove leading/trailing whitespace
151
+ text = text.strip()
152
+ return text
153
+
154
+ def _count_syllables(self, word: str) -> int:
155
+ """
156
+ Count the number of syllables in a word.
157
+
158
+ Uses the CMU Pronouncing Dictionary if available, otherwise falls back
159
+ to a heuristic method.
160
+
161
+ Args:
162
+ word: The word to count syllables for
163
+
164
+ Returns:
165
+ The number of syllables in the word
166
+ """
167
+ word = word.lower()
168
+
169
+ # Try using CMU dictionary first
170
+ if self._cmu_dict and word in self._cmu_dict:
171
+ # Count vowel phonemes (indicated by digits in the CMU dict)
172
+ return max(
173
+ 1,
174
+ sum(
175
+ 1
176
+ for phoneme in self._cmu_dict[word][0]
177
+ if any(c.isdigit() for c in phoneme)
178
+ ),
179
+ )
180
+
181
+ # Fallback to heuristic method
182
+ # Count vowel groups
183
+ vowels = "aeiouy"
184
+ count = 0
185
+ prev_is_vowel = False
186
+
187
+ for char in word:
188
+ is_vowel = char.lower() in vowels
189
+ if is_vowel and not prev_is_vowel:
190
+ count += 1
191
+ prev_is_vowel = is_vowel
192
+
193
+ # Handle special cases
194
+ if word.endswith("e") and not word.endswith("le"):
195
+ count -= 1
196
+ if word.endswith("es") or word.endswith("ed") and len(word) > 2:
197
+ if word[-3] not in vowels:
198
+ count -= 1
199
+ if count == 0: # Every word has at least one syllable
200
+ count = 1
201
+
202
+ return count
203
+
204
+ def _interpret_score(self, score: float) -> str:
205
+ """
206
+ Provide a human-readable interpretation of the Flesch Reading Ease score.
207
+
208
+ Args:
209
+ score: The Flesch Reading Ease score (0-100)
210
+
211
+ Returns:
212
+ A string describing the readability level
213
+ """
214
+ if score >= 90:
215
+ return "Very Easy (5th grade)"
216
+ elif score >= 80:
217
+ return "Easy (6th grade)"
218
+ elif score >= 70:
219
+ return "Fairly Easy (7th grade)"
220
+ elif score >= 60:
221
+ return "Standard (8th-9th grade)"
222
+ elif score >= 50:
223
+ return "Fairly Difficult (10th-12th grade)"
224
+ elif score >= 30:
225
+ return "Difficult (College level)"
226
+ else:
227
+ return "Very Difficult (College graduate level)"
@@ -0,0 +1,177 @@
1
+ import logging
2
+ import re
3
+ import string
4
+ from typing import Any, Dict, Literal, Tuple
5
+
6
+ from swarmauri_base.ComponentBase import ComponentBase
7
+ from swarmauri_base.evaluators.EvaluatorBase import EvaluatorBase
8
+ from swarmauri_standard.programs.Program import Program
9
+
10
+ logger = logging.getLogger(__name__)
11
+
12
+
13
+ @ComponentBase.register_type(EvaluatorBase, "GunningFogEvaluator")
14
+ class GunningFogEvaluator(EvaluatorBase, ComponentBase):
15
+ """
16
+ Evaluator that computes the Gunning Fog Index (GFI) for text readability.
17
+
18
+ The Gunning Fog Index estimates the years of formal education needed to
19
+ understand text on a first reading. Higher scores indicate more complex text.
20
+ The formula is: 0.4 * ((words/sentences) + 100 * (complex_words/words))
21
+
22
+ A complex word is defined as having three or more syllables.
23
+
24
+ Attributes:
25
+ type: The literal type identifier for this evaluator
26
+ """
27
+
28
+ type: Literal["GunningFogEvaluator"] = "GunningFogEvaluator"
29
+
30
+ def _compute_score(
31
+ self, program: Program, **kwargs
32
+ ) -> Tuple[float, Dict[str, Any]]:
33
+ """
34
+ Compute the Gunning Fog Index for the program's text.
35
+
36
+ Args:
37
+ program: The program containing text to evaluate
38
+ **kwargs: Additional parameters (unused)
39
+
40
+ Returns:
41
+ A tuple containing:
42
+ - float: The Gunning Fog Index score (lower is better for readability)
43
+ - Dict[str, Any]: Metadata including sentence count, word count, and complex word count
44
+ """
45
+ text = program.get_text()
46
+ if not text or not isinstance(text, str):
47
+ logger.warning("Program text is empty or not a string")
48
+ return 0.0, {"error": "No valid text to analyze"}
49
+
50
+ # Count sentences, words, and complex words
51
+ sentences = self._count_sentences(text)
52
+ words = self._count_words(text)
53
+ complex_words = self._count_complex_words(text)
54
+
55
+ # Avoid division by zero
56
+ if sentences == 0 or words == 0:
57
+ logger.warning("Text has no sentences or words")
58
+ return 0.0, {
59
+ "sentences": sentences,
60
+ "words": words,
61
+ "complex_words": complex_words,
62
+ "error": "Text has no sentences or words",
63
+ }
64
+
65
+ # Calculate Gunning Fog Index
66
+ avg_sentence_length = words / sentences
67
+ percent_complex_words = 100 * (complex_words / words)
68
+ gunning_fog_index = 0.4 * (avg_sentence_length + percent_complex_words)
69
+
70
+ # Higher score means more complex text, so we invert it for fitness
71
+ # (assuming lower complexity is better for accessibility)
72
+ # We cap at 20 as most fog index scores fall between 6-17
73
+ capped_score = min(gunning_fog_index, 20)
74
+ normalized_score = 1.0 - (capped_score / 20.0)
75
+
76
+ metadata = {
77
+ "gunning_fog_index": gunning_fog_index,
78
+ "sentences": sentences,
79
+ "words": words,
80
+ "complex_words": complex_words,
81
+ "avg_sentence_length": avg_sentence_length,
82
+ "percent_complex_words": percent_complex_words,
83
+ }
84
+
85
+ logger.debug(f"Computed Gunning Fog Index: {gunning_fog_index:.2f}")
86
+ return normalized_score, metadata
87
+
88
+ def _count_sentences(self, text: str) -> int:
89
+ """
90
+ Count the number of sentences in the text.
91
+
92
+ Args:
93
+ text: The text to analyze
94
+
95
+ Returns:
96
+ int: The number of sentences
97
+ """
98
+ # Simple sentence detection based on common sentence terminators
99
+ # This is a simplified approach; more sophisticated NLP could be used
100
+ sentence_terminators = re.compile(r"[.!?]+")
101
+ sentences = sentence_terminators.split(text)
102
+ # Filter out empty strings that might result from multiple terminators
103
+ sentences = [s for s in sentences if s.strip()]
104
+ return len(sentences)
105
+
106
+ def _count_words(self, text: str) -> int:
107
+ """
108
+ Count the number of words in the text.
109
+
110
+ Args:
111
+ text: The text to analyze
112
+
113
+ Returns:
114
+ int: The number of words
115
+ """
116
+ # Remove punctuation and split by whitespace
117
+ translator = str.maketrans("", "", string.punctuation)
118
+ text = text.translate(translator)
119
+ words = [word for word in text.split() if word]
120
+ return len(words)
121
+
122
+ def _count_complex_words(self, text: str) -> int:
123
+ """
124
+ Count the number of complex words (3+ syllables) in the text.
125
+
126
+ Args:
127
+ text: The text to analyze
128
+
129
+ Returns:
130
+ int: The number of complex words
131
+ """
132
+ # Remove punctuation and split by whitespace
133
+ translator = str.maketrans("", "", string.punctuation)
134
+ text = text.translate(translator)
135
+ words = text.split()
136
+
137
+ complex_word_count = 0
138
+ for word in words:
139
+ if self._count_syllables(word) >= 3:
140
+ complex_word_count += 1
141
+
142
+ return complex_word_count
143
+
144
+ def _count_syllables(self, word: str) -> int:
145
+ """
146
+ Count the number of syllables in a word.
147
+
148
+ This is a heuristic approach that counts vowel groups.
149
+ It handles common patterns but isn't perfect for all words.
150
+
151
+ Args:
152
+ word: The word to analyze
153
+
154
+ Returns:
155
+ int: The estimated number of syllables
156
+ """
157
+ word = word.lower()
158
+
159
+ # Remove common suffix patterns that don't add syllables
160
+ if word.endswith("es") or word.endswith("ed"):
161
+ word = word[:-2]
162
+ elif word.endswith("e"):
163
+ word = word[:-1]
164
+
165
+ # Count vowel groups (consecutive vowels count as one syllable)
166
+ vowels = "aeiouy"
167
+ count = 0
168
+ prev_is_vowel = False
169
+
170
+ for char in word:
171
+ is_vowel = char in vowels
172
+ if is_vowel and not prev_is_vowel:
173
+ count += 1
174
+ prev_is_vowel = is_vowel
175
+
176
+ # Every word has at least one syllable
177
+ return max(1, count)
@@ -0,0 +1,28 @@
1
+ from .AutomatedReadabilityIndexEvaluator import AutomatedReadabilityIndexEvaluator
2
+ from .ColemanLiauIndexEvaluator import ColemanLiauIndexEvaluator
3
+ from .FleschKincaidGradeEvaluator import FleschKincaidGradeEvaluator
4
+ from .FleschReadingEaseEvaluator import FleschReadingEaseEvaluator
5
+ from .GunningFogEvaluator import GunningFogEvaluator
6
+ from .AccessibilityEvaluatorPool import AccessibilityEvaluatorPool
7
+
8
+ __all__ = [
9
+ "AutomatedReadabilityIndexEvaluator",
10
+ "ColemanLiauIndexEvaluator",
11
+ "FleschKincaidGradeEvaluator",
12
+ "FleschReadingEaseEvaluator",
13
+ "GunningFogEvaluator",
14
+ "AccessibilityEvaluatorPool",
15
+ ]
16
+
17
+ try:
18
+ # For Python 3.8 and newer
19
+ from importlib.metadata import version, PackageNotFoundError
20
+ except ImportError:
21
+ # For older Python versions, use the backport
22
+ from importlib_metadata import version, PackageNotFoundError
23
+
24
+ try:
25
+ __version__ = version("swarmauri_evaluatorpool_accessibility")
26
+ except PackageNotFoundError:
27
+ # If the package is not installed (for example, during development)
28
+ __version__ = "0.0.0"
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2025] [Jacob Stewart]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.3
2
+ Name: swarmauri_evaluatorpool_accessibility
3
+ Version: 0.1.1.dev1
4
+ Summary: A package providing accessibility and readability evaluators for SwarmAuri
5
+ License: Apache-2.0
6
+ Keywords: accessibility,readability,evaluator,swarmauri,flesch-kincaid,gunning-fog,coleman-liau,automated-readability-index,flesch-reading-ease,text-analysis,nlp
7
+ Author: SwarmAuri Team
8
+ Author-email: info@swarmauri.com
9
+ Requires-Python: >=3.10,<3.13
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Natural Language :: English
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Text Processing :: Linguistic
18
+ Classifier: Topic :: Software Development :: Quality Assurance
19
+ Requires-Dist: beautifulsoup4
20
+ Requires-Dist: markdown
21
+ Requires-Dist: nltk
22
+ Requires-Dist: pydantic
23
+ Requires-Dist: swarmauri_base
24
+ Requires-Dist: swarmauri_core
25
+ Requires-Dist: swarmauri_standard
26
+ Description-Content-Type: text/markdown
27
+
28
+ pip install swarmauri_evaluatorpool_accessibility
@@ -0,0 +1,12 @@
1
+ swarmauri_evaluatorpool_accessibility/AccessibilityEvaluatorPool.py,sha256=68n9t8_uqsgP_BmbRuRvCvHMAHnHwzFLjBNQjtyVtXM,12053
2
+ swarmauri_evaluatorpool_accessibility/AutomatedReadabilityIndexEvaluator.py,sha256=4afw4-GGptiqdhgLXjMeELnu5Oi0FZ12wMAx54l-56E,7008
3
+ swarmauri_evaluatorpool_accessibility/ColemanLiauIndexEvaluator.py,sha256=7im1e3e4ie14NBO_ahfiLgDA5fj3zFxN93cFC5oSON4,8010
4
+ swarmauri_evaluatorpool_accessibility/FleschKincaidGradeEvaluator.py,sha256=4C-Qo_15MbIcS3EvsvETtrQewvCuhOtZ7Z0sfWz46V4,9109
5
+ swarmauri_evaluatorpool_accessibility/FleschReadingEaseEvaluator.py,sha256=a6-U89A0FBChMlhIQauHn8RxgEcLBXKZqgjZvSKdVts,7740
6
+ swarmauri_evaluatorpool_accessibility/GunningFogEvaluator.py,sha256=VwJb7aBsw3HjqnQf23G5Ljz5W9BOLc8l5OMxDRbjzj4,6042
7
+ swarmauri_evaluatorpool_accessibility/__init__.py,sha256=3VkNBtJLHM4cEuL9eDReA8qLcROeCp1Tx1KdOJYgPbU,1061
8
+ swarmauri_evaluatorpool_accessibility-0.1.1.dev1.dist-info/LICENSE,sha256=KuY_Ti4-LaOiJ7LufahogACoVDNPKz3gJD_C2XCSUrE,11346
9
+ swarmauri_evaluatorpool_accessibility-0.1.1.dev1.dist-info/METADATA,sha256=0e5O-vK-tl3t9M9QRuN1fsbh3FN-aPBwgsWmrc9HgxI,1208
10
+ swarmauri_evaluatorpool_accessibility-0.1.1.dev1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ swarmauri_evaluatorpool_accessibility-0.1.1.dev1.dist-info/entry_points.txt,sha256=Dzgzb68nL5v4PWS2jSq0jvgldrg3U62VonNUjOkdC28,607
12
+ swarmauri_evaluatorpool_accessibility-0.1.1.dev1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.1.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any