Skip to content

Commit

Permalink
rationalize dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aalok-sathe committed Nov 15, 2023
1 parent ee5b226 commit 2db52ed
Show file tree
Hide file tree
Showing 3 changed files with 2,803 additions and 851 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,27 @@ python -m surprisal -m distilgpt2 "I went to the space station today."


## Installing
`pip install surprisal`
Because `surprisal` is used by people from different communities for different
purposes, by default, core dependencies related to language modeling are marked
optional. Depending on your use case, install `surprisal` with the appropriate
extras.

- For Huggingface transformers support:
`pip install surprisal[transformers]`
- For KenLM support:
`pip install surprisal[kenlm]`
- For OpenAI support:
`pip install surprisal[openai]`

### To install all extras:
```bash
pip install surprisal[transformers,openai,kenlm]`
```

### Install using `poetry`
```bash
poetry add surprisal -E transformers -E openai -E kenlm
```

## Acknowledgments

Expand Down
Loading

0 comments on commit 2db52ed

Please sign in to comment.