From 1f17ac53a5e0ed5c1aba72ecc3431834a8b4643f Mon Sep 17 00:00:00 2001 From: Maixent Chenebaux Date: Tue, 13 Oct 2020 15:14:51 +0200 Subject: [PATCH] fixed readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8042c6f..de85005 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ pip install eldar ### Basic usage ```python -from eldar import build_query +from eldar import Query # build list @@ -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)) @@ -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 @@ -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: