title: "Legal document processing" author: "Xia YIwei, Nemo" date: "Sunday, January 01, 2017" output: github_document
knitr::opts_chunk$set(echo = TRUE)
In the year 2014, the Chinese supreme people's court has release a document to collect and publish all the sentence documents made by court at each level in China.
The goal of current R package(functions) is tried to develop some useful tools to analyzing those Chinese document.
Current R package depends on Rwordseg package made by Lijian, please install the package before make full use of the current package.
library(devtools) install_github("xxxw567/legalwordproc") library(legalwordproc)
See the ?functions for more details
cnextract("判处有期徒刑十二年,缓刑一年","判处",",")
chinntoda("五") chinntoda("一年") chinntoda("one")
这个有点难,其实交给其他软件做更好
a<-"181208900.00" b<-"三十万" c<-"45万" d<-"5.9万" e<-"三千余" f<-"6万余" g<-"3百万" h<-"310万" i<-"300000余" j<-"3.98万" k<-"九万" l<-"壹佰万" m<-"三十三万" n<-"三百三十三万" o<-"三千三百三十三万" p<-"三千三百三十三万四千五百二十九" q<-"五点九万" r<-"五千零三万" matrix(sapply(c(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r),codemoney))
cutsentence ("本院认为,被告人王兴玖、梅潋耀身为安全管理人员,在生产作业中违反安全管理规定,不认真履行职责、发生重大安全事故,致一人死亡,其行为均已构成重大责任事故罪。公诉机关指控的事实、罪名成立,予以确认。",c(",","。"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.