{"id":27483340,"url":"https://github.com/hectorpulido/human-language-toolkit-chatbot","last_synced_at":"2025-08-21T09:08:33.875Z","repository":{"id":62440329,"uuid":"376479937","full_name":"HectorPulido/human-language-toolkit-chatbot","owner":"HectorPulido","description":"nltk like chatbot in rust","archived":false,"fork":false,"pushed_at":"2021-06-13T08:51:49.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T02:52:01.863Z","etag":null,"topics":["ai","chatbot","hlp","human-language-toolkit","nlp"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/human_language_toolkit_chatbot","language":"Rust","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/HectorPulido.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":"2021-06-13T08:17:34.000Z","updated_at":"2022-01-18T05:35:27.000Z","dependencies_parsed_at":"2022-11-01T23:33:18.482Z","dependency_job_id":null,"html_url":"https://github.com/HectorPulido/human-language-toolkit-chatbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HectorPulido/human-language-toolkit-chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorPulido%2Fhuman-language-toolkit-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorPulido%2Fhuman-language-toolkit-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorPulido%2Fhuman-language-toolkit-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorPulido%2Fhuman-language-toolkit-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HectorPulido","download_url":"https://codeload.github.com/HectorPulido/human-language-toolkit-chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorPulido%2Fhuman-language-toolkit-chatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271455258,"owners_count":24762701,"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-08-21T02:00:08.990Z","response_time":74,"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":["ai","chatbot","hlp","human-language-toolkit","nlp"],"created_at":"2025-04-16T15:45:55.325Z","updated_at":"2025-08-21T09:08:33.849Z","avatar_url":"https://github.com/HectorPulido.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HLTK chatbot\nThis is a regex powered chatbot made in rust, it is based in NLTK https://github.com/nltk/nltk/blob/develop/nltk/chat/util.py\n\n## How to install\nadd to your Cargo.toml file \n```\n[dependencies]\n...\nhuman_language_toolkit_chatbot = \"0.1.0\"\n...\n```\nYou can find the updated version at https://crates.io/crates/human_language_toolkit_chatbot\n\n## How to use it \nYou can read from a json file.\n``` Rust\nuse human_language_toolkit_chatbot::{Chatbot, ChatbotError, CompiledChatbot};\n...\nlet suntsu = Chatbot::from_file(String::from(\"bots/suntsu.json\")).unwrap();\n...\n```\nAlso you can create the bot by programming.\n\n``` Rust\n...\nlet mut pairs: Vec\u003c(String, Vec\u003cString\u003e)\u003e = Vec::new();\npairs.push((\n    String::from(r\"Hello(.*)\"),\n    vec![\n        String::from(\"Hello... I'm glad you could drop by today.\"),\n        String::from(\"Hi there... how are you today?\"),\n        String::from(\"Hello, how are you feeling today?\"),\n    ],\n));\npairs.push((\n    String::from(r\"(.*) sorry (.*)\"),\n    vec![\n        String::from(\"There are many times when no apology is needed.\"),\n        String::from(\"What feelings do you have when you apologize?\"),\n    ],\n));\n...\nlet fallback = vec![String::from(\"Sorry I didn't understand\")];\nlet reflections = Chatbot::default_reflections();\n\nlet eliza = Chatbot {\n    pairs,\n    fallback,\n    reflections,\n};\n\n// You can save your model in a .json file\nmatch eliza.to_file(String::from(\"bots/eliza.json\")) {\n    Ok(_) =\u003e (),\n    Err(e) =\u003e println!(\"error at {}\", e),\n}\n\nlet eliza = eliza.compile();\n```\n\nYou can talk with the bot with the function `respond` but you can also use the `converse` function to make an infinity conversation.\n\n\n\u003cdiv align=\"center\"\u003e\n\u003ch3 align=\"center\"\u003eLet's connect 😋\u003c/h3\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.linkedin.com/in/hector-pulido-17547369/\" target=\"blank\"\u003e\n\u003cimg align=\"center\" width=\"30px\" alt=\"Hector's LinkedIn\" src=\"https://www.vectorlogo.zone/logos/linkedin/linkedin-icon.svg\"/\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp;\n\u003ca href=\"https://twitter.com/Hector_Pulido_\" target=\"blank\"\u003e\n\u003cimg align=\"center\" width=\"30px\" alt=\"Hector's Twitter\" src=\"https://www.vectorlogo.zone/logos/twitter/twitter-official.svg\"/\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp;\n\u003ca href=\"https://www.twitch.tv/hector_pulido_\" target=\"blank\"\u003e\n\u003cimg align=\"center\" width=\"30px\" alt=\"Hector's Twitch\" src=\"https://www.vectorlogo.zone/logos/twitch/twitch-icon.svg\"/\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp;\n\u003ca href=\"https://www.youtube.com/channel/UCS_iMeH0P0nsIDPvBaJckOw\" target=\"blank\"\u003e\n\u003cimg align=\"center\" width=\"30px\" alt=\"Hector's Youtube\" src=\"https://www.vectorlogo.zone/logos/youtube/youtube-icon.svg\"/\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp;\n\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorpulido%2Fhuman-language-toolkit-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhectorpulido%2Fhuman-language-toolkit-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorpulido%2Fhuman-language-toolkit-chatbot/lists"}