Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ficstamas committed Apr 11, 2022
1 parent d462674 commit 2b6ddac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions huclip_the_text/model/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def extract_keywords_spacy(self, sentence: str) -> List[Tuple[str, float]]:
element = Q.pop()
children = element.children
kw = [element.text, context.text, ]
for childe in reversed([x for x in children]):
if childe.pos_ not in _IGNORED_POS:
if childe.idx < element.idx:
kw.insert(0, childe.text)
Q.append(childe)
for child in reversed([x for x in children]):
if child.pos_ not in _IGNORED_POS:
if child.idx < element.idx:
kw.insert(0, child.text)
Q.append(child)
keywords.append((" ".join(kw), 0.0))

return keywords
Expand Down

0 comments on commit 2b6ddac

Please sign in to comment.