DeDeckerThomas commited on
Commit
0e2aca0
1 Parent(s): 066a422

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -1
README.md CHANGED
@@ -114,10 +114,55 @@ and context of a document, which is quite an improvement.
114
  'semantics' 'statistics' 'text analysis' 'transformers']
115
  ```
116
 
 
 
 
 
117
  ## [📚 Training Dataset](https://huggingface.co/datasets/midas/inspec)
118
  ## 👷‍♂️ Training procedure
 
 
 
 
 
 
119
 
120
  ### Preprocessing
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  ## 📝Evaluation results
122
 
123
  The model achieves the following results on the Inspec test set:
@@ -126,7 +171,8 @@ The model achieves the following results on the Inspec test set:
126
  |:-----------------:|:----:|:----:|:----:|:----:|:----:|:-----:|:----:|:----:|:----:|
127
  | Inspec Test Set | 0.53 | 0.47 | 0.46 | 0.36 | 0.58 | 0.41 | 0.58 | 0.60 | 0.56 |
128
 
129
- ### BibTeX entry and citation info
 
130
  Debanjan Mahata, Navneet Agarwal, Dibya Gautam, Amardeep Kumar, Sagar Dhiman, Anish Acharya, & Rajiv Ratn Shah. (2021). LDkp Dataset [Data set]. Zenodo. https://doi.org/10.5281/zenodo.5501744
131
 
132
  Kulkarni, Mayank, Debanjan Mahata, Ravneet Arora, and Rajarshi Bhowmik. "Learning Rich Representation of Keyphrases from Text." arXiv preprint arXiv:2112.08547 (2021).
 
114
  'semantics' 'statistics' 'text analysis' 'transformers']
115
  ```
116
 
117
+ ### 🛑 Limitations
118
+ * The model performs very well on abstracts of scientific papers. Please be aware that this model very domain-specific.
119
+ * Only works in English.
120
+
121
  ## [📚 Training Dataset](https://huggingface.co/datasets/midas/inspec)
122
  ## 👷‍♂️ Training procedure
123
+ The model is fine-tuned as a token classification problem where the text is labeled using the BIO scheme.
124
+ - B => Begin of a keyphrase
125
+ - I => Inside of a keyphrase
126
+ - O => Ouside of a keyphrase
127
+
128
+ For more information, you can take a look at the training notebook.
129
 
130
  ### Preprocessing
131
+ ```python
132
+ def preprocess_fuction(all_samples_per_split):
133
+ tokenized_samples = tokenizer.batch_encode_plus(
134
+ all_samples_per_split[dataset_document_column],
135
+ padding="max_length",
136
+ truncation=True,
137
+ is_split_into_words=True,
138
+ max_length=max_length,
139
+ )
140
+ total_adjusted_labels = []
141
+ for k in range(0, len(tokenized_samples["input_ids"])):
142
+ prev_wid = -1
143
+ word_ids_list = tokenized_samples.word_ids(batch_index=k)
144
+ existing_label_ids = all_samples_per_split[dataset_biotags_column][k]
145
+ i = -1
146
+ adjusted_label_ids = []
147
+
148
+ for wid in word_ids_list:
149
+ if wid is None:
150
+ adjusted_label_ids.append(lbl2idx["O"])
151
+ elif wid != prev_wid:
152
+ i = i + 1
153
+ adjusted_label_ids.append(lbl2idx[existing_label_ids[i]])
154
+ prev_wid = wid
155
+ else:
156
+ adjusted_label_ids.append(
157
+ lbl2idx[
158
+ f"{'I' if existing_label_ids[i] == 'B' else existing_label_ids[i]}"
159
+ ]
160
+ )
161
+
162
+ total_adjusted_labels.append(adjusted_label_ids)
163
+ tokenized_samples["labels"] = total_adjusted_labels
164
+ return tokenized_samples
165
+ ```
166
  ## 📝Evaluation results
167
 
168
  The model achieves the following results on the Inspec test set:
 
171
  |:-----------------:|:----:|:----:|:----:|:----:|:----:|:-----:|:----:|:----:|:----:|
172
  | Inspec Test Set | 0.53 | 0.47 | 0.46 | 0.36 | 0.58 | 0.41 | 0.58 | 0.60 | 0.56 |
173
 
174
+ For more information on the evaluation process, you can take a look at the keyphrase extraction evaluation notebook.
175
+ ### Bibliography
176
  Debanjan Mahata, Navneet Agarwal, Dibya Gautam, Amardeep Kumar, Sagar Dhiman, Anish Acharya, & Rajiv Ratn Shah. (2021). LDkp Dataset [Data set]. Zenodo. https://doi.org/10.5281/zenodo.5501744
177
 
178
  Kulkarni, Mayank, Debanjan Mahata, Ravneet Arora, and Rajarshi Bhowmik. "Learning Rich Representation of Keyphrases from Text." arXiv preprint arXiv:2112.08547 (2021).