{"id":15374100,"url":"https://github.com/mrmike/cyk","last_synced_at":"2025-07-10T19:34:58.771Z","repository":{"id":17670068,"uuid":"20474801","full_name":"mrmike/cyk","owner":"mrmike","description":"Implementation of CYK - Cocke–Younger–Kasami algorithm.","archived":false,"fork":false,"pushed_at":"2014-06-04T08:10:35.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T04:17:01.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/mrmike.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}},"created_at":"2014-06-04T07:50:43.000Z","updated_at":"2014-06-04T08:10:36.000Z","dependencies_parsed_at":"2022-07-13T04:31:28.103Z","dependency_job_id":null,"html_url":"https://github.com/mrmike/cyk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrmike/cyk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2Fcyk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2Fcyk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2Fcyk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2Fcyk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrmike","download_url":"https://codeload.github.com/mrmike/cyk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrmike%2Fcyk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264640004,"owners_count":23642323,"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","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":[],"created_at":"2024-10-01T13:57:16.122Z","updated_at":"2025-07-10T19:34:58.749Z","avatar_url":"https://github.com/mrmike.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"CYK Algorithm\n----\nProject goal was to implement Cocke–Younger–Kasami algorithm. For more info take a look at http://en.wikipedia.org/wiki/CYK_algorithm.\n\nInstallation\n---\nIn project main folder run following command\n```\n$ bundle install\n```\nand that's all.\n\nGrammar and lexicon\n----\n\nBefore first usage add your grammar rules to **app/data/grammar.txt** file, e.g.\n```\nS -\u003e NP VP\nVP -\u003e VP PP\nVP -\u003e V NP\nPP -\u003e P NP\nNP -\u003e DET N\n```\n\nYou need to add word for your lexicon as well, to do that edit **app/data/lexicon.txt** file, e.g.\n```\nNP -\u003e she\nV -\u003e eats\nP -\u003e with\nN -\u003e fish\nN -\u003e fork\nDET -\u003e a\n```\n\nUsage\n----\nTo run algorithm simply ruby **app.rb** file in **app/** folder with given sentence as a input.\n```\n$ cd app/\n$ ruby app.rb \u003c input.txt\n```\n\nResult\n---\nResult is given in table form\n```\n+---+-----+------+-----+------+------+-----+------+\n|   | she | eats |  a  | fish | with |  a  | fork |\n+---+-----+------+-----+------+------+-----+------+\n| 1 | NP  | V    | DET | N    | P    | DET | N    |\n| 2 |     |      | NP  |      |      | NP  |      |\n| 3 |     | VP   |     |      | PP   |     |      |\n| 4 | S   |      |     |      |      |     |      |\n| 5 |     |      |     |      |      |     |      |\n| 6 |     | VP   |     |      |      |     |      |\n| 7 | S   |      |     |      |      |     |      |\n+---+-----+------+-----+------+------+-----+------+\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmike%2Fcyk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmike%2Fcyk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmike%2Fcyk/lists"}