### Abstract

We present a novel algorithm using new hypothesis representations for learning context-free grammars from a finite set of positive and negative examples. We propose an efficient hypothesis representation method which consists of a table-like data structure similar to the parse table used in efficient parsing algorithms for context-free grammars such as Cocke-Younger-Kasami algorithm. By employing this representation method, the problem of learning context-free grammars from examples can be reduced to the problem of partitioning the set of nonterminals. We use genetic algorithms for solving this partitioning problem. Further, we incorporate partially structured examples to improve the efficiency of our learning algorithm, where a structured example is represented by a string with some parentheses inserted to indicate the shape of the derivation tree of the unknown grammar. We demonstrate some experimental results using these algorithms and theoretically analyse the completeness of the search space using the tabular method for context-free grammars.

Original language | English |
---|---|

Pages (from-to) | 1372-1383 |

Number of pages | 12 |

Journal | Pattern Recognition |

Volume | 38 |

Issue number | 9 |

DOIs | |

Publication status | Published - 2005 Sep 1 |

### Keywords

- Context-free grammar
- Dynamic programming
- Genetic algorithm
- Grammatical inference
- Structured example

### ASJC Scopus subject areas

- Software
- Signal Processing
- Computer Vision and Pattern Recognition
- Artificial Intelligence