{"id":18829104,"url":"https://github.com/amay077/luistrainer","last_synced_at":"2026-05-18T19:36:10.651Z","repository":{"id":138393309,"uuid":"115403534","full_name":"amay077/LuisTrainer","owner":"amay077","description":"LUIS の examples - Add label REST API を CSV から投げまくるコマンドラインツール","archived":false,"fork":false,"pushed_at":"2017-12-26T10:34:57.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T23:33:09.738Z","etag":null,"topics":["cognitive-services","dotnet","luis","microsoft"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amay077.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2017-12-26T08:41:17.000Z","updated_at":"2017-12-26T10:36:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8c77558-3ef9-4d8d-8538-ff1d7952fbe9","html_url":"https://github.com/amay077/LuisTrainer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amay077/LuisTrainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amay077%2FLuisTrainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amay077%2FLuisTrainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amay077%2FLuisTrainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amay077%2FLuisTrainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amay077","download_url":"https://codeload.github.com/amay077/LuisTrainer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amay077%2FLuisTrainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273587665,"owners_count":25132849,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":["cognitive-services","dotnet","luis","microsoft"],"created_at":"2024-11-08T01:40:04.499Z","updated_at":"2026-05-18T19:36:05.617Z","avatar_url":"https://github.com/amay077.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"LuisTrainer\n----\n\n## これはなに？\n\nMicrosoft Cognitive services のひとつ LUIS(Language Understanding Intelligent Service) - [luis.ai](https://www.luis.ai/) に、「サンプル文章」をバッチで連続登録するツールです。\n\n## どこでうごかせる？\n\n.NET Standard 2.0 で作ったコマンドラインアプリなので、\n\n* macOS (with .NET Core)\n* Windows (with .NET Framework)\n* Linux (with .NET Core)\n\nで動きます（後者２つは試してないけど）。\n\n## 動かし方\n\nmacOS と Linux の場合は [.NET Core](https://dotnet.github.io/) をインストールして ``dotnet`` コマンドが使えるようにしてくださいね。\n\n次に [Releases](https://github.com/amay077/LuisTrainer/releases) に添付されている ``LuisTrainer_vX.X.zip`` をダウンロードして展開してください。\n\n次のような感じでプログラム ``LuisTrainer.dll`` を実行します。渡すパラメータは 4つ です。\n\n```\ndotnet LuisTrainer.dll \"path/to/examples.csv\" appid=LUISのAppID appkey=LUISのAppKey versionid=LUISAppのバージョン\n\n実際の例:\ndotnet LuisTrainer.dll \"./csv/examples.csv\" appid=516xxxxx-xxxx-xxxx-xxxx-xzxxxxxxxxxxx appkey=5e38xxxxxxxxxxxxxxxxxxxxxxxxxxxx versionid=0.1\n```\n\n1. ``\"path/to/examples.csv\"`` - 学習させるサンプルデータが格納されたCSV。後述します。\n2. ``appid=LUISのAppID`` - luis.ai でアプリケーションを作成すると割り振られるAppIDです。\n3. ``appkey=LUISのAppKey`` - luis.ai でアプリケーションを作成すると割り振られるAppKeyです。\n4. ``versionid=LUISAppのバージョン`` - luis.ai アプリケーションのバージョンです。 ``０．１`` とか。\n\n## サンプルデータCSV仕様\n\n次のような様式のCSVファイルを記述してください。文字コードは ``UTF-8`` 限定です。\n\n|Text|Intent|Status|Update_ts|(EntityName1)|(EntityName2)|(EntityName…)|\n|:---|:---|:---|:---|:---|:---|:---|\n|学習させる文章|LUISのIntent名|0以外だと処理済としてスキップします|このツールが処理した日時|EntityName1として学習させたい単語|EntityName2として学習させたい単語|EntityNameとして学習させたい単語…|\n\n``Text``, ``Intent``, ``Status``, ``Update_ts`` は必須列です。\nそれ以外の列は、LUISのEntity名に対応させた列を任意の数定義できます。\n\n例えば、 LUIS で「今日の東京の天気を知りたい」という文章から GetWeather という Intent を得たいとき、 luis.ai には、次のような Intent と Entity を定義することになると思います。\n\n* Intent - GetWeather : 天気を得るという「意図」\n* Entity - Day : いつ？（例: 今日、明日、12月23日）\n* Entity - City : 場所や地名（例: 東京、名古屋、ニューヨーク）\n\nこのような Intent と Entity 群の定義であるとき、サンプルデータCSV は次のように記述します。\n\n|Text|Intent|Status|Update_ts|Day|City|\n|:---|:---|:---|:---|:---|:---|\n|今日の東京の天気を知りたい|GetWeather|0||今日|東京|\n|明日の大阪の天気は？|GetWeather|0||明日|大阪|\n|ニューヨークの5月12日の天気はどうですか？|GetWeather|0||5月12日|ニューヨーク|\n\nこの CSV を渡してプログラムを実行すると、 luis.ai の [REST API - examples - Add label](https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c08) を実行して、それぞれの例文と Entity をラベル付けします。\n\n学習自体やAPIのPublishは行わないので、Train コマンドは luis.ai の Web画面や REST API から行ってください。\n\nプログラムの処理が終わると、結果を ``path/to/examples.csv.out`` に出力します。出力されたファイルには、``Status`` が ``1`` に、 ``Update_ts`` には処理日時が格納されます。\n\n## なんでつくった？\n\nLUIS の Web画面 − Review endpoint utterances で、未学習の例文を評価して追加できるんですけど、この画面では単語の区切りが自動になってしまって、任意の単語を指定できないのです。例えば「東京都の明日の天気を知りたい」という文章で「東京都」を Entity として登録したいのに画面では「東京」としか登録できません。なんだか REST API を叩くしか方法が見つからなかったので作りました。\n\nend of contents\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famay077%2Fluistrainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famay077%2Fluistrainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famay077%2Fluistrainer/lists"}