Skip to content

Commit

Permalink
adjusts wording
Browse files Browse the repository at this point in the history
  • Loading branch information
CSchoel committed Mar 22, 2024
1 parent 25eac2c commit d9a6465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/2024/ChatGPT/ngram/ngram.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Create a class `NgramModel` in `ngram.py` that can generate an ngram model and m

1. `__init__(self, n: int)` - Initialize the ngram model with the value of `n`, the order of the ngrams.
2. `train(self, text: str)` - Train the model using the provided text. This method should build the ngram model.
3. `predict(self, prefix: str) -> List[str]` - Given a prefix, predict the next word based on the trained ngram model. Return a list of possible predictions sorted by their probabilities.
3. `predict(self, prefix: str) -> List[str]` - Given a prefix, predict the next word based on the trained ngram model. Return a list of up to 10 possible predictions sorted by their probabilities (descending).

Example:

Expand Down

0 comments on commit d9a6465

Please sign in to comment.