{"id":13821745,"url":"https://github.com/mlehman/nlp-intent-toolkit","last_synced_at":"2025-10-29T21:28:40.984Z","repository":{"id":14385811,"uuid":"17096107","full_name":"mlehman/nlp-intent-toolkit","owner":"mlehman","description":"Intent recognition with OpenNLP","archived":false,"fork":false,"pushed_at":"2018-06-24T19:01:45.000Z","size":443,"stargazers_count":153,"open_issues_count":1,"forks_count":51,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-08-05T08:09:47.936Z","etag":null,"topics":["intent-classification","opennlp"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlehman.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-02-22T22:17:47.000Z","updated_at":"2024-07-19T01:57:33.000Z","dependencies_parsed_at":"2022-07-28T19:39:58.797Z","dependency_job_id":null,"html_url":"https://github.com/mlehman/nlp-intent-toolkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlehman%2Fnlp-intent-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlehman%2Fnlp-intent-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlehman%2Fnlp-intent-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlehman%2Fnlp-intent-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlehman","download_url":"https://codeload.github.com/mlehman/nlp-intent-toolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225436250,"owners_count":17474110,"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":["intent-classification","opennlp"],"created_at":"2024-08-04T08:01:27.245Z","updated_at":"2025-10-29T21:28:40.842Z","avatar_url":"https://github.com/mlehman.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"nlp-intent-toolkit\n==================\n\nRecognizing intents with slots using OpenNLP for applications (such as bots using chat, IM, speech-to-text) to convert natural language into structured commands with arguments.\n\n```\n\u003e What's the current stock price of General Motors?\n{ action: 'stock-price', args: { company: 'General Motors' } }\n```\n\nThe example system uses [document categorization](https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.doccat) to determine the intent (command) and [entity recognition](https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.namefind) to determine the slots (arguments) of the natural language text input. \n\nThe training system uses a directory containing separate files for each possible action, in this case the actions in a fictitious weather application:\n\n```\n- example/weather/train\n  - current-weather.txt - get the current weather\n  - hourly-forecast.txt - get the hourly forcast\n  - five-day-forecast.txt - get a five day forecast\n```\n\nEach training file contains one example per line with any possible arguments surrounded by mark up to indicate the name of the parameter:\n\n```\nfile: five-day-forecast.txt\n...\nhow does the weather look for this Thursday in \u003cSTART:city\u003e Boston \u003cEND\u003e ?\nis it going to snow this week in \u003cSTART:city\u003e Chicago \u003cEND\u003e\nshow me the forecast for \u003cSTART:city\u003e Denver \u003cEND\u003e\n...\n\n```\n\n## Running the Example\n\nThe training systems is run passing in the training file directory and any parameter name used in the training files.\n\n```\n$ mvn clean compile exec:java  -Dexec.args=\"example/weather/train city\"\n...\nTraining complete. Ready.\n\n\u003eshow me the weather for chicago\n{ action: 'current-weather', args: { city: 'chicago' } }\n\n\u003ewill it rain tonight?\n{ action: 'hourly-forecast', args: { } }\n\n\u003ehow does it look in seattle\n{ action: 'hourly-forecast', args: { city: 'seattle' } }\n\n\u003ewhat are the conditions in new york?\n{ action: 'current-weather', args: { city: 'new york' } }\n\n\u003ehow does this weekend look in boston\n{ action: 'five-day-forecast', args: { city: 'boston' } }\n\n\u003egive me the five day forecast\n{ action: 'five-day-forecast', args: { } }\n```\n\n## Copyright and License\n\nThe source code provided by this repository is free and unencumbered to be copied or modified for any purpose, commercial or non-commercial.\nThe full license text is provided in the LICENSE file accompanying this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlehman%2Fnlp-intent-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlehman%2Fnlp-intent-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlehman%2Fnlp-intent-toolkit/lists"}