List of phrases to search for
phrases_to_search = [
"artificial intelligence",
"machine learning",
"neural network"
]
# Search for phrases and get counts
phrase_counts = search_phrases(pdf_texts, phrases_to_search)
# Print the results
for phrase, count in phrase_counts.items():
print(f"'{phrase}': {count} occurrences")
Output:
File “”, line 2
phrases_to_search = [
^
IndentationError: unexpected indent
I need the count of the keywords in my PDF lists
New contributor
Inah Okpa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.