Python Forum
adding the customize dataset to BERT
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding the customize dataset to BERT
#1
I want to summarize our training documents by using BERT model.
I tried with the code below but the result looks not the best.
So, I want to add the customized dataset to drive the result like I want.
Could anyone help me?
pip install bert-extractive-summarizer
pip install sacremoses
from summarizer import Summarizer
model = Summarizer()
with open('readme.txt') as f:
    contents = f.read()
string = model(contents)
Thanks.
Reply
#2
Could anyone give me the instruction on this matter?
Reply
#3
pip is used from command line, not from within a python script
so run first two lines from command line, and remove from script

then you also need to import bert-extractive-summarizer: from summarizer import Summarizer into your script

the examples are extensive here: https://github.com/dmmiller612/bert-extr...summarizer
and here for sacremoses: https://github.com/isi-nlp/sacremoses
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to customize each x-axis separately? Mark17 4 2,003 Mar-10-2022, 02:56 PM
Last Post: Mark17
  Customize Python Keywords for IDLE alanvers 0 2,017 Apr-03-2021, 10:56 AM
Last Post: alanvers
  Customize spider chart swisha 2 2,087 Mar-17-2020, 01:15 AM
Last Post: swisha
  pytest-html report customize manoj 4 14,378 Nov-26-2019, 09:10 AM
Last Post: manojshetty
  Adding markers to Folium map only adding last element. tantony 0 2,146 Oct-16-2019, 03:28 PM
Last Post: tantony

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020