To format verdict
Project description
判決書格式轉換
使用方法
安裝套件
pip install VerdictFormat
把正式格式轉成測試格式
from VerdictFormat import Formal_to_Test
Formal_to_Test(Formal_format_path,output_path)
把測試格式轉成正式格式
from VerdictFormat import Test_to_Formal
Test_to_Formal(Test_format_path,output_path)
把標記好的格式轉成測試格式
from VerdictFormat import Labeled_to_Test
Labeled_to_Test(Labeled_data)
Formal Format
[
{
"name": "姓名",
"statuses": [
{
"status":"公務員",
"locations":
[
{
"field":"JFull",
"start": 28,
"end":40
}
]
}
],
"positions": [
{
"work unit": "勞動部職業安全衛生署南部職業安全衛生中心",
"title": "檢查員",
"locations":
[
{
"field":"JFull",
"start": 28,
"end":40
}
]
},
{
"work unit": "勞動部職業安全衛生署",
"title": "職員",
"locations": []
}
],
"laws": [
{
"act": "貪污治罪條例",
"article": 4,
"paragraph": 1,
"subparagraph": 2,
"locations":
[
{
"field":"JLaw",
"start": 28,
"end":40
},
{
"field":"JLaw",
"start": 156,
"end":168
}
]
}
]
}
]
Test Format
[
{
"content_id" : "1" ,
"name" : "柯森" ,
"job_location" : [] ,
"job_title" : [] ,
"laws" : ["中華民國刑法第276條第1項","中華民國刑法第140條"]
},{
"content_id" : "2" ,
"name" : "吳柯森" ,
"job_location" : ["停車場"] ,
"job_title" : ["管理員"] ,
"laws" : ["中華民國刑法第276條第1項","中華民國刑法第140條"]
}
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
VerdictFormat-1.4.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for VerdictFormat-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c3a6df58eb064dc29c38b00e2b99d9246ec4cfeaa565f12ca3ad7280419ba9d |
|
MD5 | 03eeb2727166f30cfc26e1e030bc365e |
|
BLAKE2b-256 | b8db64e59d381df2ef197d58c71f0f86e59046f443c04010818aa160b74d7fa2 |