{"id":13872285,"url":"https://github.com/Flight-School/ner","last_synced_at":"2025-07-16T02:30:29.479Z","repository":{"id":95269023,"uuid":"223453563","full_name":"Flight-School/ner","owner":"Flight-School","description":"A command-line utility for extracting names of people, places, and organizations from text on macOS.","archived":false,"fork":false,"pushed_at":"2019-11-23T16:12:24.000Z","size":12,"stargazers_count":74,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-06T23:51:53.966Z","etag":null,"topics":["cli","macos","named-entity-recognition","nlp","swift"],"latest_commit_sha":null,"homepage":"https://flight.school/books/strings","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-22T17:31:29.000Z","updated_at":"2023-09-08T18:00:29.000Z","dependencies_parsed_at":"2023-03-03T23:30:41.683Z","dependency_job_id":null,"html_url":"https://github.com/Flight-School/ner","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%2Fner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2Fner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flight-School","download_url":"https://codeload.github.com/Flight-School/ner/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","named-entity-recognition","nlp","swift"],"created_at":"2024-08-05T23:00:38.700Z","updated_at":"2024-11-23T20:30:48.771Z","avatar_url":"https://github.com/Flight-School.png","language":"Swift","readme":"# ner\n\n`ner` is a command-line utility for performing\n\u003cdfn\u003enamed entity recognition\u003c/dfn\u003e (\u003cabbr\u003eNER\u003c/abbr\u003e) on text.\nYou can use it to extract names of people, places, and organizations\nfrom standard input or file arguments.\n\n```terminal\n$ echo \"Designed by Apple in California.\" | ner\nORGANIZATION\tApple\nPLACE\tCalifornia\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.12+\n\n## Installation\n\nInstall `ner` with [Homebrew](https://brew.sh) using the following command:\n\n```terminal\n$ brew install flight-school/formulae/ner\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 \"Tim Cook is the CEO of Apple.\" | ner\nPERSON\tTim Cook\nORGANIZATION\tApple\n```\n\n### Reading from Standard Input Interactively\n\n```terminal\n$ ner\nGreetings from Cupertino, California! (This text is being typed into standard input.)\nPLACE\tCupertino\nPLACE\tCalifornia\n```\n\n### Reading from a File\n\n```terminal\n$ cat barton.txt\nThe American Red Cross was established in Washington DC by Clara Barton.\n\n$ ner barton.txt\nORGANIZATION\tAmerican Red Cross\nPLACE\tWashington DC\nPERSON\tClara Barton\n```\n\n### Reading from Multiple Files\n\n```terminal\n$ cat lincoln.txt\nAbraham Lincoln was the 16th President of the United States of America.\n\n$ ner barton.txt lincoln.txt\nORGANIZATION\tAmerican Red Cross\nPLACE\tWashington DC\nPERSON\tClara Barton\nPERSON\tAbraham Lincoln\nPLACE\tUnited States of America\n```\n\n## Advanced Usage\n\n`ner` 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`.\n\n### Filtering Tags\n\n```terminal\n$ ner barton.txt | cut -f2\nAmerican Red Cross\nWashington DC\nClara Barton\n```\n\n## Additional Details\n\nNamed entities are written to standard output on separate lines.\nEach line consists of\nthe tag (`PERSON`, `PLACE`, or `ORGANIZATION`),\nfollowed by a tab (`\\t`),\nfollowed by the token:\n\n```regexp\n^(?\u003ctag\u003e(?\u003ePERSON|PLACE|ORGANIZATION))\\t(?\u003ctoken\u003e.+)$\n```\n\n`ner` 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","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlight-School%2Fner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFlight-School%2Fner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlight-School%2Fner/lists"}