dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.38k stars 305 forks source link

Using a different SpaCy Model #58

Closed mind-matrix closed 4 years ago

mind-matrix commented 4 years ago

Hi. Thanks for this amazing library. I just wanted to know how I can use a different SpaCy model than the one used by default. I want to use the en_core_web_lg model instead of the en_core_web_sm model. So I downloaded the model and linked it to en shortcut. However, the library still complains about the en_core_web_sm model not being installed. Could you clarify how we can use it?

dmmiller612 commented 4 years ago

Is this in context to the coreference? If not, you can actually use any sentence processing library by inheriting from https://github.com/dmmiller612/bert-extractive-summarizer/blob/master/summarizer/sentence_handler.py.

The model then can be used through:

model = Summarizer(sentence_handler=your_handler_here)

mind-matrix commented 4 years ago

Oh. The sentence handler, yes. Thanks a lot.