{"id":24746003,"url":"https://github.com/chausner/arfftools","last_synced_at":"2025-10-10T14:32:27.915Z","repository":{"id":111425945,"uuid":"64885636","full_name":"chausner/ArffTools","owner":"chausner","description":"Library for reading and writing Weka attribute-relation file format (ARFF) files","archived":false,"fork":false,"pushed_at":"2022-02-06T11:41:25.000Z","size":44,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-01T04:34:16.592Z","etag":null,"topics":["arff","data-mining","machine-learning","weka"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/chausner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-08-03T23:13:42.000Z","updated_at":"2023-12-12T20:07:56.000Z","dependencies_parsed_at":"2023-06-09T08:00:34.430Z","dependency_job_id":null,"html_url":"https://github.com/chausner/ArffTools","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/chausner/ArffTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chausner%2FArffTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chausner%2FArffTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chausner%2FArffTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chausner%2FArffTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chausner","download_url":"https://codeload.github.com/chausner/ArffTools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chausner%2FArffTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004176,"owners_count":26083688,"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-10T02:00:06.843Z","response_time":62,"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":["arff","data-mining","machine-learning","weka"],"created_at":"2025-01-28T03:36:41.920Z","updated_at":"2025-10-10T14:32:27.910Z","avatar_url":"https://github.com/chausner.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArffTools\n.NET library for reading and writing Weka attribute-relation file format (ARFF) files\n\n[![NuGet](https://img.shields.io/nuget/v/ArffTools.svg)](https://www.nuget.org/packages/ArffTools/)\n[![license](https://img.shields.io/github/license/chausner/ArffTools.svg)](https://github.com/chausner/ArffTools/blob/master/LICENSE.md)\n\nFeatures\n--------\n* Read and write ARFF files\n* Supports relational attributes\n* Supports sparse instances\n* Supports instance weights\n* Proper quoting and escaping of special characters\n\nUsage\n-----\nReading ARFF files:\n```csharp\nusing (ArffReader arffReader = new ArffReader(\"glass.arff\"))\n{\n    ArffHeader header = arffReader.ReadHeader();    \n    object[] instance;    \n    while ((instance = arffReader.ReadInstance()) != null)\n    {\n        // process instance\n    }    \n}\n```\nReading all instances at a time:\n```csharp\nobject[][] instances = arffReader.ReadAllInstances();\n```\nWriting ARFF files:\n```csharp\nusing (ArffWriter arffWriter = new ArffWriter(\"iris.arff\"))\n{\n    arffWriter.WriteRelationName(\"iris\");\n    arffWriter.WriteAttribute(new ArffAttribute(\"sepallength\", ArffAttributeType.Numeric));\n    arffWriter.WriteAttribute(new ArffAttribute(\"sepalwidth\", ArffAttributeType.Numeric));\n    arffWriter.WriteAttribute(new ArffAttribute(\"petallength\", ArffAttributeType.Numeric));\n    arffWriter.WriteAttribute(new ArffAttribute(\"petalwidth\", ArffAttributeType.Numeric));\n    arffWriter.WriteAttribute(new ArffAttribute(\"class\", ArffAttributeType.Nominal(\"Iris-setosa\", \"Iris-versicolor\", \"Iris-virginica\")));\n    arffWriter.WriteInstance(new object[] { 5.1, 3.5, 1.4, 0.2, 0 });\n}\n```\nInstances are represented as ```object[]``` whose elements correspond to the attribute values. ARFF attribute types are mapped to .NET types as follows:\n\n| ARFF attribute type    | .NET type        |\n|------------------------|------------------|\n| numeric, integer, real | ```double```     |\n| nominal                | ```int```        |\n| string                 | ```string```     |\n| date                   | ```DateTime```   |\n| relational             | ```object[][]``` |\n\nMissing values are represented as ```null```. Sparse instances are represented as normal instances in memory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchausner%2Farfftools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchausner%2Farfftools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchausner%2Farfftools/lists"}