madisonmay / finetune

Scikit-learn style model finetuning for NLP
https://finetune.indico.io
Mozilla Public License 2.0
0 stars 0 forks source link

Add optional param to SequenceLabeler.predict for predefined spans #3

Open sweep-ai[bot] opened 1 year ago

sweep-ai[bot] commented 1 year ago

Description

This PR adds an optional parameter to the SequenceLabeler.predict method in the SequenceLabeler class. The new parameter, spans, is a list of dictionaries where each dictionary contains the start and end indices of the predefined spans. This feature allows for predicting the labels of predefined spans in scenarios where the segmentation of entities is already known.

Summary of Changes

Fixes #1.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/add-predict-spans-param

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.