{"id":37182773,"url":"https://github.com/astutic/brat-standoff-to-json","last_synced_at":"2026-01-14T21:04:44.965Z","repository":{"id":64303885,"uuid":"288653506","full_name":"astutic/brat-standoff-to-json","owner":"astutic","description":"Converts brat standoff format to JSONL format","archived":false,"fork":false,"pushed_at":"2022-01-29T10:43:33.000Z","size":310,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-24T15:23:43.054Z","etag":null,"topics":["annotation-tool","brat","data-annotation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/astutic.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":"2020-08-19T06:35:34.000Z","updated_at":"2024-03-16T23:23:43.000Z","dependencies_parsed_at":"2023-01-15T10:01:00.024Z","dependency_job_id":null,"html_url":"https://github.com/astutic/brat-standoff-to-json","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/astutic/brat-standoff-to-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astutic%2Fbrat-standoff-to-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astutic%2Fbrat-standoff-to-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astutic%2Fbrat-standoff-to-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astutic%2Fbrat-standoff-to-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astutic","download_url":"https://codeload.github.com/astutic/brat-standoff-to-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astutic%2Fbrat-standoff-to-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["annotation-tool","brat","data-annotation"],"created_at":"2026-01-14T21:04:43.995Z","updated_at":"2026-01-14T21:04:44.942Z","avatar_url":"https://github.com/astutic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Brat-standoff to JSON converter\n\nBrat-standoff to JSON converter is a cli tool that converts the given brat standoff to JSON format\n\n## Using brat Standoff Converter\n\n```bash\n git clone https://github.com/astutic/brat-standoff-to-json.git\n```\n\nOR\n\nDownload a release from [here](https://github.com/astutic/brat-standoff-to-json/releases)\n\nand rename the file as brat-standoff-to-json\n\n## Examples\n\n### Converts and Prints JSONL (in acharya format) for brat files in the specified directory\n\n```bash\ngo run main.go -p \"./path/to/the/collection\"\n```\n\nOR\n\n```bash\nbrat-standoff-to-json -p \"./path/to/the/collection\"\n```\n\n##### example\n\n```bash\ngo run main.go -p \"./testData/news\"\n```\n\nOR\n\n```bash\nbrat-standoff-to-json  -p \"./testData/news\"\n```\n\n### Save to an output file\n\n```bash\ngo run main.go -p \"./path/to/the/collection\" --output \"path/output-file-name\"\n```\n\nOR\n\n```bash\nbrat-standoff-to-json  -p \"./path/to/the/collection\" --output \"path/output-file-name\"\n```\n\n##### example\n\n\u003e The command below will generate an output file named **acharyaFormat.jsonl** in the current directory\n\n```bash\ngo run main.go -p \"./testData/news\" --output \"./acharyaFormat.jsonl\"\n```\n\nOR\n\n```bash\nbrat-standoff-to-json  -p \"./testData/news\" --output \"./acharyaFormat.jsonl\"\n```\n\n### Converting specific files\n\n! **NOTE** the order of the .ann files an .txt files should be the same  \n`go run main.go --ann \"file1.ann,file2.ann\" --txt \"file1.txt,file2.txt\" --conf \"file.conf\"`\n\n##### example\n\n```bash\ngo run main.go --ann \"path/to/first.ann,path/to/second.ann\" --txt \"path/to/first.txt,path/to/second.txt\" --conf \"path/to/annotation.conf\"\n```\n\nOR\n\n```bash\nbrat-standoff-to-json  --ann \"path/to/first.ann,path/to/second.ann\" --txt \"path/to/first.txt,path/to/second.txt\" --conf \"path/to/annotation.conf\"\n```\n\n## Commands\n\n| Command    | Short hand | Type   | Description                                                               | Default value |\n| ---------- | ---------- | ------ | ------------------------------------------------------------------------- | ------------- |\n| folderPath | p          | string | Path to the folder containing the brat standoff collection                |\n| ann        | a          | string | Comma sepeartad locations of the annotation files (.ann) in correct order |\n| txt        | t          | string | Comma sepeartad locations of the text files (.txt) in correct order       |\n| conf       | c          | string | Location of the annotation configuration file (annotation.conf)           |\n| output     | o          | string | Name of the output file to be generated                                   |\n| force      | f          | bool   | If you wish to overwrite the generated file then set force to true        | false         |\n| version    | v          | bool   | Prints the version number                                                 | false         |\n\n## Original data displayed in brat\n\n![Original data displayed in brat](./docs/images/brat_ui.png \"Brat UI\")\n\n## Data from Brat converted to and uploaded to [Acharya](https://acharya.astutic.com)\n\n![Brat data displayed in Acharya](./docs/images/brat_to_Acharya_ui.png \"Acharya UI\")\n\n## Note\n\n**[ Windows PowerShell ]**\nIf you want to use the Brat → JSONL converter and If Brat Standoff **contains non English characters** Then its advised to set the following in PowerShell first\n\n```powershell\n$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding\n```\n\n#### Features that are currently unsupported:\n\n- [Discontinuous text-bound annotations](https://brat.nlplab.org/standoff.html \"https://brat.nlplab.org/standoff.html\")\n- [Advanced entity configuration](https://brat.nlplab.org/configuration.html#tool-configuration \"https://brat.nlplab.org/configuration.html#tool-configuration\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastutic%2Fbrat-standoff-to-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastutic%2Fbrat-standoff-to-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastutic%2Fbrat-standoff-to-json/lists"}