{"id":19646138,"url":"https://github.com/yoctol/yoctol-nlu-node","last_synced_at":"2025-04-28T15:30:28.694Z","repository":{"id":21508286,"uuid":"93126157","full_name":"Yoctol/yoctol-nlu-node","owner":"Yoctol","description":"Yoctol Natural Language Understanding SDK for Node.js","archived":false,"fork":false,"pushed_at":"2023-01-03T18:43:32.000Z","size":1513,"stargazers_count":2,"open_issues_count":15,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-20T02:09:39.566Z","etag":null,"topics":["natural-language-understanding","nlu"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Yoctol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T04:12:34.000Z","updated_at":"2020-06-27T10:02:41.000Z","dependencies_parsed_at":"2023-01-14T00:00:21.648Z","dependency_job_id":null,"html_url":"https://github.com/Yoctol/yoctol-nlu-node","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fyoctol-nlu-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fyoctol-nlu-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fyoctol-nlu-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fyoctol-nlu-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yoctol","download_url":"https://codeload.github.com/Yoctol/yoctol-nlu-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338492,"owners_count":21573566,"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":["natural-language-understanding","nlu"],"created_at":"2024-11-11T14:37:03.621Z","updated_at":"2025-04-28T15:30:28.378Z","avatar_url":"https://github.com/Yoctol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yoctol-nlu-node\n\nYoctol Natural Language Understanding SDK for Node.js\n\n## Install\n\n```sh\n$ npm install ynlu\n```\n\nor using yarn:\n\n```sh\n$ yarn add ynlu\n```\n\n## Usage\n\n```js\nconst { Client } = require('ynlu');\n\n// put your token into client\nconst client = Client.connect(process.env.TOKEN);\n\nasync function train() {\n  const classifier = client.findClassifierById('...');\n  const result = await classifier.train();\n}\n\nasync function predict() {\n  const classifier = client.findClassifierById('...');\n  // the second parameter is Boolean, represent exactly match or not\n  // default to true\n  const result1 = await classifier.predict('買給我好不好'); // exactly match = true\n  const result2 = await classifier.predict('買給我好不好', true);\n  const result3 = await classifier.predict('買給我好嗎', false);\n}\n\nasync function extract() {\n  const extractor = client.findExtractorById('...');\n\n  const entities = await extractor.extract('買給我好不好');\n}\n```\n\n### Options\n\n#### Customize endpoint\n\n```js\nconst { Client } = require('ynlu');\n\nconst client = Client.connect(\n  process.env.TOKEN,\n  { endpoint: 'https://some.domain/graphql' }\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fyoctol-nlu-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoctol%2Fyoctol-nlu-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fyoctol-nlu-node/lists"}