{"id":13872284,"url":"https://github.com/Flight-School/sentences","last_synced_at":"2025-07-16T02:30:29.563Z","repository":{"id":95269101,"uuid":"223485363","full_name":"Flight-School/sentences","owner":"Flight-School","description":"A command-line utility that splits natural language text into sentences.","archived":false,"fork":false,"pushed_at":"2020-01-14T12:53:28.000Z","size":7,"stargazers_count":38,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-06T23:51:54.031Z","etag":null,"topics":["cli","macos","nlp","sentence-tokenizer","swift"],"latest_commit_sha":null,"homepage":null,"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/Flight-School.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-22T20:58:29.000Z","updated_at":"2024-06-25T18:28:06.000Z","dependencies_parsed_at":"2023-03-06T04:45:17.773Z","dependency_job_id":null,"html_url":"https://github.com/Flight-School/sentences","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fsentences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fsentences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fsentences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fsentences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flight-School","download_url":"https://codeload.github.com/Flight-School/sentences/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226095631,"owners_count":17572966,"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":["cli","macos","nlp","sentence-tokenizer","swift"],"created_at":"2024-08-05T23:00:38.678Z","updated_at":"2024-11-23T20:30:48.837Z","avatar_url":"https://github.com/Flight-School.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# sentences\n\n`sentences` is a command-line utility\nthat splits natural language text into sentences.\n\n```terminal\n$ cat propositions.txt\nAll men are mortal. Socrates is a man. Therefore, Socrates is mortal.\n\n$ sentences propositions.txt\nAll men are mortal.\nSocrates is a man.\nTherefore, Socrates is mortal.\n\n```\n\n---\n\nFor more information about natural language processing,\ncheck out Chapter 7 of the\n[Flight School Guide to Swift Strings](https://flight.school/books/strings).\n\n---\n\n## Requirements\n\n- macOS 10.13+\n\n## Installation\n\nInstall `sentences` with [Homebrew](https://brew.sh) using the following command:\n\n```terminal\n$ brew install flight-school/formulae/sentences\n```\n\n## Usage\n\nText can be read from either standard input or file arguments,\nand named entities are written to standard output on separate lines.\n\n### Reading from Piped Standard Input\n\n```terminal\n$ echo \"Designed by Apple in California. Assembled in China.\" | sentences\nDesigned by Apple in California. \nAssembled in China.\n\n$ echo \"床前明月光，疑是地上霜。举头望明月，低头思故乡。\" | sentences\n床前明月光，疑是地上霜。\n举头望明月，低头思故乡。\n\n```\n\n### Reading from Standard Input Interactively\n\n```terminal\n$ sentences\nGreetings from Cupertino, California! (This text is being typed into standard input.)\nGreetings from Cupertino, California!\n(This text is being typed into standard input.)\n\n```\n\n### Reading from a File\n\n```terminal\n$ head -n 1 think_different.txt\nHere's to the crazy ones. The misfits. The rebels. The troublemakers.\n\n$ sentences think_different.txt\nHere's to the crazy ones.\nThe misfits.\nThe rebels.\nThe troublemakers.\nThe round pegs in the square holes.\nThe ones who see things differently.\nThey're not fond of rules.\nAnd they have no respect for the status quo.\nYou can quote them, disagree with them, glorify or vilify them.\nAbout the only thing you can't do is ignore them.\nBecause they change things.\nThey push the human race forward.\nAnd while some may see them as the crazy ones, we see genius.\nBecause the people who are crazy enough to think they can change the world, are the ones who do.\n\n```\n\n## Advanced Usage\n\n`sentences` can be chained with\n[Unix text processing commands](https://en.wikibooks.org/wiki/Guide_to_Unix/Commands/Text_Processing),\nlike `cut`, `sort`, `uniq`, `comm`, `grep` `sed`, and `awk` ---\nas well as its sibling tools,\n[`ner`](https://github.com/Flight-School/ner) and [`pos`](https://github.com/Flight-School/pos).\n\n### Filtering Tags\n\n```terminal\n$ sentences think_different.txt | head -n 1 | pos\nADVERB\tHere\nVERB\t's\nPREPOSITION\tto\nDETERMINER\tthe\nADJECTIVE\tcrazy\nNOUN\tones\n```\n\n## Additional Details\n\n`sentences` uses\n[`NLTagger`](https://developer.apple.com/documentation/naturallanguage/nltagger)\nwhen available,\nfalling back on\n[`NSLinguisticTagger`](https://developer.apple.com/documentation/foundation/nslinguistictagger)\nfor older versions of macOS.\n\n## License\n\nMIT\n\n## Contact\n\nMattt ([@mattt](https://twitter.com/mattt))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlight-School%2Fsentences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFlight-School%2Fsentences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlight-School%2Fsentences/lists"}