{"id":20694808,"url":"https://github.com/touhi99/parsing","last_synced_at":"2025-08-21T20:23:03.340Z","repository":{"id":209350002,"uuid":"115353879","full_name":"touhi99/Parsing","owner":"touhi99","description":"Parsing Course Project - A CYK implementation with CNF","archived":false,"fork":false,"pushed_at":"2018-06-22T10:27:28.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T02:32:53.906Z","etag":null,"topics":["cky","cnf","cyk-algorithm","nltk","parsing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/touhi99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-12-25T17:33:34.000Z","updated_at":"2019-08-27T07:04:21.000Z","dependencies_parsed_at":"2023-11-26T21:28:21.325Z","dependency_job_id":"ffe046fc-7a3e-4803-adfd-2292e7b078d3","html_url":"https://github.com/touhi99/Parsing","commit_stats":null,"previous_names":["touhi99/parsing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/touhi99/Parsing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touhi99%2FParsing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touhi99%2FParsing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touhi99%2FParsing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touhi99%2FParsing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/touhi99","download_url":"https://codeload.github.com/touhi99/Parsing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/touhi99%2FParsing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271537940,"owners_count":24777408,"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-08-21T02:00:08.990Z","response_time":74,"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":["cky","cnf","cyk-algorithm","nltk","parsing"],"created_at":"2024-11-17T00:06:45.025Z","updated_at":"2025-08-21T20:23:03.283Z","avatar_url":"https://github.com/touhi99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"CYK Parsing Implementation\r\n\r\n\r\nProgramming Language- Python 3.6.1\r\n\r\n\r\nOverview:\r\n\r\n\r\nCKY.py\r\n* Class ConverCNF()\r\n   * startSymbolAdd() - function adds a new start symbol if existing symbol already on the right hand side of the rules\r\n   * eliminateEpsilon() - if rule contains any ‘ε’ in the right hand side, it removes and restructure the grammar accordingly\r\n   * eliminateVariableUnit() - This function removes single production non-terminal from the right hand side\r\n   * moveTerminalToUnits() - this function add unit non-terminal for terminals\r\n   * replaceLongProd() - replace any non-terminal production more than 2 are adjusted in the form of A -\u003e B C\r\n* Class CYK()\r\n   * readGrammar() - read input grammar, add the rules as dictionary, where key goes the left-hand side rule and value contains right hand-side rules in a list\r\n   * readString() - read input string from the text files\r\n   * readOutput() - print the modified grammar \u0026 CKY table\r\n   * parser() - CKY parser algorithm\r\n\r\n\r\n\r\n\r\nDependencies:\r\n\r\n\r\nre - should be included with python by default\r\nNLTK-\r\n* Pip3 install nltk\r\n\r\n\r\nUsage:\r\n\r\n\r\n* On terminal where the files exist, write command\n\tPython3 CYK.py \u003cgrammar_file_.txt\u003e \u003cstring_file_.txt\u003e\r\n* Sample grammar file as included\r\n   * First line contains the start symbol\r\n   * Epsilon defines with ‘ε’ symbol\r\n   * Terminals are separated by single-quote (‘’) e.g. ‘John’, ‘man’\r\n   * Multiple terminals and non-terminals are separated by whitespace\r\n* Sample string file as included- each line contains separate string","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouhi99%2Fparsing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftouhi99%2Fparsing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftouhi99%2Fparsing/lists"}