{"id":13482674,"url":"https://github.com/snipsco/snips-nlu-rs","last_synced_at":"2025-07-16T12:44:28.071Z","repository":{"id":69808862,"uuid":"122316141","full_name":"snipsco/snips-nlu-rs","owner":"snipsco","description":"Snips NLU rust implementation","archived":false,"fork":false,"pushed_at":"2022-12-26T20:39:00.000Z","size":25012,"stargazers_count":341,"open_issues_count":6,"forks_count":56,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-10-30T16:41:09.242Z","etag":null,"topics":["inference","nlu","rust"],"latest_commit_sha":null,"homepage":"https://snips.ai","language":"Rust","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/snipsco.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-02-21T09:29:02.000Z","updated_at":"2024-10-16T01:52:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fd18e45-1d44-4877-ac13-85baf5c41470","html_url":"https://github.com/snipsco/snips-nlu-rs","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2Fsnips-nlu-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2Fsnips-nlu-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2Fsnips-nlu-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2Fsnips-nlu-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snipsco","download_url":"https://codeload.github.com/snipsco/snips-nlu-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245854628,"owners_count":20683393,"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":["inference","nlu","rust"],"created_at":"2024-07-31T17:01:04.390Z","updated_at":"2025-03-27T13:32:35.830Z","avatar_url":"https://github.com/snipsco.png","language":"Rust","funding_links":[],"categories":["Rust","函式庫"],"sub_categories":["書籍"],"readme":"Snips NLU Rust\n==============\n\n.. image:: https://travis-ci.org/snipsco/snips-nlu-rs.svg?branch=master\n   :target: https://travis-ci.org/snipsco/snips-nlu-rs\n\n.. image:: https://ci.appveyor.com/api/projects/status/rsf27a9txeomic8o/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/snipsco/snips-nlu-rs\n\nInstallation\n------------\n\nAdd it to your ``Cargo.toml``:\n\n.. code-block:: toml\n\n   [dependencies]\n   snips-nlu-lib = { git = \"https://github.com/snipsco/snips-nlu-rs\", branch = \"master\" }\n\nAdd ``extern crate snips_nlu_lib`` to your crate root and you are good to go!\n\n\nIntent Parsing with Snips NLU\n-----------------------------\n\nThe purpose of the main crate of this repository, ``snips-nlu-lib``, is to perform an information\nextraction task called *intent parsing*.\n\nLet’s take an example to illustrate the main purpose of this lib, and consider the following sentence:\n\n.. code-block:: text\n\n   \"What will be the weather in paris at 9pm?\"\n\nProperly trained, the Snips NLU engine will be able to extract structured data such as:\n\n.. code-block:: json\n\n   {\n      \"intent\": {\n         \"intentName\": \"searchWeatherForecast\",\n         \"confidenceScore\": 0.95\n      },\n      \"slots\": [\n         {\n            \"value\": \"paris\",\n            \"entity\": \"locality\",\n            \"slotName\": \"forecast_locality\"\n         },\n         {\n            \"value\": {\n               \"kind\": \"InstantTime\",\n               \"value\": \"2018-02-08 20:00:00 +00:00\"\n            },\n            \"entity\": \"snips/datetime\",\n            \"slotName\": \"forecast_start_datetime\"\n         }\n      ]\n   }\n\n\nIn order to achieve such a result, the NLU engine needs to be fed with a trained model (json file).\nThis repository only contains the inference part, in order to produce trained models please check\nthe `Snips NLU python library \u003chttps://github.com/snipsco/snips-nlu\u003e`_.\n\n\nExample and API Usage\n---------------------\n\nThe `interactive parsing CLI \u003cexamples/interactive_parsing_cli.rs\u003e`_  is a good example\nof to how to use ``snips-nlu-rs``.\n\nHere is how you can run the CLI example:\n\n.. code-block:: bash\n\n   $ git clone https://github.com/snipsco/snips-nlu-rs\n   $ cd snips-nlu-rs\n   $ cargo run --example interactive_parsing_cli data/tests/models/nlu_engine\n\nHere we used a sample trained engine, which consists in two intents: ``MakeCoffee`` and ``MakeTea``.\nThus, it will be able to parse queries like ``\"Make me two cups of coffee please\"`` or ``\"I'd like a hot tea\"``.\n\nAs mentioned in the previous section, you can train your own nlu engine with the\n`Snips NLU python library \u003chttps://github.com/snipsco/snips-nlu\u003e`_.\n\n\nLicense\n-------\n\nLicensed under either of\n * Apache License, Version 2.0 (`LICENSE-APACHE \u003cLICENSE-APACHE\u003e`_ or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license (`LICENSE-MIT \u003cLICENSE-MIT\u003e`_) or http://opensource.org/licenses/MIT)\nat your option.\n\nContribution\n------------\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnipsco%2Fsnips-nlu-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnipsco%2Fsnips-nlu-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnipsco%2Fsnips-nlu-rs/lists"}