{"id":25171735,"url":"https://github.com/basemax/cfg2cnf","last_synced_at":"2025-07-25T22:34:50.088Z","repository":{"id":151535245,"uuid":"273696649","full_name":"BaseMax/CFG2CNF","owner":"BaseMax","description":"Python program to convert a Context Free Grammar to Chomsky Normal Form.","archived":false,"fork":false,"pushed_at":"2025-05-09T03:11:39.000Z","size":263,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-19T06:32:12.944Z","etag":null,"topics":["cfg","chomsky","cnf","context-free","context-free-grammar","context-free-grammars","context-free-language","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.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,"zenodo":null}},"created_at":"2020-06-20T11:40:38.000Z","updated_at":"2025-05-09T04:02:17.000Z","dependencies_parsed_at":"2023-07-10T14:00:22.967Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/CFG2CNF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaseMax/CFG2CNF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCFG2CNF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCFG2CNF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCFG2CNF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCFG2CNF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/CFG2CNF/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCFG2CNF/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267072997,"owners_count":24031495,"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-07-25T02:00:09.625Z","response_time":70,"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":["cfg","chomsky","cnf","context-free","context-free-grammar","context-free-grammars","context-free-language","python"],"created_at":"2025-02-09T09:21:46.160Z","updated_at":"2025-07-25T22:34:50.073Z","avatar_url":"https://github.com/BaseMax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CFG2CNF\n\nPython tool able to convert a Context Free Grammar in Chomsky Normal Form\n\n## Convert a Context Free Grammar to Chomsky Normal Form\n\nPython program to convert a Context Free Grammar to Chomsky Normal Form.\n\nI read 7 chapters of the book and the result of my study was writing this program.\n\n### References: Formal Languages and Automata\n\n![Context Free Grammar Book](book.jpg)\n\nAn Introduction to Formal Languages and Automata **by Peter Linz**\n\n#### What is Chomsky Normal Form\n\nChomsky Normal Form is a context-free grammar that has been put into a specific format. It was developed by Noam Chomsky in 1978 and is part of formal language theory.\n\nhttps://en.wikipedia.org/wiki/Chomsky_normal_form\n\n#### What is Context Free Grammar\n\nhttps://en.wikipedia.org/wiki/Context-free_grammar\n\n### Using\n\n```\ngit clone https://github.com/BaseMax/CFG2CNF\ncd CFG2CNF\npython main.py\n```\n\n### Input\n\n```\nS -\u003e SaB | aB\nB -\u003e bB | $\n*\n```\n\nThe above grammar is equivalent to the following grammar:\n\n```\nS -\u003e SaB\nS -\u003e aB\nB -\u003e bB\nB -\u003e $\n*\n```\n\n## Automata is useful?\n\nThe image below will change your think of the Automata:\n\n![Grammer sample image](grammer.jpg)\n\nSure, We are need this subject all of the day, Also programming languages!\n\nFollow this way by reading following **book**.\n\nIf you find a problem or bugs in program, please send **Issue** or **PR**, i'm a new member in this study...\n\n### Automata Videos\n\nLearn in some videos:\n\n- https://www.youtube.com/watch?v=5_tfVe7ED3g\n- https://stackoverflow.com/questions/3510109/how-can-i-determine-if-a-language-is-context-free-or-not#:~:text=First%2C%20you%20should%20attempt%20to,the%20language%20is%20context-free\n- https://www.youtube.com/watch?v=mlXYQ8ug2v4\u0026list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev\u0026index=77\n- https://www.youtube.com/watch?v=Mh-UQVmAxnw\u0026list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev\u0026index=78\n- https://www.youtube.com/watch?v=FNPSlnj3Vt0\u0026list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev\u0026index=79\n- https://www.youtube.com/watch?v=ZCbJan6CGNM\u0026list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev\u0026index=80\n- ...\n\nThanks to Khalilian for providing these videos and the great help he did.\n\nGood for start to check [Mini Calculator Interpreter](https://github.com/BaseMax/MiniCalculatorInterpreter) project.\n\n---------\n\n# Max Base\n\nMy nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. ([Max Base](https://maxbase.org/))\n\n## Asrez Team\n\nA team includes some programmer, developer, designer, researcher(s) especially Max Base.\n\n[Asrez Team](https://www.asrez.com/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcfg2cnf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fcfg2cnf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcfg2cnf/lists"}