(presentations: list[Presentation], evals: dict[str, list[int]])
| 46 | |
| 47 | |
| 48 | def eval_general(presentations: list[Presentation], evals: dict[str, list[int]]): |
| 49 | for prs in presentations: |
| 50 | if prs.source_file in evals["pages"]: |
| 51 | continue |
| 52 | evals["pages"][prs.source_file] = len(prs) |
| 53 | evals["characters"][prs.source_file] = sum( |
| 54 | [len(slide.to_text()) for slide in prs.slides] |
| 55 | ) |
| 56 | evals["figures"][prs.source_file] = sum( |
| 57 | [len(list(slide.shape_filter(Picture))) for slide in prs.slides] |
| 58 | ) |
| 59 | |
| 60 | |
| 61 | def eval_feature( |
no test coverage detected