{"id":20964547,"url":"https://github.com/hyparam/hylang","last_synced_at":"2026-02-13T20:03:17.599Z","repository":{"id":250027799,"uuid":"817906534","full_name":"hyparam/hylang","owner":"hyparam","description":"A stupidly small and fast programming language detection model","archived":false,"fork":false,"pushed_at":"2024-08-20T15:49:00.000Z","size":1462,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-17T21:11:27.324Z","etag":null,"topics":["detection","language","language-detection","language-detector"],"latest_commit_sha":null,"homepage":"","language":"Python","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/hyparam.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-20T17:29:24.000Z","updated_at":"2024-11-25T22:03:54.000Z","dependencies_parsed_at":"2024-08-03T03:48:15.072Z","dependency_job_id":"8fd9be61-d88c-49d1-881c-e1bb079fdd90","html_url":"https://github.com/hyparam/hylang","commit_stats":null,"previous_names":["hyparam/hylang"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hyparam/hylang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyparam%2Fhylang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyparam%2Fhylang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyparam%2Fhylang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyparam%2Fhylang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyparam","download_url":"https://codeload.github.com/hyparam/hylang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyparam%2Fhylang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29416040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["detection","language","language-detection","language-detector"],"created_at":"2024-11-19T02:56:01.617Z","updated_at":"2026-02-13T20:03:17.561Z","avatar_url":"https://github.com/hyparam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HyLang\n\n![HyLang](hylang.jpg)\n\n[![workflow status](https://github.com/hyparam/hylang/actions/workflows/ci.yml/badge.svg)](https://github.com/hyparam/hylang/actions)\n[![mit license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![dependencies](https://img.shields.io/badge/Dependencies-0-blueviolet)](https://www.npmjs.com/package/hylang?activeTab=dependencies)\n![coverage](https://img.shields.io/badge/Coverage-100-darkred)\n\nA stupidly small and fast programming language detection model.\n\n## Usage\n\n```js\nimport { detectLanguage } from 'hylang'\n\nconst input = `\n  function square(x) {\n    return x * x\n  }\n`\nconsole.log(`Predicted language: ${detectLanguage(input)}`)\n```\n\n## Accuracy\n\nHylang eval is sampled from the starcoderdata dataset.\n\nHylang is 30.4kb packed and achieves 74.5% accuracy.\n\n## Implementation\n\nThe language detector is implemented as a bag of words model trained on the starcoderdata dataset.\n\nTraining is done in python with torch. Model weights are exported to `params.json` so they can be used in javascript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyparam%2Fhylang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyparam%2Fhylang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyparam%2Fhylang/lists"}