Skip to content

Commit

Permalink
fixed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kerighan committed Oct 13, 2020
1 parent e2ebcb8 commit 1f17ac5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pip install eldar
### Basic usage

```python
from eldar import build_query
from eldar import Query


# build list
Expand All @@ -32,7 +32,7 @@ documents = [
"Elijah Wood was cast as Frodo Baggins in Jackson's adaptation",
"The Lord of the Rings is an epic fantasy novel by J. R. R. Tolkien"]

eldar = build_query('("gandalf" OR "frodo") AND NOT ("movie" OR "adaptation")')
eldar = Query('("gandalf" OR "frodo") AND NOT ("movie" OR "adaptation")')

# use `filter` to get a list of matches:
print(eldar.filter(documents))
Expand All @@ -49,7 +49,7 @@ print(eldar(documents[2]))

You can also use it to mask Pandas DataFrames:
```python
from eldar import build_query
from eldar import Query
import pandas as pd


Expand All @@ -63,7 +63,7 @@ df = pd.DataFrame([
columns=['content'])

# build query object
eldar = build_query('("gandalf" OR "frodo") AND NOT ("movie" OR "adaptation")')
eldar = Query('("gandalf" OR "frodo") AND NOT ("movie" OR "adaptation")')

# eldar's call returns True if the text matches the query.
# You can filter a dataframe using pandas mask syntax:
Expand Down

0 comments on commit 1f17ac5

Please sign in to comment.