Skip to content

Commit

Permalink
respect word boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
kdutia committed Oct 8, 2024
1 parent 04228d8 commit 5bddb27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion streamlit_apps/searchable_world_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_geography_count_for_texts(texts: list[str]) -> pd.DataFrame:
Returns dataframe with columns 'geography ISO', and 'count'.
"""

texts = [f"\\b{text.lower()}\\b" for text in texts]
regex = f".*({'|'.join(texts)}).*"
results_df = db.sql(
f"""
Expand Down

0 comments on commit 5bddb27

Please sign in to comment.