{"id":15650432,"url":"https://github.com/macournoyer/utterance_parser","last_synced_at":"2025-04-30T17:03:28.244Z","repository":{"id":59158888,"uuid":"58073205","full_name":"macournoyer/utterance_parser","owner":"macournoyer","description":"Extract intent and entities from natural language utterances","archived":false,"fork":false,"pushed_at":"2018-01-04T08:09:40.000Z","size":10,"stargazers_count":36,"open_issues_count":2,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-30T17:03:06.270Z","etag":null,"topics":["extracts-intent","nlp","slot-filling"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/macournoyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-04T18:05:40.000Z","updated_at":"2022-06-17T22:52:15.000Z","dependencies_parsed_at":"2022-09-13T17:50:51.213Z","dependency_job_id":null,"html_url":"https://github.com/macournoyer/utterance_parser","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/macournoyer%2Futterance_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Futterance_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Futterance_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macournoyer%2Futterance_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macournoyer","download_url":"https://codeload.github.com/macournoyer/utterance_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251748934,"owners_count":21637414,"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":["extracts-intent","nlp","slot-filling"],"created_at":"2024-10-03T12:34:36.913Z","updated_at":"2025-04-30T17:03:28.199Z","avatar_url":"https://github.com/macournoyer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UtteranceParser\n\nA trainable natural language parser that extracts intent and entities from utterances.\n\nIt uses a [Naive Bayes classifier](https://en.wikipedia.org/wiki/Naive_Bayes_classifier) to determine intent and [Conditional random fields](https://en.wikipedia.org/wiki/Conditional_random_field) to extract entities.\n\nFor example, it can turn this:\n\n\u003e Remind me to pick up the kids in two hours\n\ninto ...\n\n```ruby\n[\n  # intent\n  \"reminder\",\n  # entities\n  {task: \"pick up the kids\", time: \"in two hours\"}\n]\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'utterance_parser'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install utterance_parser\n\n## Usage\n\n```ruby\nparser = UtteranceParser.new\n\nparser.train(\n  # Utterance =\u003e intent\n  \"Hi\" =\u003e \"greeting\",\n  \"Hello\" =\u003e \"greeting\",\n\n  \"What time is it\" =\u003e \"time\",\n  \"What's the weather outside\" =\u003e \"weather\",\n\n  # Mark entities using XML tags\n  \"Remind me to \u003ctask\u003eget stuff done\u003c/task\u003e \u003ctime\u003etomorrow\u003c/time\u003e\" =\u003e \"reminder\",\n  \"Remind me to \u003ctask\u003ebuy milk\u003c/task\u003e \u003ctime\u003ein one hour\u003c/time\u003e\" =\u003e \"reminder\",\n  \"Remind me to \u003ctask\u003epick up the kids\u003c/task\u003e \u003ctime\u003ein two hours\u003c/time\u003e\" =\u003e \"reminder\",\n\n  \"Play some \u003cplaylist\u003ejazz\u003c/playlist\u003e\" =\u003e \"play\",\n  \"Play some \u003cplaylist\u003eblues\u003c/playlist\u003e\" =\u003e \"play\",\n  \"Play some \u003cplaylist\u003erap\u003c/playlist\u003e\" =\u003e \"play\"\n)\n\nparser.parse \"Hello there!\"\n# =\u003e [\"greeting\", {}]\n\nparser.parse \"Play some rock\"\n# =\u003e [\"play\", {playlist: \"rock\"}]\n\nparser.parse \"Remind me to buy stuff in three hours\"\n# =\u003e [\"reminder\", {task: \"buy stuff\", time: \"in three hours\"}]\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/macournoyer/utterance_parser/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacournoyer%2Futterance_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacournoyer%2Futterance_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacournoyer%2Futterance_parser/lists"}