Skip to content

Latest commit

 

History

History
69 lines (63 loc) · 1.28 KB

Discription.md

File metadata and controls

69 lines (63 loc) · 1.28 KB

判決書段落分割

安裝

安裝套件(form Source) recommend

pip install -U git+https://github.com/seanbbear/VerdictCut.git

安裝套件(form PyPI)

pip install VerdictCut

使用

找人物

def find_roles(cj_doc, target_roles=['上訴人', '被告', '選任辯護人'], break_line='\r\n', name_length_limit=25, search_rows_limit=100):
from VerdictCut import find_roles
roles = find_roles(text)
print(roles)

找主文

def find_maintext(judgement, break_line='\r\n'):
from VerdictCut import find_maintext
maintext = find_maintext(text)
print(maintext)

找事實(段落分割)

def find_fact(judgement, break_line='\r\n'):
from VerdictCut import find_fact
fact = find_fact(text)
print(fact)

找事實(無分割)

def extract_fact(judgement, break_line='\r\n'):
from VerdictCut.find_fact import extract_fact

找論罪科刑

def find_justice(judgement, break_line = '\r\n'):
from VerdictCut import find_justice
justice = find_justice(text)
print(justice)

找附錄法條

def find_laws(judgement, break_line='\r\n'):
from VerdictCut import find_laws
laws = find_laws(laws))
print(laws)