添加说明文件

This commit is contained in:
liu huanyong 2018-11-11 16:32:05 +08:00
parent 42616cd5a3
commit 222ade9217
6 changed files with 298 additions and 114 deletions

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_EMOJI_URL" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
</project>

View File

@ -1,74 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_EMOJI_URL" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />

View File

@ -19,7 +19,47 @@
<favorites_list name="CrimeKgAssistant" />
</component>
<component name="FileEditorManager">
<leaf />
<leaf>
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="719">
<caret line="110" column="0" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
<folding />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="crime_classify.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/crime_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="349">
<caret line="95" column="28" selection-start-line="95" selection-start-column="28" selection-end-line="95" selection-end-column="28" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="question_classify.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/question_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1268">
<caret line="149" column="29" selection-start-line="149" selection-start-column="29" selection-end-line="149" selection-end-column="29" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
@ -32,17 +72,17 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/question_classify_train.py" />
<option value="$PROJECT_DIR$/question_classify.py" />
<option value="$PROJECT_DIR$/crime_classify.py" />
<option value="$PROJECT_DIR$/crime_qa_server.py" />
<option value="$PROJECT_DIR$/crime_classify.py" />
<option value="$PROJECT_DIR$/question_classify.py" />
<option value="$PROJECT_DIR$/README.md" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="631" />
<option name="y" value="106" />
<option name="width" value="1261" />
<option name="height" value="1001" />
<option name="y" value="24" />
<option name="width" value="1920" />
<option name="height" value="1127" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
@ -87,6 +127,20 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="CrimeKgAssistant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="CrimeKgAssistant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="dict" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
@ -108,7 +162,7 @@
<recent name="$PROJECT_DIR$/embedding" />
</key>
</component>
<component name="RunManager" selected="Python.crime_classify">
<component name="RunManager" selected="Python.question_classify">
<configuration default="false" name="question_classify" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -294,8 +348,8 @@
</list>
<recent_temporary>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="Python.crime_classify" />
<item index="1" class="java.lang.String" itemvalue="Python.question_classify" />
<item index="0" class="java.lang.String" itemvalue="Python.question_classify" />
<item index="1" class="java.lang.String" itemvalue="Python.crime_classify" />
</list>
</recent_temporary>
</component>
@ -313,15 +367,15 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="631" y="106" width="1261" height="1001" extended-state="0" />
<frame x="0" y="24" width="1920" height="1127" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24959612" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14391144" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6682832" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3598448" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
@ -361,24 +415,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/question_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="484">
<caret line="40" column="15" selection-start-line="40" selection-start-column="15" selection-end-line="40" selection-end-column="15" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dict/crime.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/crime_classify_train.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="484">
@ -389,16 +425,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/crime_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="72" column="13" selection-start-line="72" selection-start-column="13" selection-end-line="72" selection-end-column="13" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build_qa_database.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -417,5 +443,46 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/crime_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="349">
<caret line="95" column="28" selection-start-line="95" selection-start-column="28" selection-end-line="95" selection-end-column="28" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dict/crime.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="693">
<caret line="193" column="2" selection-start-line="0" selection-start-column="0" selection-end-line="201" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/question_classify.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1268">
<caret line="149" column="29" selection-start-line="149" selection-start-column="29" selection-end-line="149" selection-end-column="29" />
<folding>
<element signature="e#150#159#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="719">
<caret line="110" column="0" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
<folding />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
</component>
</project>

114
README.md
View File

