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

Feature Request: Display new line for sequence labeling tasks #376

Closed
GeorgeXiaojie opened this issue Sep 11, 2019 · 13 comments
Closed

Feature Request: Display new line for sequence labeling tasks #376

GeorgeXiaojie opened this issue Sep 11, 2019 · 13 comments
Labels
enhancement Improvement on existing feature

Comments

@GeorgeXiaojie
Copy link

Describe the problem

I want label one document which has multi-line, and i reorganize it as following,

a b c <br> d e f g <br> h i j k

but it still display all content in one row, and i want display like this

a b c
d e f g
h i j k

Could you add this feature for the multi-line scene?

Thank you very much for your sharing.

@GeorgeXiaojie GeorgeXiaojie changed the title Feature Request: Display new for sequence labeling tasks Feature Request: Display new line for sequence labeling tasks Sep 11, 2019
@c-w
Copy link
Member

c-w commented Sep 11, 2019

See #34 which discussed this feature.

@icoxfog417
Copy link
Contributor

doccano separates each data by line break now. But you can use the hack that replace line break to \n. Please refer #330.

@icoxfog417 icoxfog417 added feature request feature request for doccano enhancement Improvement on existing feature and removed feature request feature request for doccano labels Sep 11, 2019
@GeorgeXiaojie
Copy link
Author

If the project type is document classification, replace line break with \n and save as a json file, it works. But if the project type is sequence labeling, it does not work through reaplace line break as mentioned in #330 .

@icoxfog417
Copy link
Contributor

Line breaks are not supported in sequence labeling because this task is sensitive to character position.

@davidolmo
Copy link

+1 to this request. I just setted up doccano and was amazed by the library. The problem is that if you have a huge document with multiple sequence labeling categories, new lines are mandatory (otherwise the whole document is a mess). It is a pity that I couldn't use it because of this issue

@DSLituiev
Copy link

+1, this is a very important feature.

In medical text I work with NER cannot be disambiguated w/o line breaks
Please consider re-opening.

@c-w
Copy link
Member

c-w commented Feb 5, 2020

@armanrahman22 was working on this; any update on progress?

@bgraf422
Copy link

+1, I agree with @DSLituiev, this is an essential feature for medical text. Most documents contain multiple sections separated by line breaks and without them the documents are a mess.

@DSLituiev
Copy link

Can someone re-open this issue to make it visible? @c-w

I changed this line of annotation.css, and it works like a charm.

 .content .text-sequence {
-  white-space: normal; /* Not render newlines for sequence labelling */
-  height: auto;
+  white-space: pre-wrap;
 }

image

I see no undesirable side effects. Why not just fix it?

@Hironsan
Copy link
Member

Hironsan commented Apr 1, 2020

Resolved in #654.

@DSLituiev
Copy link

@Hironsan for some reason I see a different frontend than one in #654 (old, without subtitle) when I build from master.

@buriy
Copy link
Contributor

buriy commented Jun 4, 2020

Please fix "old" frontend too!

@antisrdy
Copy link

Describe the problem

I'm still facing the issue described in this thread despite all hacks that were mentioned.

Using Doccano through Docker (see this section of the README), Google Chrome or Edge as browsers, and Text Classification task

Using a JSONL file:

{"text": "This is a test\nThis is a test","labels":[]}
{"text": "This is a test \n This is a test","labels":[]}

Here is what I see on the screen:

Capture d’écran 2021-03-25 125647

The blank line is well rendered in the code of the page, but not on the screen.

Any idea about how to solve this?

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

No branches or pull requests

9 participants