Skip to content

irgroup/labelstudio-to-fonduer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Label Studio to Fonduer

Label Studio to Fonduer is a small library to transfer annotations between Label Studio and Fonduer. By that, documents annotated in Label Studio can be used as gold labels in Fonduer and vice versa annotations made in Fonduer can easily be accessed by humans in Label Studio.

Label Studio and especially Fonduer create their own representation of an HTML document.

Therefore, the documents need to be converted into a structure that does not need to be modified by Label Studio or Fonduer.

Installation:

pip install git+https://github.com/irgroup/labelstudio-to-fonduer.git#egg=labelstudiotofonduer\&subdirectory=src

Documentation:

The documentation and a more extensive user guide with examples can be found here.

Examples:

From Fonduer to Label Studio:

train_cands = candidate_extractor.get_candidates()

converter.create_export(candidates=train_cands, fonduer_export_path="import.json")

From Label Studio to Fonduer:

converter = ToFonduer(label_studio_export=export, fonduer_session=session)

labeler.apply(
    docs=docs,
    lfs=[[converter.is_gold]],
    table=GoldLabel,
)