@ -1,2 +1,116 @@
# CrimeKgAssitant
Crime assistant including crime type prediction and crime consult service based on nlp methods and crime kg,罪名法务智能项目,内容包括856项罪名知识图谱, 基于280万罪名训练库的罪名预测,基于20W法务问答对的13类问题分类与法律资讯问答功能.
# 项目功能
目前知识图谱在各个行业中应用逐步打开,尤其在金融,医疗,法律,旅游方面.知识图谱助力法律智能,能够在一定程度上利用现有大数据以及机器学习/深度学习与自然语言处理技术,提供一些智能的解决方案.本项目将完成两个大方向的工作:
1, 以罪名为核心,收集相关数据,建成基本的罪名知识图谱,法务资讯对话知识库,案由量刑知识库.
2, 分别基于步骤1的结果,完成以下四个方面的工作:
1) 基于案由量刑知识库的罪名预测模型
2) 基于法务咨询对话知识库的法务问题类型分类
3) 基于法务咨询对话知识库的法务问题自动问答服务
4) 基于罪行知识图谱的知识查询
# 罪名预测
1, 问题类型:
罪名一共包括202种罪名,文件放在dict/crime.txt中, 详细内容举例如下:
妨害公务
寻衅滋事
盗窃、侮辱尸体
危险物品肇事
非法采矿
组织、强迫、引诱、容留、介绍卖淫
开设赌场
聚众斗殴
绑架
非法持有毒品
销售假冒注册商标的商品
容留他人吸毒
假冒注册商标
交通肇事
破坏电力设备
组织卖淫
合同诈骗
走私武器、弹药
抢劫
非法处置查封、扣押、冻结的财产
2, 问题模型:
罪刑数据库一共有288万条训练数据,要做的是202类型的罪名多分类问题.本项目采用的方式为:
| 训练数据规模 | 数据向量表示 | 模型 |训练时长 | 准确率 |
| :--- | :---: | :---: | :--- | :--- |
| 20W | doc embedding | svm | 0.5h| 0.83352184|
| 288W | doc embedding | svm | 12h| 0.9203119|
3, 效果:
执行 python crime_classify.py
crime desc:这宗案情凶残的案件中受害人樊敏仪是一名夜总会舞女1997年因筹措祖母的医药费偷取任职皮条客的首被告陈文乐数千元港币及其他财物(另一说是指毒品债)。首被告陈文乐于是吩咐次被告梁胜祖及第三被告梁伟伦向女受害人追债。女受害人为求还清债项怀孕后仍继续接客3名被告将欠款不断提高受害人因无力偿还因而触怒三人。1999年3月17日梁胜祖及梁伟伦按照首被告要求将受害人从葵涌丽瑶邨富瑶楼一单位押走禁锢于尖沙咀加连威老道31号3楼一单位。当回到单位后梁伟伦质问受害人为何不还钱、为何不肯回电话连踢受害人超过50次。3名被告用木板封着该单位的玻璃窗以滚油泼向受害人的口腔在伤口上涂上辣椒油逼她吞吃粪便及喝尿。被告之后把烧溶的塑胶吸管滴在她的腿上并命令受害人发出笑声。受害人开始神志不清并不时挑起伤口上的焦疤被告于是以电线紧紧捆缠受害人双手多个小时之后又用铁棍殴打她双手。
crime label: 非法拘禁
*********************************************************
crime desc:有很多人相信是莉齐进行了这次谋杀虽然她始终没有承认陪审团也得出了她无罪的结论。莉齐·鲍顿是一个32岁的老姑娘她被指控用刀杀死了自己的父亲和继母。虽然她最后无罪获释但人们知道她对继母一直怀恨在心而在谋杀发生的前一天她曾预言了将要发生的事。凶杀案发生时她已30岁。1892年8月4日中午莉齐·鲍顿叫唤她的邻居说她的父亲被杀了警察到来时发现她的母亲也死了。母亲被斧子砍了18下父亲被砍了10下。消息立即被传开了媒体认为莉齐本人极有谋杀嫌疑。然而次年六月法庭宣判莉齐无罪。此后她的故事广为流传被写成了小说芭蕾百老汇歌剧。最后是日本的教科书将她的童谣作为鹅妈妈童话收录的。
crime label: 故意杀人
*********************************************************
crime desc:017年5月26日11时许被告人陈某、李某林与一同前去的王某在信阳市羊山新区中级人民法院工地南大门门口拦住被害人张某军对其进行殴打致其右手受伤损伤程度属轻伤一级。2017年7月22日李某林主动到信阳市公安局羊山分局投案。在审理过程中被告人陈某、李某林与被害人张某军自愿达成赔偿协议由陈某、李某林赔偿张祖军全部经济损失共计10万元张某军对二被告人予以谅解。
crime label: 故意伤害
*********************************************************
crime desc:被告人赵某某于1999年5月起在某医院眼科开展医师执业活动2010年11月其与医院签订事业单位聘用合同从事专业技术工作并于2011年取得临床医学主任医师职称。2014年3月起其担任眼科主任在院长、分管院长和医务科领导下负责本科医疗、教学、科研和行政管理等工作。赵某某担任眼科主任期间利用职务之便收受人工晶体供货商给付的回扣共计37万元。赵某某作为眼科主任在医院向供货商订购进口人工晶体过程中参与了询价、谈判、合同签订和采购的过程。2015年4月12日赵某某接受检察院调查如实供述了收受人工晶体销售商回扣的事实。
crime label: 受贿
*********************************************************
crime desc:金陵晚报报道 到人家家里偷东西,却没发现可偷之物,丧尽天良的小偷为了报复竟将屋内熟睡的老太太强奸。日前,卢勇(化名) 在潜逃了一年后因再次出手被抓获。   31岁的卢勇是安徽枞阳县人因家境贫寒到现在仍是单身。今年6月份他从老家来到南京连续作案多起。7月1日凌晨当他窜至莫愁新村再次作案时当场被房主抓获。  经审讯又查明去年8月30日清晨4时许卢勇来宁行窃未遂后贼心不死。又到附近的另一户人家行窃。他在房内找了一圈都没找到任何值钱的东西只有个女人在床上睡觉。卢勇觉得没偷到东西亏了想报复一下这户人家就走到床边捂住女人的嘴不顾反抗将其强奸后逃跑。  据卢勇供述他当时并没注意女人的年纪直到事后他才发现对方竟然是个早已上了年纪的老太太。日前卢勇因涉嫌盗窃和强奸被检方审查起诉。
crime label: 强奸
# 法务咨询问题分类
1, 问题类型:
法务资讯问题一共包括13类,详细内容如下:
0: "婚姻家庭",
1: "劳动纠纷",
2: "交通事故",
3: "债权债务",
4: "刑事辩护",
5: "合同纠纷",
6: "房产纠纷",
7: "侵权",
8: "公司法",
9: "医疗纠纷",
10: "拆迁安置",
11: "行政诉讼",
12: "建设工程"
2, 问题模型:
法务咨询数据库一共有20万条训练数据,要做的是13类型咨询问题多分类问题.本项目采用的方式为:
| 训练数据规模 |测试集规模 | 模型 |训练时长 | 训练集准确率 |测试集准确率|
| :--- | :---: | :---: | :--- | :--- | :--- |
| 4W | 1W | CNN | 15*20s| 0.984|0.959|
| 4W | 1W | LSTM | 51*20s| 0.838|0.717|
3, 效果:
执行 python question_classify.py
question desc:他们俩夫妻不和睦,老公总是家暴,怎么办
question_type: 婚姻家庭 0.9994359612464905
*********************************************************
question desc:我们老板总是拖欠工资怎么办,怎么起诉他
question_type: 劳动纠纷 0.9999903440475464
*********************************************************
question desc:最近p2p暴雷,投进去的钱全没了,能找回来吗
question_type: 刑事辩护 0.3614000678062439
*********************************************************
question desc:有人上高速,把车给刮的不像样子,如何是好
question_type: 交通事故 0.9999163150787354
*********************************************************
question desc:有个老头去世了,儿女们在争夺财产,闹得不亦乐乎
question_type: 婚姻家庭 0.9993444085121155
# 法务咨询自动问答
# 罪刑知识查询
# 总结

View File

@ -91,9 +91,9 @@ class CrimeClassify(object):
def test():
handler = CrimeClassify()
while(1):
sent = input('enter an sent to search:')
sent = input('crime desc:')
label = handler.predict(sent)
print(label)
print('crime label:', label)
if __name__ == '__main__':
test()

View File

@ -145,6 +145,6 @@ class QuestionClassify(object):
if __name__ == '__main__':
handler = QuestionClassify()
while (1):
sent = input('enter an sent to search:')
sent = input('question desc:')
label, prob = handler.predict(sent)
print(label, prob)
print('question_type:', label, prob)