Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing a CSV file with Chinese column headers will cause the labeling text parsing error. #7168

Open
CraigMChen opened this issue Mar 5, 2025 · 1 comment

Comments

@CraigMChen
Copy link

Describe the bug
Here is a test csv with Chinese column headers:

第一列,第二列,第三列
a1,b1,c1
a2,b2,c2
a3,b3,c3

Import the csv file and select the text classification template as project lable config.

In Labeling Interface page, UI preview cannot load the example text correctly; instead, it mistakenly treats the $第一列 as a string.

Image

The same goes for the Labeling page.

Image

To Reproduce
Steps to reproduce the behavior:

  1. Create a project.
  2. Import a csv file with Chinese column headers.
  3. Select a text template for the project.
  4. Go to labeling page.
  5. All labeling text is a same string like $第一列.

Expected behavior
The displayed text should be the text in the corresponding row of the specified column in the csv file.

Environment (please complete the following information):

  • OS: Ubuntu
  • Label Studio Version 1.15.0
@heidi-humansignal
Copy link
Collaborator

Hello,

Thank you for contacting Label Studio,

Please be informed that when importing a CSV file for a text classification project, Label Studio expects the key for the text field to be a valid identifier (typically, a Latin-based name like “text”). In your case, the header is “第一列”, so when you reference it in the labeling configuration (i.e. using $第一列), the system does not replace it with the cell value and instead displays it literally.

Therefore, could you please apply the following and let us know if it worked out :

Rename the CSV header:
Change your CSV so that the text column header uses a supported name (like “text”). For example, update your CSV as follows:

text,第二列,第三列 a1,b1,c1 a2,b2,c2 a3,b3,c3

Then, update your labeling configuration to reference the “text” field (e.g., <Text name="text" value="$text"/>).

Comment by Oussama Assili
Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants