{"id":34714572,"url":"https://github.com/srlearn/linter","last_synced_at":"2026-05-26T10:34:00.107Z","repository":{"id":48119774,"uuid":"390849947","full_name":"srlearn/linter","owner":"srlearn","description":"A grammar and linter for ILP datasets.","archived":false,"fork":false,"pushed_at":"2021-08-24T13:51:31.000Z","size":684,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-08T11:48:43.826Z","etag":null,"topics":["golang","inductive-logic-programming","parser","relational-learning"],"latest_commit_sha":null,"homepage":"https://srlearn.github.io/linter/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srlearn.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-07-29T21:03:05.000Z","updated_at":"2021-08-24T13:51:07.000Z","dependencies_parsed_at":"2022-08-12T19:00:55.764Z","dependency_job_id":null,"html_url":"https://github.com/srlearn/linter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/srlearn/linter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srlearn%2Flinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srlearn%2Flinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srlearn%2Flinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srlearn%2Flinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srlearn","download_url":"https://codeload.github.com/srlearn/linter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srlearn%2Flinter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33517113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: 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":["golang","inductive-logic-programming","parser","relational-learning"],"created_at":"2025-12-25T00:54:58.910Z","updated_at":"2026-05-26T10:34:00.102Z","avatar_url":"https://github.com/srlearn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inductive Logic Programming (ILP) Grammar and Linter\n\nThis defines a simple grammar (`cmd/ILPLang.g4`) and a command-line\ntool which can be used to lint for problems in dataset formatting.\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/srlearn/linter)](https://github.com/srlearn/linter/releases)\n[![GitHub](https://img.shields.io/github/license/srlearn/linter)](https://github.com/srlearn/linter/blob/main/LICENSE)\n[![Test Parsing](https://github.com/srlearn/linter/actions/workflows/package-test.yml/badge.svg)](https://github.com/srlearn/linter/actions/workflows/package-test.yml)\n\n## Overview\n\nThe target is a `linter` binary to help point out issues when tokenizing\nor parsing a dataset.\n\n**Example 1: No Errors**\n\nWhen the dataset is well-formatted, nothing is returned:\n\n```prolog\nsmokes(person1).\nfriends(person1,person2).\nfriends(person2,person1).\n```\n\n```console\n./linter -tokens -file=examples/pos/pos1.txt\n./linter -file=examples/pos/pos1.txt\n# (No output for either case)\n```\n\n**Example 2: Bad Data**\n\nWhen there is something in the data that cannot be recognized, problems\nare directed to stderr:\n\n```\nfriends(person1,person2).\nBad Data.\n```\n\n```console\n./linter -tokens -file=examples/neg/neg1.txt\nline 2:0 token recognition error at: 'B'\nline 2:3 token recognition error at: ' '\nline 2:4 token recognition error at: 'D'\n./linter -file=examples/neg/neg1.txt\nline 2:0 token recognition error at: 'B'\nline 2:3 token recognition error at: ' '\nline 2:4 token recognition error at: 'D'\nline 2:5 missing '(' at 'ata'\nline 2:8 mismatched input '.' expecting {')', ','}\n```\n\n**Example 3: Regression Examples**\n\nThe parser can also look for `regressionExample` values, used in regression\ndata sets.\n\nThe parser **will not** check whether an *entire* dataset is correct\n(`regressionExample` in labeled as positive, empty negative examples, and\nfacts). But this could be accomplished fairly easily elsewhere.\n\n```prolog\nregressionExample(medv(id100),33.2).\nregressionExample(medv(id101),27.5).\nregressionExample(medv(id10),18.9).\nregressionExample(medv(id102),26.5).\n```\n\n## Usage\n\n### Download a Binary\n\nPrecompiled binaries are listed on the\n[GitHub Releases page](https://github.com/srlearn/linter/releases),\nand the latest version can be downloaded with these links:\n\n| Platform | Link |\n| :--- | :--- |\n| Linux/amd64 | [Download](https://github.com/srlearn/linter/releases/latest/download/linter-linux-amd64) |\n| macOS/amd64 | [Download](https://github.com/srlearn/linter/releases/latest/download/linter-darwin-amd64) |\n| Windows/amd64 | [Download](https://github.com/srlearn/linter/releases/latest/download/linter-windows-amd64.exe) |\n\n### Build from Source\n\nBuilding requires a [Go compiler](https://golang.org/).\n\n```\ncd cmd\ngo build\n```\n\nA copy of the generated ANTLR parser files are committed to the repository,\nand rebuilding them requires an [ANTLR Parser Generator](https://www.antlr.org/).\n\n```\nmake clean\nmake linter\n```\n\n## Limitations\n\nThis grammar is extremely conservative currently: the only tokens\nallowed are lowercase characters, integers, and underscores.\n\n```prolog\na(x_1,y_1).\nb(x_1).\n```\n\n## Contributions\n\n- [Alexander L. Hayes](https://hayesall.com) - *Indiana University, Bloomington*\n\nSome ideas were taken from the `FOPC_MLN_ILP_Parser` developed by\nJude Shavlik and Trevor Walker (and possibly contributed to by many others\nwho went unnamed in the source code). There are a few versions of their\nTokenizers\n([StreamTokenizerJWS](https://github.com/hayesall/SRLBoost/blob/master/src/main/java/edu/wisc/cs/will/FOPC_MLN_ILP_Parser/StreamTokenizerJWS.java)\nand\n[StreamTokenizerTAW](https://github.com/hayesall/SRLBoost/blob/master/src/main/java/edu/wisc/cs/will/FOPC_MLN_ILP_Parser/StreamTokenizerTAW.java))\nand [Parser](https://github.com/hayesall/SRLBoost/blob/master/src/main/java/edu/wisc/cs/will/FOPC_MLN_ILP_Parser/FileParser.java)\ncurrently used in other projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrlearn%2Flinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrlearn%2Flinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrlearn%2Flinter/lists"}