Skip to content

Accepts a text file containing grammar of a language (in Chomsky Normal Form) and uses CYK Algorithm to check whether a given string can be accepted by the language

Notifications You must be signed in to change notification settings

AnushaTiwari5/CYK-Algorithm

Repository files navigation

CYK-Algorithm

Accepts a text file containing grammar of a language (in Chomsky Normal Form) and uses CYK Algorithm to check whether a given string can be accepted by the language

To Run Code:

  1. Run Driver.java
  2. Enter name of text file when prompted (eg cnf_part1.txt). NOTE: The text file should be in the Project folder (ICSI409_HW2), in the same level as the src and bin folders.
  3. At the next prompt, enter string that you would like to check
  4. The program will print whether the string can be obtained or not.
  5. At the next prompt, enter "y" if you would like to continue testing more strings for the same CNF. Enter "n" to exit the program.

About

Accepts a text file containing grammar of a language (in Chomsky Normal Form) and uses CYK Algorithm to check whether a given string can be accepted by the language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published