-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Completed migration from successful_applications.txt to .json
- Loading branch information
Showing
5 changed files
with
113 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def contains_filter_keywords(flat_elem, user_filters): | ||
"""Check if the flat contains any of the filter keywords and return the keywords.""" | ||
|
||
# Find all keywords that are in the flat_elem's text | ||
keywords_found = [ | ||
keyword | ||
for keyword in user_filters | ||
if str(keyword).strip().lower() in flat_elem.text.lower() | ||
] | ||
|
||
# Return a tuple of boolean and keywords found | ||
return (bool(keywords_found), keywords_found) |