Wednesday, February 9, 2022

Identify

 The last assignent for CS50AI is filling in code on a parser.

There are ten sentences from Holmes to be covered.

Below, using the code from:

cs50ai/parser.py at master · amangarg078/cs50ai · GitHub

The calling code: python parser.py sentences/7.txt


Works like a charm.

                                                         *     *     *


'tokenize' is a term from nltk which is a requirement for this program


                                                   *     *     *


A lambda function is a useful on-the-fly function in the context of another function.

From W3Schools:


*     *     *

The student also had to identify the non-terminals needed to cover all the sentences.

A slash denotes another possibility follows...







No comments: