{"id":15676540,"url":"https://github.com/shadowtime2000/easy-text-prediction","last_synced_at":"2025-10-04T00:21:12.306Z","repository":{"id":143808168,"uuid":"275543337","full_name":"shadowtime2000/easy-text-prediction","owner":"shadowtime2000","description":"An easy text prediction package that doesn't use a complicated neural network.","archived":false,"fork":false,"pushed_at":"2020-07-04T02:33:56.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T06:27:59.581Z","etag":null,"topics":["text-prediction"],"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/shadowtime2000.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":"2020-06-28T08:42:36.000Z","updated_at":"2021-12-20T02:56:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a9291f3-2a51-4222-81b5-fbf450d00bf5","html_url":"https://github.com/shadowtime2000/easy-text-prediction","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"91a583c1d358bbdd17e0a1d39a21af5173aa882e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shadowtime2000/easy-text-prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowtime2000%2Feasy-text-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowtime2000%2Feasy-text-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowtime2000%2Feasy-text-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowtime2000%2Feasy-text-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowtime2000","download_url":"https://codeload.github.com/shadowtime2000/easy-text-prediction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowtime2000%2Feasy-text-prediction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278246400,"owners_count":25955240,"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-10-03T02:00:06.070Z","response_time":53,"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":["text-prediction"],"created_at":"2024-10-03T16:03:07.121Z","updated_at":"2025-10-04T00:21:12.267Z","avatar_url":"https://github.com/shadowtime2000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easy-text-prediction\nAn easy text prediction package that doesn't use a complicated neural network.\n\n## Installation\nYou can install this package from npm with:\n```\nnpm install easy-text-prediction\n```\n\n## Usage\nYou can use this package like this:\n```javascript\nconst EasyTextPrediction = require(\"easy-text-prediction\");\n\nvar textPredictionTool = new EasyTextPrediction.WordPrediction();\n\ntextPredictionTool.train(\"Everyone is evil\", 1);\ntextPredictionTool.train(\"Everyone is good\", 9);\n\ntextPredictionTool.predict(\"is\"); // 10% chance -\u003e evil, 90% chance -\u003e good\n\ntextPredictionTool.saveToFile(\"textPredictionTool.json\"); // Save to file\n\ntextPredictionTool.loadFromFile(\"textPredictionTool.json\"); // Load from file\n\ntextPredictionTool.generate(\"is\", 50); // Generate 50 words that could follow that word. Warning! An error will occur if you do not have sufficient training data.\n```\nWarning! Your code will not work without specifying a weight.\n\nThere are two types of prediction tools:\n* Word Prediction predicts by words\n* Char Prediction predicts by characters\n\nYou can easily swap prediction tools by changing it from ```var textPredictionTool = new EasyTextPrediction.WordPrediction();``` to ```var textPredictionTool = new EasyTextPrediction.CharPrediction();```\n\n## TODO\n- [ ] Have text prediction tool remember all text up to that word\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowtime2000%2Feasy-text-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowtime2000%2Feasy-text-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowtime2000%2Feasy-text-prediction/lists"}