label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Text classification using `<Labels>` tag not exporting multiple annotations when `choice="multiple"` (but `<Choices>` does)

Open averdones opened this issue 3 years ago • 0 comments

Describe the bug When doing Text Classification with multiple options using the tags <Labels> and <Label>, the exported annotations file doesn't show the annotated labels.

However, when I use the tags <Choices> and <Choice>, the annotated choices are correctly exported.

I am trying to use Labels instead of Choices because it looks better and also because options are filtered when used along with the tag <Filter>.

Am I using the Labels tag in an unsupported way?

To Reproduce

  1. Create a new project
  2. In the section Data Import, import a simple CSV file that looks like this:
text
this is an some text
this is more text
third text
  1. In the section Labeling Setup, use this XML file:
<View>
  <Text name="text" value="$text"/>
  <View style="box-shadow: 2px 2px 5px #999;                padding: 20px; margin-top: 2em;                border-radius: 5px;">
    <Header value="Choose text sentiment"/>
    <Labels name="sentiment" toName="text" choice="multiple" showInLine="true">
      <Label value="Positive"/>
      <Label value="Negative"/>
      <Label value="Neutral"/>
    </Labels>
  </View>
</View>

This is the same as the default template but changing Choices and Choice for Labels and Label, and adding the option choice="multiple"

  1. Annotate one example
  2. Export annotations as CSV
  3. The exported CSV file doesn't have the annotations (when using Choices tag, the CSV file would correctly have a column named sentiment)

Expected behavior The exported CSV file should have the multiple annotations.

Environment:

  • OS: Windows 10
  • Label Studio Version 1.5.0

averdones avatar Sep 16 '22 17:09 averdones