Commit 369aae7a authored by podrazka's avatar podrazka
Browse files

Add WIViT instructions to README.md

parent a514284e
Loading
Loading
Loading
Loading
+10 −0
Changes for README.md: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -79,6 +79,16 @@ Note the use of `[CLS]` as a first token. You should ideally include this in you
 
Per default, the attention values in relation to the first token of the sentence after `[CLS]` are used. You can change this by adjusting line 19 of the script.
 
### WIViT generation

To generate WIViT, first initialize a model using SBERT_MODEL class and execute the `get_html_word_importance` method on it, with a list of sentence pairs as an argument. A sentence pair should be a tuple of strings.

Example:
```python
ft_model = SBERT_Model("stsb-bert-large", f'{models_path}/stsb-bert-large/', dataset)
ft_model.get_html_word_importance(sentence_pairs)
```

### PAWS evaluation

paws_evaluation.py essentially creates an instance of the SBERT_Model class with all three models and the PAWS data set and calls functions that evaluate those models on it.