PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Bug fixes] Update labelstudio2doccano.py

Open 46319943 opened this issue 1 year ago • 10 comments

PR types

Bug fixes

PR changes

Others. Helper function for convering the format of label-studio to doccano.

Description

Fix json file reading error.

  • Only json line format was accpted, which is not the default export option in labelstudio, making error for directly output json or formatted json file. The reading procedure was fixed to adapt both the json line format and detended format.

Add support for setting default value for missing relation type, which is allowed in label-studio but not the case in doccano.

  • Some relation type could be emply list imported from label-studio. Add default relation type.

46319943 avatar Mar 26 '23 09:03 46319943

Thanks for your contribution!

paddle-bot[bot] avatar Mar 26 '23 09:03 paddle-bot[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.42%. Comparing base (e72fb98) to head (05cf318). Report is 1266 commits behind head on develop.

:exclamation: Current head 05cf318 differs from pull request most recent head 3645def. Consider uploading reports for the commit 3645def to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5422      +/-   ##
===========================================
+ Coverage    54.49%   59.42%   +4.93%     
===========================================
  Files          481      482       +1     
  Lines        68060    68103      +43     
===========================================
+ Hits         37092    40473    +3381     
+ Misses       30968    27630    -3338     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 26 '23 10:03 codecov[bot]

可以再提供一下doccano导出数据转换为Label Studio格式的代码吗?

OpenHuShen avatar Apr 15 '23 03:04 OpenHuShen

可以再提供一下doccano导出数据转换为Label Studio格式的代码吗?

可以在PaddleNLP下面提一个新的Issue

46319943 avatar Apr 16 '23 13:04 46319943

This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。

github-actions[bot] avatar Jun 26 '23 00:06 github-actions[bot]

This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。

github-actions[bot] avatar Oct 29 '23 00:10 github-actions[bot]

This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。

github-actions[bot] avatar May 08 '24 00:05 github-actions[bot]

@wawltor @sijunhe 请问能查看、通过一下吗?

46319943 avatar May 08 '24 08:05 46319943

This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。

github-actions[bot] avatar Jul 08 '24 00:07 github-actions[bot]