0
$\begingroup$

I am given a dataset in which each instance consisting of 5 sentences. The goal is to predict the sequence of numbers which represent the order of these sentences.

For example, given a story:

He went to the store. He found a lamp he liked. He bought the lamp. Jan decided to get a new lamp. Jan's lamp broke.

your system needs to provide an answer in the following form:

2 3 4 1 0

where the numbers correspond to the zero-based index of each sentence in the correctly ordered story. So "2" for "He went to the store." means that this sentence should come 3rd in the correctly ordered target story. In This particular example, this order of indices corresponds to the following target story:

Jan's lamp broke. Jan decided to get a new lamp. He went to the store. He found a lamp he liked. He bought the lamp.

My initial idea is to extended the NSP algorithm used to train BERT, to 5 sentences somehow. I can't find an efficient way to go about doing so. All suggestions would be appreciated.

Thank you!

$\endgroup$
3
  • $\begingroup$ Is this a homework problem? If yes, you should tag your post with homework. $\endgroup$
    – nbro
    Commented Mar 10, 2022 at 9:33
  • $\begingroup$ No, its for a personal project. Figured it out though: turns out its just using a custom head on the BERT model $\endgroup$ Commented Mar 21, 2022 at 0:35
  • $\begingroup$ Feel free to write a formal answer below to your own question ;) $\endgroup$
    – nbro
    Commented Mar 21, 2022 at 10:30

0

You must log in to answer this question.