Skip to content

Commit

Permalink
Use spacy new 'add_pipe' syntax (Fixes #56)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHousen committed Aug 24, 2021
1 parent a6f6073 commit ece40df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/extractive.py
Expand Up @@ -1173,8 +1173,7 @@ def predict(self, input_text: str, raw_scores=False, num_summary_sentences=3):
of input sentences and their corespoding scores.
"""
nlp = English()
sentencizer = nlp.create_pipe("sentencizer")
nlp.add_pipe(sentencizer)
nlp.add_pipe("sentencizer")
doc = nlp(input_text)

return self.predict_sentences(
Expand Down

0 comments on commit ece40df

Please sign in to comment.