Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavg authored Nov 17, 2024
1 parent 67dda61 commit 0eea888
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions ass1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Submit your BPE implementation (`bpe.py`) as well as the answers to the question

The `bpe.py` file must include a function `train_bpe` with the signature defined above, and we should be able to write `from bpe import train_bpe` in our own script and run the file. In other words, the `bpe.py` should act as a module: all runnable code which is not inside a function should be guarded under:
```python
if __name__ == "main":
if __name__ == "__main__":
```

# Part B: Generating sentences with a Context-Free Grammar (50 points)
Expand Down Expand Up @@ -303,18 +303,18 @@ python generate.py grammar -t
instead of just printing `the floor kissed the delicious chief of staff .` it should print the more elaborate version
```
(ROOT
(S (NP (Det the)
(Noun floor))
(VP (Verb kissed)
(NP (Det the)
(Noun (Adj delicious)
(Noun chief
of
staff)))))
(S (NP (Det the)
(Noun floor))
(VP (Verb kissed)
(NP (Det the)
(Noun (Adj delicious)
(Noun chief
of
staff)))))
.)
```

which includes extra information showing how the sentence was generated. For example, the above derivation used the rules Noun \(\rightarrow\) floor and Noun \(\rightarrow\) Adj Noun, among others.
which includes extra information showing how the sentence was generated. For example, the above derivation used the rules Noun $\rightarrow$ floor and Noun $\rightarrow$ Adj Noun, among others.

Note: It's not too hard to print the pretty indented format above. But it's not necessary. It's sufficient if you will the entire expression on a single line:
```
Expand Down Expand Up @@ -399,10 +399,10 @@ Here, you should try to find a reasonably elegant way of generating all the foll

| tense $\rightarrow$<br>aspect $\downarrow$ | present | past | future |
| ------------------------------------------ | --------------- | --------------- | --------------------- |
| Simple | eats | ate | will eat |
| Perfect | has eaten | had eaten | will have eaten |
| Progressive | is eating | was eating | will be eating |
| Perfect Progressive | has been eating | had been eating | will have been eating |
| **Simple** | eats | ate | will eat |
| **Perfect** | has eaten | had eaten | will have eaten |
| **Progressive** | is eating | was eating | will be eating |
| **Perfect Progressive** | has been eating | had been eating | will have been eating |

### (g) Appositives.

Expand All @@ -415,7 +415,7 @@ However, if you also did (c), try to extend your rules from that problem to auto

**What To Submit:**
Hand in your grammar (commented) as a file named `grammar4`.
The first line of `grammar4` must be a comment, including the letters of the two phenomena you chose to implement, separated by space. Example `# b f:
The first line of `grammar4` must be a comment, including the letters of the two phenomena you chose to implement, separated by space. Example `# b f`:

Submit 50 random generated sentences from your grammar in `grammar4.gen`.

Expand Down

0 comments on commit 0eea888

Please sign in to comment.