Skip to content

Commit

Permalink
Simplified match_word_with_phrase_exact
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderVertegaal committed Aug 23, 2024
1 parent 8fa836d commit 7fcbb11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/aethel_db/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ def match_word_with_item(item: LexicalItem, word_input: str) -> bool:


def match_word_with_phrase_exact(phrase: LexicalPhrase, word_input: list[str]) -> bool:
phrase_combined = "".join([item.word for item in phrase.items])
word_input_combined = "".join(word_input)
return phrase_combined == word_input_combined
return [item.word for item in phrase.items] == word_input

0 comments on commit 7fcbb11

Please sign in to comment.