Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
titu1994 committed Oct 5, 2018
1 parent 2ba3cea commit ea16277
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
44 changes: 33 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

This script runs using Python 3.

First, install the required packages. This script only requires ``nltk`` and ``PyEnchant``.
First, install the project using pip3. This script only requires ``nltk`` and ``six``.
Optionally, you can install the `[full]` version, which includes PyEnchant for spelling checks.

There are two ways to install it :

```bash
$ pip3 install -r requirements.txt
$ pip3 install .
```

If you run the error that the package ``punkt`` doesn't exist, download it by going into your Python environment and running:

```bash
$ python3

>>> import nltk
>>> nltk.download('punkt')
$ pip3 install .[full]
```

If you run the error that the package ``punkt`` doesn't exist, this script will automatically download it for you.

On Windows, due to encoding errors, the script may cause issues when run on the command line. It is
recommended to use `pip install win-unicode-console --upgrade` prior to launching the script. If you get
UnicodeEncodingError, you *must* install the above.

In MacOS, you can get the SSL error

```
Expand All @@ -31,19 +35,37 @@ $ /Applications/Python\ 3.x/Install\ Certificates.command
```


# Usage
This project adds the `sotawhat` script for you to run globally on Terminal or commandline.

To query for a certain keyword, run:

```bash
$ python3 sotawhat.py "[keyword]" [number of results]
$ sotawhat "[keyword]"
```

It also supports choosing the number of returned samples via arguments :

```bash
$ sotawhat "[keyword]" -c 10
$ sotawhat "[keyword]" --count 10 # same as above
```

You can also force exact name matches (if you are sure about spelling) by using the `--exact` flag.

```bash
$ sotawhat "[keyword]" -e
$ sotawhat "[keyword]" --exact
```

For example:

```bash
$ python3 sotawhat.py "perplexity" 10
$ sotawhat "perplexity" --count 10 --exact
```

If you don't specify the number of results, by default, the script returns 5 results. Each result contains the title of the paper with author and published date, a summary of the abstract, and link to the paper.
If you don't specify the number of results, by default, the script returns 5 results and doesnt perform exact matching.
Each result contains the title of the paper with author and published date, a summary of the abstract, and link to the paper.

We've found that this script works well with keywords that are:
+ a model (e.g. transformer, wavenet, ...)
Expand Down
1 change: 1 addition & 0 deletions sotawhat/cmd_line.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
import os
import argparse
import warnings
Expand Down

0 comments on commit ea16277

Please sign in to comment.