| 99 | }; |
| 100 | |
| 101 | struct AnalysisResult { |
| 102 | int totalWords; |
| 103 | int uniqueWords; |
| 104 | int totalChars; |
| 105 | int totalCharsNoSpaces; |
| 106 | int sentences; |
| 107 | int paragraphs; |
| 108 | int syllables; |
| 109 | double avgWordLen; |
| 110 | double avgSentenceLen; |
| 111 | double fleschScore; |
| 112 | std::string readingLevel; |
| 113 | std::string readingTime; |
| 114 | int positiveWords; |
| 115 | int negativeWords; |
| 116 | std::string sentiment; |
| 117 | double sentimentScore; |
| 118 | std::vector<std::pair<std::string,int>> topWords; |
| 119 | int longWords; // words > 6 chars |
| 120 | }; |
| 121 | |
| 122 | AnalysisResult analyze(const std::string& text) { |
| 123 | AnalysisResult r = {}; |
nothing calls this directly
no outgoing calls
no test coverage detected