Version: 4 (current) | Updated: 11/12/2025, 10:32:47 PM
Added description
The code is modular, with separate modules for grammar parsing, table construction, and result interpretation. It includes comments and type annotations to aid readability and maintainability.
@file_pinax -> documents -> @cyk_implementation:software {title: "Grammar and Parsing: CYK Algorithm Implementation", created: @date_2023, subjects: ["CYK Algorithm","Grammar Parsing","Python","Computational Linguistics","Context-Free Grammars"], description: "Implementation of the CYK algorithm for parsing strings according to a given context‑free grammar. Includes grammar definitions and parsing logic in Python."}
@cyk_algorithm:concept {description: "Dynamic‑programming parsing algorithm for context‑free grammars (Cocke‑Younger‑Kasami)."}
@grammar_example:document {productions: {"S": [["A","B"],["B","C"]], "A": [["B","A"],["a"]], "B": [["C","C"],["b"]], "C": [["A","B"],["a"]]}}
@string_baaba:document {value: "baaba"}
@file_grammer_check_py -> documents -> @cyk_parser_py:software {language: @python, implements: @cyk_algorithm, defines_grammar: @grammar_example, parses_string: @string_baaba}
@cyk_parser_py -> uses -> @grammar_example
@cyk_parser_py -> parses -> @string_baaba
@rules_example:document {rules: ["S -> AS","S -> AC","S -> c","A -> a","B -> b","C -> SD","D -> BS"]}
@string_aacbc:document {value: "aacbc"}
@file_cyk_maker_py -> documents -> @cyk_maker_py:software {language: @python, implements: @cyk_algorithm, defines_rules: @rules_example, parses_string: @string_aacbc}
@cyk_maker_py -> uses -> @rules_example
@cyk_maker_py -> parses -> @string_aacbc{
"error": "Failed to fetch: Unexpected token 'd', \"def parse_\"... is not valid JSON"
}{
"error": "Failed to fetch: Unexpected token 'g', \"grammar = \"... is not valid JSON"
}No children (leaf entity)