{"id":23758810,"url":"https://github.com/jack-r-warren/best_effort_parser","last_synced_at":"2026-05-05T21:31:07.414Z","repository":{"id":56826513,"uuid":"185912120","full_name":"jack-r-warren/best_effort_parser","owner":"jack-r-warren","description":"Dart best-effort parsing for names with unknown formats (like unstructured user input)","archived":false,"fork":false,"pushed_at":"2019-05-25T03:16:22.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-22T16:40:56.378Z","etag":null,"topics":["dart","flutter","parsing"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/best_effort_parser","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jack-r-warren.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}},"created_at":"2019-05-10T03:25:12.000Z","updated_at":"2019-05-25T03:16:18.000Z","dependencies_parsed_at":"2022-09-20T22:01:57.665Z","dependency_job_id":null,"html_url":"https://github.com/jack-r-warren/best_effort_parser","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/jack-r-warren/best_effort_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-r-warren%2Fbest_effort_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-r-warren%2Fbest_effort_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-r-warren%2Fbest_effort_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-r-warren%2Fbest_effort_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jack-r-warren","download_url":"https://codeload.github.com/jack-r-warren/best_effort_parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-r-warren%2Fbest_effort_parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32669307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dart","flutter","parsing"],"created_at":"2024-12-31T19:55:48.059Z","updated_at":"2026-05-05T21:31:07.397Z","avatar_url":"https://github.com/jack-r-warren.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Best Effort Parser\n\n\u003e Author: [Jack Warren][author site]\n\n[![Build Status](https://travis-ci.com/jack-r-warren/best_effort_parser.svg?branch=master)](https://travis-ci.com/jack-r-warren/best_effort_parser) [![Coverage Status](https://coveralls.io/repos/github/jack-r-warren/best_effort_parser/badge.svg?branch=master)](https://coveralls.io/github/jack-r-warren/best_effort_parser?branch=master) [![Pub](https://img.shields.io/pub/v/best_effort_parser.svg)](https://pub.dartlang.org/packages/best_effort_parser)\n\nParse unstructured user input, with customizable behavior and output types. Parsing is currently available for [names](#name-parsing) and [dates](#date-parsing).\n\n## Name Parsing\n#### `best_effort_parser/name.dart`\n\nProvides parsing of names by categorizing different parts:\n- **family**: A person's last name(s)\n- **given**: A person's first and middle name(s)\n- **dropping particle**: particle(s) before the person's last name that are ignored if only the last name is shown\n- **non-dropping particle**: particles(s) before the person's last name that are *not* ignored if only the last name is shown\n- **suffix**: abbreviations after a person's last name\n\nFeatures handling of a wide range of formats: beyond just \"first last\" and \"last, first\", particles and suffixes are parsed from any reasonably correct position a user may place them.\n\n### Example:\n#### `name_example.dart`\n\n```dart\nimport 'package:best_effort_parser/name.dart';\n\nvoid main(List\u003cString\u003e arguments) =\u003e\n    print(NameParser.basic().parse(arguments.join(' ')).diagnosticString());\n```\n\nDemo:\n```bash\nλ  dart name_example.dart 'Jack Warren'\n[Given]: Jack [Family]: Warren\n\nλ  dart name_example.dart 'La Fontaine, Jean de'\n[Given]: Jean [Dropping Particle]: de [Non-dropping Particle]: La [Family]: Fontaine\n\nλ  dart name_example.dart 'Gates, Bill III'\n[Given]: Bill [Family]: Gates [Suffix]: III\n\nλ  dart name_example.dart 'Willem de Kooning'\n[Given]: Willem [Dropping Particle]: de [Family]: Kooning\n```\n\nCustomization of both parsing and output type is available.\n\n## Date Parsing\n#### `best_effort_parser/date.dart`\n\nProvides parsing of dates by collecting years, months, and days and assembling those parts into a list. Each entry in that output list represents a singular date, so a string containing multiple dates or a range will have multiple entries in its output.\n\n### Example:\n#### `date_example.dart`\n\n```dart\nimport 'package:best_effort_parser/date.dart';\n\nvoid main(List\u003cString\u003e arguments) =\u003e \n    DateParser.basic().parse(arguments.join(' ')).forEach(print);\n```\n\nDemo:\n```bash\nλ  dart date_example.dart 'January 1st, 2019'\n[Day]: 1 [Month]: 1 [Year]: 2019\n\nλ  dart date_example.dart '1/2/3'\n[Day]: 2 [Month]: 1 [Year]: 2003\n\nλ  dart date_example.dart '10/10/90 - 3/13/18'\n[Day]: 10 [Month]: 10 [Year]: 1990\n[Day]: 13 [Month]: 3 [Year]: 2018\n\nλ  dart date_example.dart 'Spring-Summer 2010'\n[Month]: 3 [Year]: 2010\n[Month]: 6 [Year]: 2010\n\nλ  dart date_example.dart '1999-6-15'\n[Day]: 15 [Month]: 6 [Year]: 1999\n\nλ  dart date_example.dart '40 20 10'\n[Day]: 20 [Month]: 10 [Year]: 1940\n```\n\nAs seen in the last example especially, the parser will do its best even in the face of _very_ odd input. In that example, 40 can't be a day or month, and 20 can't be a month, so a year-day-month format will be used for that date only.\n\nCustomization of both parsing and output type is available.\n\n## Feature requests and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[author site]: https://jackwarren.info\n[tracker]: https://github.com/jack-r-warren/best_effort_parser/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-r-warren%2Fbest_effort_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack-r-warren%2Fbest_effort_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-r-warren%2Fbest_effort_parser/lists"}