{"id":26164751,"url":"https://github.com/optum/nertag","last_synced_at":"2026-07-01T19:32:19.043Z","repository":{"id":94608858,"uuid":"484477037","full_name":"Optum/nertag","owner":"Optum","description":"Automated named-entity recognition tagger","archived":false,"fork":false,"pushed_at":"2023-10-02T14:40:32.000Z","size":2220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T08:04:20.053Z","etag":null,"topics":["dataset","labeling","ner","nlp"],"latest_commit_sha":null,"homepage":"https://github.com/Optum/nertag","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Optum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-04-22T15:09:00.000Z","updated_at":"2022-05-04T22:21:37.000Z","dependencies_parsed_at":"2025-03-12T09:15:27.988Z","dependency_job_id":null,"html_url":"https://github.com/Optum/nertag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Optum/nertag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fnertag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fnertag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fnertag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fnertag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Optum","download_url":"https://codeload.github.com/Optum/nertag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Fnertag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35020870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dataset","labeling","ner","nlp"],"created_at":"2025-03-11T15:40:06.378Z","updated_at":"2026-07-01T19:32:19.024Z","avatar_url":"https://github.com/Optum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- NOTES --\u003e\n\u003c!--\n*** Individual sections below can be removed if not needed\n--\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** We are using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![Apache 2.0 License][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- \u003ca href=\"https://github.com/Optum/nertag\"\u003e\n    \u003cimg src=\"assets/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e --\u003e\n\n\u003ch3 align=\"center\"\u003eNERTag\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    An automated named-entity recognition tagger\n    \u003cbr /\u003e\n    \u003c!-- \u003ca href=\"https://github.com/Optum/nertag\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e --\u003e\n    \u003c!-- \u003cbr /\u003e --\u003e\n    \u003c!-- \u003cbr /\u003e --\u003e\n    \u003c!-- \u003ca href=\"https://github.com/Optum/nertag\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Optum/nertag/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Optum/nertag/issues\"\u003eRequest Feature\u003c/a\u003e --\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"assets/screenshot.png\"\u003e\n    \u003cimg src=\"assets/screenshot.png\" height=\"479\" width=\"924\" alt=\"NERTag Screen Shot\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n**NERTag** is a nimble python package that automatically tags or labels named entities ([IOB2](https://en.wikipedia.org/wiki/Inside–outside–beginning_(tagging)) format) using a taxonomy or dictionary of terms. It aims to be simple, modular, and fast, and utilizes multiprocessing for large-scale data-labeling. Labeling a document of 1.8 billion characters with a taxonomy of 15k terms and 300 entities takes roughly ~60 minutes, with the main bottleneck stemming from disk I/O.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo use **NERTag**, it is recommended to create a [conda](https://www.anaconda.com/products/distribution) virtual environment with Python 3.9+.\n\n```shell\nuser $ conda create --name nertag python=3.9\nuser $ conda activate nertag\nuser (nertag) $ git clone https://github.com/Optum/nertag\nuser (nertag) $ pip install .\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n**NERTag** is made up of 3 distinct components:\n\n1. Text preprocessing: defines text preprocessing to use\n2. Base labeling behavior: defines default text labeling behavior\n3. Tagging algorithm: defines how to label entities\n\nIn this example, the tagging algorithm utilizes a taxonomy of terms.\n\n---\n\nA toy example is provided below.\n\n\u003cdetails\u003e\n\u003csummary\u003eSample code\u003c/summary\u003e\n\n```python\nimport pandas as pd\nfrom nertag import ner, preprocess, utils, tagging\n\n# --- Taxonomy\npath = \"taxonomy.csv\"\ndf = utils.preprocess_df(\n    pd.read_csv(path), stemmer=utils.lemmatizer, filters=utils.stop_words, tokenizer=utils.tokenizer\n)\ndct = utils.setup_dict(df)\n\n# --- Data\ntexts = [\n    \"my account is closed\",\n    \"my account is locked what account can i use to unlock it\",\n    \"how do i check my fsa\",\n    \"Also known as second molars. Back teeth that come in at around the age of 12.\",\n    \"Hello. Need to update my account info, where can I make updates to my account address information?\",\n    \"Need to update address information because I want to make account updates.\",\n]\n\n# --- Pipeline\n# NOTE: By default, punctuation is removed, words are stemmed, whitespaces are replaced with a single space, and stopwords are removed.\npreprocessor = ner.Preprocessor(\n    preprocess.preprocess,\n    stemmer=utils.lemmatizer,\n    stop_words=utils.stop_words,\n    start=4,\n    stop=0,\n    step=-1,\n)\nbaselabeler = ner.BaseLabeler(utils.base_label, utils.tokenizer)\ntagger = ner.Tagger(tagging.ner_tagging, dct)\npipeline = ner.NER(preprocessor, baselabeler, tagger)\n\nresults = pipeline.sequential_labeling(texts)\n\nprint(results)\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSample output\u003c/summary\u003e\n\n```shell\nmy account is closed\n            entity     word  index  start  end\n0                O       my      0      0    2\n1  B-cancellations  account      1      3   10\n2  I-cancellations       is      2     11   13\n3  I-cancellations   closed      3     14   20\n\nmy account is locked what account can i use to unlock it\n              entity     word  index  start  end\n0                  O       my      0      0    2\n1   B-account locked  account      1      3   10\n2   I-account locked       is      2     11   13\n3   I-account locked   locked      3     14   20\n4   I-account locked     what      4     21   25\n5   I-account locked  account      5     26   33\n6                  O      can      6     34   37\n7                  O        i      7     38   39\n8         B-common1k      use      8     40   43\n9                  O       to      9     44   46\n10                 O   unlock     10     47   53\n11                 O       it     11     54   56\n\nhow do i check my fsa\n                            entity   word  index  start  end\n0                                O    how      0      0    3\n1                                O     do      1      4    6\n2                                O      i      2      7    8\n3                       B-common1k  check      3      9   14\n4                                O     my      4     15   17\n5  B-FSA:Flexible Spending Account    fsa      5     18   21\n\nAlso known as second molars. Back teeth that come in at around the age of 12.\n              entity     word  index  start  end\n0         B-common1k     Also      0      0    4\n1                  O    known      1      5   10\n2                  O       as      2     11   13\n3         B-common1k   second      3     14   20\n4           B-dental  molars.      4     21   28\n5         B-common1k     Back      5     29   33\n6   B-35:Dental Care    teeth      6     34   39\n7                  O     that      7     40   44\n8         B-common1k     come      8     45   49\n9                  O       in      9     50   52\n10                 O       at     10     53   55\n11                 O   around     11     56   62\n12                 O      the     12     63   66\n13                 O      age     13     67   70\n14                 O       of     14     71   73\n15                 O      12.     15     74   77\n\nHello. Need to update my account info, where can I make updates to my account address information?\n              entity          word  index  start  end\n0                  O        Hello.      0      0    6\n1   B-account update          Need      1      7   11\n2   I-account update            to      2     12   14\n3   I-account update        update      3     15   21\n4                  O            my      4     22   24\n5                  O       account      5     25   32\n6                  O         info,      6     33   38\n7                  O         where      7     39   44\n8                  O           can      8     45   48\n9                  O             I      9     49   50\n10  B-account update          make     10     51   55\n11  I-account update       updates     11     56   63\n12                 O            to     12     64   66\n13                 O            my     13     67   69\n14                 O       account     14     70   77\n15         B-address       address     15     78   85\n16         I-address  information?     16     86   98\n\nNeed to update address information because I want to make account updates.\n              entity         word  index  start  end\n0         B-common1k         Need      0      0    4\n1                  O           to      1      5    7\n2   B-account update       update      2      8   14\n3   I-account update      address      3     15   22\n4   I-account update  information      4     23   34\n5                  O      because      5     35   42\n6                  O            I      6     43   44\n7         B-common1k         want      7     45   49\n8                  O           to      8     50   52\n9         B-common1k         make      9     53   57\n10  B-account update      account     10     58   65\n11  I-account update     updates.     11     66   74\n```\n\n\u003c/details\u003e\n\n_For more examples, please refer to [notebooks](notebooks) and [examples](examples)_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MAINTAINERS --\u003e\n## Contact\n\n- Brandon Hsu\n  - GitHub: [thbhsu](https://github.com/thebhsu)\n  - Email: thebhsu@gmail.com\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/Optum/nertag.svg?style=for-the-badge\n[contributors-url]: https://github.com/Optum/nertag/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/Optum/nertag.svg?style=for-the-badge\n[forks-url]: https://github.com/Optum/nertag/network/members\n[stars-shield]: https://img.shields.io/github/stars/Optum/nertag.svg?style=for-the-badge\n[stars-url]: https://github.com/Optum/nertag/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Optum/nertag.svg?style=for-the-badge\n[issues-url]: https://github.com/Optum/nertag/issues\n[license-shield]: https://img.shields.io/github/license/Optum/nertag.svg?style=for-the-badge\n[license-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Fnertag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptum%2Fnertag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Fnertag/lists"}