{"id":17335984,"url":"https://github.com/basthomas/analysis","last_synced_at":"2025-04-05T15:08:26.258Z","repository":{"id":13102131,"uuid":"73484524","full_name":"BasThomas/Analysis","owner":"BasThomas","description":"A tool helping you to extract useful information from strings.","archived":false,"fork":false,"pushed_at":"2024-10-28T19:00:35.000Z","size":100,"stargazers_count":122,"open_issues_count":9,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T14:11:21.350Z","etag":null,"topics":["analysis","flesch-kincaid-grade-level","flesch-reading-ease","string","swift","syllable-count"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BasThomas.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-11T14:32:41.000Z","updated_at":"2024-09-26T09:13:20.000Z","dependencies_parsed_at":"2024-10-30T09:16:16.891Z","dependency_job_id":"1df90ee3-352e-422e-a786-293a3851717a","html_url":"https://github.com/BasThomas/Analysis","commit_stats":{"total_commits":54,"total_committers":3,"mean_commits":18.0,"dds":0.4814814814814815,"last_synced_commit":"c686069910d11b9e5169437188caf8312ea24271"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BasThomas%2FAnalysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BasThomas%2FAnalysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BasThomas%2FAnalysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BasThomas%2FAnalysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BasThomas","download_url":"https://codeload.github.com/BasThomas/Analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353746,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","flesch-kincaid-grade-level","flesch-reading-ease","string","swift","syllable-count"],"created_at":"2024-10-15T15:27:04.455Z","updated_at":"2025-04-05T15:08:26.206Z","avatar_url":"https://github.com/BasThomas.png","language":"Swift","readme":"[![Travis status](https://img.shields.io/travis/BasThomas/Analysis.svg)](https://travis-ci.org/BasThomas/Analysis)\n\n# Analysis\n\nAnalysis is a tool that helps you extract useful information from strings. It calculates the amount of sentences, words, characters, occurrence of words and characters, and more.\n\n## Installation\n\nAnalysis is available via CocoaPods.\n\n```ruby\npod 'Analysis'\n```\n\nThen run `pod install`.\n\n## Sample Project\n\nThere's a sample project in the `Example` directory. To use it, run `pod install` to download the required libraries.\n\n## Usage\n\nAnalysing a string is very straightforward. You can use any of these two ways to instantiate an `Analysis`:\n\n```swift\nimport Analysis\n\nlet analysis = Analysis(of: \"You are awesome, you!\")\n``` \n\nor\n\n```swift\nimport Analysis\n\nlet analysis = \"You are awesome, you!\".analysed()\n```\n\nAfter that, you can get the information you need.\n\n```swift\nanalysis.sentenceCount() // 1\nanalysis.wordCount(unique: true) // 4\nanalysis.characterCount(includingSpaces: false) // 18\nanalysis.wordOccurrences(caseSensitive: true) // [\"You\": 1, \"are\": 1, \"awesome\", 1, \"you\": 1]\nanalysis.wordOccurrences(caseSensitive: false) // [\"you\": 2, \"are\": 1, \"awesome\", 1]\nanalysis.frequency(of: \"you\", caseSensitive: false) // 50.0%\nanalysis.averageCharacters(per: .word) // 5.33\n\nanalysis.syllableCount() // 5\nanalysis.wordSyllables() // [\"you\": 1, \"are\": 1, \"awesome\": 2]\nanalysis.fleschReadingEase() // 97.025\nanalysis.fleschKincaidGradeLevel() // 0.72\n```\n\nYou can also easily sort your occurences via an enhanced sorting method on `Dictionary`.\n\n```swift\nanalysis\n  .wordOccurrences(caseSensitive: false)\n  .sorted(by: .key, order: .ascending) // [(\"are\", 1), (\"awesome\", 1), (\"you\", 2)]\n```\n\n## Contributing\n\nWant to contribute to this project? Great! There's some things that still need work, but definitely also let me know when you encounter any issues, spot a bug, or have a feature request!\n\nCheck out the issues for some tasks to get started with. Or, write tests. We can use as many as you can think of.\n\n## License\n\nAnalysis is released under an MIT license. See [License](License) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasthomas%2Fanalysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasthomas%2Fanalysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasthomas%2Fanalysis/lists"}