增加hanlp

这个提交包含在:
13564180096
2020-09-01 14:40:46 +08:00
父节点 185c840ff3
当前提交 6bde4ea8b6
共有 12 个文件被更改,包括 426 次插入767 次删除

6
.idea/Medical-nlp.iml 自动生成的
查看文件

@@ -2,7 +2,11 @@
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" /> <orderEntry type="jdk" jdkName="Python 3.6.6 (E:\python+\python\envs\lidunwei\python.exe)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module> </module>

300
.idea/workspace.xml 自动生成的
查看文件

@@ -1,20 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="818087ba-af84-4167-ab4f-8ca76742a4b1" name="Default" comment="">
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/README.md" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/css/strucMap.min.css" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/file/3.json" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/index.html" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/java_knowledge_graph.png" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/js/d3.min.js" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/js/strucMap.min.js" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/Medical-nlp.iml" afterPath="$PROJECT_DIR$/.idea/Medical-nlp.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/requirements.txt" afterPath="$PROJECT_DIR$/requirements.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/tenxun.py" afterPath="$PROJECT_DIR$/src/tenxun.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" /> <option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
<file leaf-file-name="tenxun.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/tenxun.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="202">
<caret line="26" column="7" lean-forward="false" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="get_words.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/get_words.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="931">
<caret line="94" column="33" lean-forward="false" selection-start-line="94" selection-start-column="33" selection-end-line="94" selection-end-column="33" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="requirements.txt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="4" column="7" lean-forward="false" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>nodesJson</find>
<find>da</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/del.txt" />
<option value="$PROJECT_DIR$/src/tenxun.py" />
<option value="$PROJECT_DIR$/kg/index.html" />
<option value="$PROJECT_DIR$/kg/del.html" />
<option value="$PROJECT_DIR$/src/get_words.py" />
<option value="$PROJECT_DIR$/requirements.txt" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-9" />
<option name="y" value="-9" />
<option name="width" value="1938" />
<option name="height" value="1048" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="Medical-nlp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Medical-nlp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="Medical-nlp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Medical-nlp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" /> <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<method />
</configuration>
<configuration default="true" type="Tox" factoryName="Tox">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Doctests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" />
<option name="SCRIPT_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="FOLDER_NAME" value="" />
<option name="TEST_TYPE" value="TEST_SCRIPT" />
<option name="PATTERN" value="" />
<option name="USE_PATTERN" value="false" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Nosetests">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" />
<option name="_new_regexPattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;.&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method />
</configuration>
</component> </component>
<component name="ShelveChangesManager" show_recycled="false"> <component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" /> <option name="remove_strategy" value="false" />
</component> </component>
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
<changelist id="818087ba-af84-4167-ab4f-8ca76742a4b1" name="Default" comment="" />
<created>1598520322413</created> <created>1598520322413</created>
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
@@ -22,6 +230,30 @@
</task> </task>
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager">
<frame x="-9" y="-9" width="1938" height="1048" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26126608" 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="7" side_tool="true" 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.33" sideWeight="0.5" order="2" side_tool="false" 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="7" 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.3295583" sideWeight="0.5" order="7" 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.25375536" 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="true" show_stripe_button="true" weight="0.3295583" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" 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="2" side_tool="true" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" 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="Ant Build" active="false" anchor="right" 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" />
</layout>
</component>
<component name="VcsContentAnnotationSettings"> <component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" /> <option name="myLimit" value="2678400000" />
</component> </component>
@@ -29,4 +261,70 @@
<breakpoint-manager /> <breakpoint-manager />
<watches-manager /> <watches-manager />
</component> </component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/tenxun.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/tenxun.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/tenxun.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="567">
<caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kg/index.html" />
<entry file="file://$PROJECT_DIR$/del.txt" />
<entry file="file://$PROJECT_DIR$/kg/del.html" />
<entry file="file://$PROJECT_DIR$/del.txt" />
<entry file="file://$PROJECT_DIR$/kg/index.html" />
<entry file="file://$PROJECT_DIR$/kg/del.html" />
<entry file="file://$PROJECT_DIR$/src/tenxun.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="202">
<caret line="26" column="7" lean-forward="false" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/get_words.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="931">
<caret line="94" column="33" lean-forward="false" selection-start-line="94" selection-start-column="33" selection-end-line="94" selection-end-column="33" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="4" column="7" lean-forward="false" selection-start-line="4" selection-start-column="7" selection-end-line="4" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
</component>
</project> </project>

查看文件

@@ -1,12 +0,0 @@
# knowledge_graph
一个基于D3.js画图组件的纯js的知识图谱树
# 效果预览
![](https://img-blog.csdnimg.cn/20190416210018110.png)
# 预览地址
https://liaocan.top/knowledge_graph/

查看文件

@@ -1,56 +0,0 @@
#topomap{
width: 1440px;
height: 1440px;
background-color: rgb(237, 245, 238);
}
svg {
cursor: move;
position: relative
}
svg text {
font-family: fantasy;
font-size: 12px;
color: #ffffe0;
}
svg .node {
cursor: pointer
}
svg .node .ring {
stroke-width: 4px;
stroke: #6ac6ff;
/* opacity: .2;外圈的阴影,我设置为透明看不见 */
opacity: 0;
transition: opacity .6s
}
svg .node:active .ring,
svg .node:hover .ring {
opacity: .1
}
svg .link {
fill: none;
stroke: #6ac6ff;
opacity: .8;
stroke-width: 2
}
svg text.desc {
fill: #000;
font-family: fantasy;
font-size: 10px;
font-weight: bolder
}
#title {
margin: 0 auto;
text-align: center;
padding: 43px;
font-size: 33px;
font-weight: bold;
color: #30B5C7;
}

查看文件

@@ -1,187 +0,0 @@
{"id":134,"index":3,"prop":{"name":"二叉树","size":29}},
{"id":135,"index":3,"prop":{"name":"完全二叉树","size":29}},
{"id":136,"index":3,"prop":{"name":"平衡二叉树","size":29}},
{"id":137,"index":3,"prop":{"name":"二叉查找树BST","size":29}},
{"id":138,"index":3,"prop":{"name":"红黑树","size":29}},
{"id":139,"index":3,"prop":{"name":"B,B+,B*树","size":29}},
{"id":140,"index":3,"prop":{"name":"LSM 树","size":29}},
{"id":141,"index":3,"prop":{"name":"选择排序","size":29}},
{"id":142,"index":3,"prop":{"name":"冒泡排序","size":29}},
{"id":143,"index":3,"prop":{"name":"插入排序","size":29}},
{"id":144,"index":3,"prop":{"name":"归并排序","size":29}},
{"id":145,"index":3,"prop":{"name":"希尔排序","size":29}},
{"id":141,"index":3,"prop":{"name":"堆排序","size":29}},
{"id":142,"index":3,"prop":{"name":"计数排序","size":29}},
{"id":143,"index":3,"prop":{"name":"桶排序","size":29}},
{"id":144,"index":3,"prop":{"name":"基数排序","size":29}},
{"id":145,"index":3,"prop":{"name":"二分查找","size":29}},
{"id":145,"index":3,"prop":{"name":"Java中的排序工具","size":29}},
{"id":141,"index":3,"prop":{"name":"KMP 算法","size":29}},
{"id":142,"index":3,"prop":{"name":"事务 ACID 特性","size":29}},
{"id":143,"index":3,"prop":{"name":"事务的隔离级别","size":29}},
{"id":144,"index":3,"prop":{"name":"MVCC","size":29}},
{"id":145,"index":3,"prop":{"name":"Java中的锁和同步类","size":29}},
{"id":141,"index":3,"prop":{"name":"公平锁&非公平锁","size":29}},
{"id":142,"index":3,"prop":{"name":"悲观锁","size":29}},
{"id":143,"index":3,"prop":{"name":"乐观锁&CAS","size":29}},
{"id":144,"index":3,"prop":{"name":"ABA问题","size":29}},
{"id":145,"index":3,"prop":{"name":"CopyOnWrite容器","size":29}},
{"id":145,"index":3,"prop":{"name":"RingBuffer","size":29}},
{"id":144,"index":3,"prop":{"name":"可重入锁&不可重入锁","size":29}},
{"id":145,"index":3,"prop":{"name":"互斥锁&共享锁","size":29}},
{"id":145,"index":3,"prop":{"name":"死锁","size":29}},
{"id":145,"index":3,"prop":{"name":"多级缓存","size":29}},
{"id":141,"index":3,"prop":{"name":"康威定律","size":29}},
{"id":142,"index":3,"prop":{"name":"Jenkins","size":29}},
{"id":143,"index":3,"prop":{"name":"环境分离","size":29}},
{"id":144,"index":3,"prop":{"name":"Ansible","size":29}},
{"id":145,"index":3,"prop":{"name":"puppet","size":29}},
{"id":145,"index":3,"prop":{"name":"chef","size":29}},
{"id":144,"index":3,"prop":{"name":"TDD理论","size":29}},
{"id":145,"index":3,"prop":{"name":"单元测试","size":29}},
{"id":145,"index":3,"prop":{"name":"压力测试","size":29}},
{"id":144,"index":3,"prop":{"name":"全链路压测","size":29}},
{"id":145,"index":3,"prop":{"name":"A/B 、灰度、蓝绿测试","size":29}},
{"id":145,"index":3,"prop":{"name":"KVM","size":29}},
{"id":145,"index":3,"prop":{"name":"Xen","size":29}},
{"id":141,"index":3,"prop":{"name":"OpenVZ","size":29}},
{"id":142,"index":3,"prop":{"name":"Docker","size":29}},
{"id":143,"index":3,"prop":{"name":"OpenStack","size":29}},
{"id":144,"index":3,"prop":{"name":"Nginx","size":29}},
{"id":145,"index":3,"prop":{"name":"OpenResty","size":29}},
{"id":146,"index":3,"prop":{"name":"Tengine","size":29}},
{"id":147,"index":3,"prop":{"name":"Apache Httpd","size":29}},
{"id":148,"index":3,"prop":{"name":"Tomcat","size":29}},
{"id":149,"index":3,"prop":{"name":"Jetty","size":29}},
{"id":150,"index":3,"prop":{"name":"本地缓存","size":29}},
{"id":151,"index":3,"prop":{"name":"Web缓存","size":29}},
{"id":152,"index":3,"prop":{"name":"Memcached","size":29}},
{"id":153,"index":3,"prop":{"name":"Redis","size":29}},
{"id":154,"index":3,"prop":{"name":"Tair","size":29}},
{"id":155,"index":3,"prop":{"name":"消息总线","size":29}},
{"id":156,"index":3,"prop":{"name":"消息的顺序","size":29}},
{"id":157,"index":3,"prop":{"name":"RabbitMQ","size":29}},
{"id":158,"index":3,"prop":{"name":"RocketMQ","size":29}},
{"id":159,"index":3,"prop":{"name":"ActiveMQ","size":29}},
{"id":160,"index":3,"prop":{"name":"Kafka","size":29}},
{"id":161,"index":3,"prop":{"name":"Redis 消息推送","size":29}},
{"id":162,"index":3,"prop":{"name":"ZeroMQ","size":29}},
{"id":163,"index":3,"prop":{"name":"单机定时调度","size":29}},
{"id":164,"index":3,"prop":{"name":"分布式定时调度","size":29}},
{"id":165,"index":3,"prop":{"name":"Dubbo","size":29}},
{"id":166,"index":3,"prop":{"name":"Thrift","size":29}},
{"id":167,"index":3,"prop":{"name":"gRPC","size":29}},
{"id":168,"index":3,"prop":{"name":"Sharding Jdbc","size":29}},
{"id":169,"index":3,"prop":{"name":"日志搜集","size":29}},
{"id":170,"index":3,"prop":{"name":"OSI 七层协议","size":29}},
{"id":171,"index":3,"prop":{"name":"TCP/IP","size":29}},
{"id":172,"index":3,"prop":{"name":"HTTP","size":29}},
{"id":173,"index":3,"prop":{"name":"HTTP2.0","size":29}},
{"id":174,"index":3,"prop":{"name":"HTTPS","size":29}},
{"id":175,"index":3,"prop":{"name":"Epoll","size":29}},
{"id":176,"index":3,"prop":{"name":"Java NIO","size":29}},
{"id":177,"index":3,"prop":{"name":"kqueue","size":29}},
{"id":178,"index":3,"prop":{"name":"Hessian","size":29}},
{"id":179,"index":3,"prop":{"name":"Protobuf","size":29}},
{"id":180,"index":3,"prop":{"name":"原理","size":29}},
{"id":181,"index":3,"prop":{"name":"InnoDB","size":29}},
{"id":182,"index":3,"prop":{"name":"优化","size":29}},
{"id":183,"index":3,"prop":{"name":"索引","size":29}},
{"id":184,"index":3,"prop":{"name":"explain","size":29}},
{"id":185,"index":3,"prop":{"name":"MongoDB","size":29}},
{"id":186,"index":3,"prop":{"name":"Hbase","size":29}},
{"id":187,"index":3,"prop":{"name":"Storm","size":29}},
{"id":188,"index":3,"prop":{"name":"Flink","size":29}},
{"id":189,"index":3,"prop":{"name":"Kafka Stream","size":29}},
{"id":190,"index":3,"prop":{"name":"应用场景","size":29}},
{"id":191,"index":3,"prop":{"name":"HDFS","size":29}},
{"id":192,"index":3,"prop":{"name":"MapReduce","size":29}},
{"id":193,"index":3,"prop":{"name":"Yarn","size":29}},
{"id":194,"index":3,"prop":{"name":"XSS","size":29}},
{"id":195,"index":3,"prop":{"name":"CSRF","size":29}},
{"id":196,"index":3,"prop":{"name":"SQL 注入","size":29}},
{"id":197,"index":3,"prop":{"name":"Hash Dos","size":29}},
{"id":198,"index":3,"prop":{"name":"脚本注入","size":29}},
{"id":199,"index":3,"prop":{"name":"漏洞扫描工具","size":29}},
{"id":200,"index":3,"prop":{"name":"验证码","size":29}},
{"id":201,"index":3,"prop":{"name":"对称加密","size":29}},
{"id":202,"index":3,"prop":{"name":"哈希算法","size":29}},
{"id":203,"index":3,"prop":{"name":"非对称加密","size":29}},
{"id":204,"index":3,"prop":{"name":"数据备份","size":29}},
{"id":205,"index":3,"prop":{"name":"内外网分离","size":29}},
{"id":206,"index":3,"prop":{"name":"登录跳板机","size":29}},
{"id":207,"index":3,"prop":{"name":"RBAC","size":29}},
{"id":208,"index":3,"prop":{"name":"OAuth2.0","size":29}},
{"id":209,"index":3,"prop":{"name":"双因素认证2FA","size":29}},
{"id":210,"index":3,"prop":{"name":"单点登录(SSO)","size":29}},
{"id":211,"index":3,"prop":{"name":"Log4j、Log4j2","size":29}},
{"id":212,"index":3,"prop":{"name":"Logback","size":29}},
{"id":213,"index":3,"prop":{"name":"Spring 家族","size":29}},
{"id":214,"index":3,"prop":{"name":"硬件负载均衡","size":29}},
{"id":215,"index":3,"prop":{"name":"软件负载均衡","size":29}},
{"id":216,"index":3,"prop":{"name":"限流","size":29}},
{"id":217,"index":3,"prop":{"name":"应用层容灾","size":29}},
{"id":218,"index":3,"prop":{"name":"跨机房容灾","size":29}},
{"id":219,"index":3,"prop":{"name":"容灾演练流程","size":29}},
{"id":220,"index":3,"prop":{"name":"平滑启动","size":29}},
{"id":221,"index":3,"prop":{"name":"读写分离模式","size":29}},
{"id":222,"index":3,"prop":{"name":"分片模式","size":29}},
{"id":223,"index":3,"prop":{"name":"服务注册与发现","size":29}},
{"id":224,"index":3,"prop":{"name":"服务路由控制","size":29}},
{"id":225,"index":3,"prop":{"name":"CAP 与 BASE 理论","size":29}},
{"id":226,"index":3,"prop":{"name":"分布式锁","size":29}},
{"id":227,"index":3,"prop":{"name":"分布式一致性算法","size":29}},
{"id":228,"index":3,"prop":{"name":"幂等","size":29}},
{"id":229,"index":3,"prop":{"name":"分布式锁","size":29}},
{"id":230,"index":3,"prop":{"name":"分布式一致方案","size":29}},
{"id":231,"index":3,"prop":{"name":"TCC(Try/Confirm/Cancel) 柔性事务","size":29}},
{"id":232,"index":3,"prop":{"name":"全局唯一ID","size":29}},
{"id":233,"index":3,"prop":{"name":"命令查询职责分离(CQRS)","size":29}},
{"id":234,"index":3,"prop":{"name":"贫血,充血模型","size":29}},
{"id":235,"index":3,"prop":{"name":"Reactor","size":29}},
{"id":236,"index":3,"prop":{"name":"RxJava","size":29}},
{"id":237,"index":3,"prop":{"name":"Vert.x","size":29}}

查看文件

@@ -1,386 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="js/d3.min.js" ></script>
<script type="text/javascript" src="js/strucMap.min.js" ></script>
<link rel="stylesheet" href="css/strucMap.min.css" />
</head>
<body>
<div id="title" >后端架构师技术栈知识图谱</div>
<div id="topomap" style="margin: 0 auto;" ></div>
<script type="text/javascript">
var nodePX = 0;
var nodePY = 0;
var options = {
selector:"#topomap",
width: 1440,//实际展开图宽度
height: 1440,//实际展开图高度
lineLength:100,
// textColor:"#000",
// textFontFamily:'',
nodesClick: function(t) {
//if(t.index==0) t.fixed=1;//判断如果是第一级,移动后就将它固定
t.fixed = 1;
console.log(t);
var nodeX = JSON.parse(JSON.stringify(t.x));
var nodeY = JSON.parse(JSON.stringify(t.y));
//xy都没有变,说明没有拖动
if((nodeX == nodePX)&&(nodeY == nodePY)){
console.info("跳页面啦~~~~~~");
}
},
nodesDragstart:function(t) {
nodePX = JSON.parse(JSON.stringify(t.x));
nodePY = JSON.parse(JSON.stringify(t.y));
//console.log("移动开始",JSON.parse(JSON.stringify(t.x)),JSON.parse(JSON.stringify(t.y)));
}
};
var nodesJson = [{"fixed":true,"id":0,"index":0,"prop":{"name":"后端架构师技术图谱","size":32},"x":724,"y":616},
{"id":1,"index":1,"prop":{"name":"数据结构","size":25}},
{"id":2,"index":1,"prop":{"name":"常用算法","size":25}},
{"id":3,"index":1,"prop":{"name":"并发","size":25}},
{"id":4,"index":1,"prop":{"name":"操作系统","size":25}},
{"id":5,"index":1,"prop":{"name":"设计模式","size":25}},
{"id":6,"index":1,"prop":{"name":"运维","size":25}},
{"id":7,"index":1,"prop":{"name":"中间件","size":25}},
{"id":8,"index":1,"prop":{"name":"网络","size":25}},
{"id":9,"index":1,"prop":{"name":"数据库","size":25}},
{"id":10,"index":1,"prop":{"name":"搜索引擎","size":25}},
{"id":11,"index":1,"prop":{"name":"性能优化","size":25}},
{"id":12,"index":1,"prop":{"name":"大数据","size":25}},
{"id":13,"index":1,"prop":{"name":"安全","size":25}},
{"id":14,"index":1,"prop":{"name":"常用开源框架","size":25}},
{"id":15,"index":1,"prop":{"name":"分布式设计","size":25}},
{"id":16,"index":1,"prop":{"name":"设计思想&开发模式","size":25}},
{"id":17,"index":1,"prop":{"name":"项目管理","size":25}},
{"id":18,"index":2,"prop":{"name":"队列","size":15}},
{"id":19,"index":2,"prop":{"name":"集合","size":15}},
{"id":20,"index":2,"prop":{"name":"链表、数组","size":15}},
{"id":21,"index":2,"prop":{"name":"字典、关联数组","size":15}},
{"id":22,"index":2,"prop":{"name":"栈","size":15}},
{"id":23,"index":2,"prop":{"name":"树","size":15}},
{"id":24,"index":2,"prop":{"name":"BitSet","size":15}},
{"id":25,"index":2,"prop":{"name":"排序、查找算法","size":15}},
{"id":26,"index":2,"prop":{"name":"布隆过滤器","size":15}},
{"id":27,"index":2,"prop":{"name":"字符串比较","size":15}},
{"id":28,"index":2,"prop":{"name":"深度优先、广度优先","size":15}},
{"id":29,"index":2,"prop":{"name":"贪心算法","size":15}},
{"id":30,"index":2,"prop":{"name":"回溯算法","size":15}},
{"id":31,"index":2,"prop":{"name":"剪枝算法","size":15}},
{"id":32,"index":2,"prop":{"name":"动态规划","size":15}},
{"id":33,"index":2,"prop":{"name":"朴素贝叶斯","size":15}},
{"id":34,"index":2,"prop":{"name":"推荐算法","size":15}},
{"id":35,"index":2,"prop":{"name":"最小生成树算法","size":15}},
{"id":36,"index":2,"prop":{"name":"最短路径算法","size":15}},
{"id":37,"index":2,"prop":{"name":"Java 并发","size":15}},
{"id":38,"index":2,"prop":{"name":"多线程","size":15}},
{"id":39,"index":2,"prop":{"name":"线程安全","size":15}},
{"id":40,"index":2,"prop":{"name":"一致性、事务","size":15}},
{"id":41,"index":2,"prop":{"name":"锁","size":15}},
{"id":42,"index":2,"prop":{"name":"计算机原理","size":15}},
{"id":43,"index":2,"prop":{"name":"CPU","size":15}},
{"id":44,"index":2,"prop":{"name":"进程","size":15}},
{"id":45,"index":2,"prop":{"name":"线程","size":15}},
{"id":46,"index":2,"prop":{"name":"协程","size":15}},
{"id":47,"index":2,"prop":{"name":"Linux","size":15}},
{"id":48,"index":2,"prop":{"name":"设计模式的六大原则","size":15}},
{"id":49,"index":2,"prop":{"name":"23种常见设计模式","size":15}},
{"id":50,"index":2,"prop":{"name":"应用场景","size":15}},
{"id":51,"index":2,"prop":{"name":"单例模式","size":15}},
{"id":52,"index":2,"prop":{"name":"责任链模式","size":15}},
{"id":53,"index":2,"prop":{"name":"MVC","size":15}},
{"id":54,"index":2,"prop":{"name":"IOC","size":15}},
{"id":55,"index":2,"prop":{"name":"AOP","size":15}},
{"id":56,"index":2,"prop":{"name":"UML","size":15}},
{"id":57,"index":2,"prop":{"name":"微服务思想","size":15}},
{"id":58,"index":2,"prop":{"name":"常规监控","size":15}},
{"id":59,"index":2,"prop":{"name":"APM","size":15}},
{"id":60,"index":2,"prop":{"name":"持续集成(CI/CD)","size":15}},
{"id":61,"index":2,"prop":{"name":"自动化运维","size":15}},
{"id":62,"index":2,"prop":{"name":"测试","size":15}},
{"id":63,"index":2,"prop":{"name":"虚拟化","size":15}},
{"id":64,"index":2,"prop":{"name":"容器技术","size":15}},
{"id":65,"index":2,"prop":{"name":"云技术","size":15}},
{"id":66,"index":2,"prop":{"name":"统计分析","size":15}},
{"id":67,"index":2,"prop":{"name":"DevOps","size":15}},
{"id":68,"index":2,"prop":{"name":"文档管理","size":15}},
{"id":69,"index":2,"prop":{"name":"Web Server","size":15}},
{"id":70,"index":2,"prop":{"name":"缓存","size":15}},
{"id":71,"index":2,"prop":{"name":"客户端缓存","size":15}},
{"id":72,"index":2,"prop":{"name":"服务端缓存","size":15}},
{"id":73,"index":2,"prop":{"name":"消息队列","size":15}},
{"id":74,"index":2,"prop":{"name":"定时调度","size":15}},
{"id":75,"index":2,"prop":{"name":"数据库中间件","size":15}},
{"id":76,"index":2,"prop":{"name":"日志系统","size":15}},
{"id":77,"index":2,"prop":{"name":"配置中心","size":15}},
{"id":78,"index":2,"prop":{"name":"日志系统","size":15}},
{"id":79,"index":2,"prop":{"name":"API 网关","size":15}},
{"id":80,"index":2,"prop":{"name":"协议","size":15}},
{"id":81,"index":2,"prop":{"name":"网络模型","size":15}},
{"id":82,"index":2,"prop":{"name":"连接和短连接","size":15}},
{"id":83,"index":2,"prop":{"name":"框架","size":15}},
{"id":84,"index":2,"prop":{"name":"零拷贝Zero-copy","size":15}},
{"id":85,"index":2,"prop":{"name":"序列化(二进制协议)","size":15}},
{"id":86,"index":2,"prop":{"name":"基础理论","size":15}},
{"id":87,"index":2,"prop":{"name":"MySQL","size":15}},
{"id":88,"index":2,"prop":{"name":"Oracle","size":15}},
{"id":90,"index":2,"prop":{"name":"NoSQL","size":15}},
{"id":91,"index":2,"prop":{"name":"搜索引擎原理","size":15}},
{"id":92,"index":2,"prop":{"name":"Lucene","size":15}},
{"id":93,"index":2,"prop":{"name":"Elasticsearch","size":15}},
{"id":94,"index":2,"prop":{"name":"Solr","size":15}},
{"id":95,"index":2,"prop":{"name":"sphinx","size":15}},
{"id":96,"index":2,"prop":{"name":"性能优化方法论","size":15}},
{"id":97,"index":2,"prop":{"name":"容量评估","size":15}},
{"id":98,"index":2,"prop":{"name":"CDN 网络","size":15}},
{"id":99,"index":2,"prop":{"name":"连接池","size":15}},
{"id":100,"index":2,"prop":{"name":"性能调优","size":15}},
{"id":101,"index":2,"prop":{"name":"流式计算","size":15}},
{"id":102,"index":2,"prop":{"name":"Hadoop","size":15}},
{"id":103,"index":2,"prop":{"name":"Spark","size":15}},
{"id":104,"index":2,"prop":{"name":"web 安全","size":15}},
{"id":105,"index":2,"prop":{"name":"WDDoS 防范","size":15}},
{"id":106,"index":2,"prop":{"name":"用户隐私信息保护","size":15}},
{"id":107,"index":2,"prop":{"name":"序列化漏洞","size":15}},
{"id":108,"index":2,"prop":{"name":"加密解密","size":15}},
{"id":109,"index":2,"prop":{"name":"服务器安全","size":15}},
{"id":110,"index":2,"prop":{"name":"数据安全","size":15}},
{"id":111,"index":2,"prop":{"name":"网络隔离","size":15}},
{"id":112,"index":2,"prop":{"name":"授权、认证","size":15}},
{"id":113,"index":2,"prop":{"name":"开源协议","size":15}},
{"id":114,"index":2,"prop":{"name":"日志框架","size":15}},
{"id":115,"index":2,"prop":{"name":"ORM","size":15}},
{"id":116,"index":2,"prop":{"name":"网络框架","size":15}},
{"id":117,"index":2,"prop":{"name":"Web 框架","size":15}},
{"id":118,"index":2,"prop":{"name":"工具框架","size":15}},
{"id":119,"index":2,"prop":{"name":"扩展性设计","size":15}},
{"id":120,"index":2,"prop":{"name":"稳定性&高可用","size":15}},
{"id":121,"index":2,"prop":{"name":"数据库扩展","size":15}},
{"id":122,"index":2,"prop":{"name":"服务治理","size":15}},
{"id":123,"index":2,"prop":{"name":"分布式一致","size":15}},
{"id":124,"index":2,"prop":{"name":"分布式文件系统","size":15}},
{"id":125,"index":2,"prop":{"name":"唯一ID生成","size":15}},
{"id":126,"index":2,"prop":{"name":"一致性Hash算法","size":15}},
{"id":127,"index":2,"prop":{"name":"DDD(Domain-driven Design - 领域驱动设计","size":15}},
{"id":128,"index":2,"prop":{"name":"Actor 模式","size":15}},
{"id":115,"index":2,"prop":{"name":"响应式编程","size":15}},
{"id":130,"index":2,"prop":{"name":"分布式文件系统","size":15}},
{"id":131,"index":2,"prop":{"name":"DODAF2.0","size":15}},
{"id":132,"index":2,"prop":{"name":"Serverless","size":15}},
{"id":133,"index":2,"prop":{"name":"Service Mesh","size":15}},
{"id":134,"index":2,"prop":{"name":"架构评审","size":15}},
{"id":135,"index":2,"prop":{"name":"重构","size":15}},
{"id":136,"index":2,"prop":{"name":"代码规范","size":15}},
{"id":137,"index":2,"prop":{"name":"代码 Review","size":15}},
{"id":138,"index":2,"prop":{"name":"RUP","size":15}},
{"id":139,"index":2,"prop":{"name":"看板管理","size":15}},
{"id":140,"index":2,"prop":{"name":"SCRUM","size":15}},
{"id":141,"index":2,"prop":{"name":"敏捷开发","size":15}},
{"id":142,"index":2,"prop":{"name":"极限编程XP","size":15}},
{"id":143,"index":2,"prop":{"name":"结对编程","size":15}},
{"id":144,"index":2,"prop":{"name":"PDCA 循环质量管理","size":15}},
{"id":145,"index":2,"prop":{"name":"FMEA管理模式","size":15}},
];
//source和target都是按照数组的顺序来的,下标
var linksJson = [
{"source":0,"target":1,},
{"source":0,"target":2,},
{"source":0,"target":3,},
{"source":0,"target":4,},
{"source":0,"target":5,},
{"source":0,"target":6,},
{"source":0,"target":7,},
{"source":0,"target":8,},
{"source":0,"target":9,},
{"source":0,"target":10,},
{"source":0,"target":11,},
{"source":0,"target":12,},
{"source":0,"target":13,},
{"source":0,"target":14,},
{"source":0,"target":15,},
{"source":0,"target":16,},
{"source":0,"target":17,},
{"source":1,"target":18,},
{"source":1,"target":19,},
{"source":1,"target":20,},
{"source":1,"target":21,},
{"source":1,"target":22,},
{"source":1,"target":23,},
{"source":1,"target":24,},
{"source":2,"target":25,},
{"source":2,"target":26,},
{"source":2,"target":27,},
{"source":2,"target":28,},
{"source":2,"target":29,},
{"source":2,"target":30,},
{"source":2,"target":31,},
{"source":2,"target":32,},
{"source":2,"target":33,},
{"source":2,"target":34,},
{"source":2,"target":35,},
{"source":2,"target":36,},
{"source":3,"target":37,},
{"source":3,"target":38,},
{"source":3,"target":39,},
{"source":3,"target":40,},
{"source":3,"target":41,},
{"source":4,"target":42,},
{"source":4,"target":43,},
{"source":4,"target":44,},
{"source":4,"target":45,},
{"source":4,"target":46,},
{"source":4,"target":47,},
{"source":5,"target":48,},
{"source":5,"target":49,},
{"source":5,"target":50,},
{"source":5,"target":51,},
{"source":5,"target":52,},
{"source":5,"target":53,},
{"source":5,"target":54,},
{"source":5,"target":55,},
{"source":5,"target":56,},
{"source":5,"target":57,},
{"source":6,"target":58,},
{"source":6,"target":59,},
{"source":6,"target":60,},
{"source":6,"target":61,},
{"source":6,"target":62,},
{"source":6,"target":63,},
{"source":6,"target":64,},
{"source":6,"target":65,},
{"source":6,"target":66,},
{"source":6,"target":67,},
{"source":6,"target":68,},
{"source":7,"target":69,},
{"source":7,"target":70,},
{"source":7,"target":71,},
{"source":7,"target":72,},
{"source":7,"target":73,},
{"source":7,"target":74,},
{"source":7,"target":75,},
{"source":7,"target":76,},
{"source":7,"target":77,},
{"source":7,"target":78,},
{"source":7,"target":79,},
{"source":8,"target":80,},
{"source":8,"target":81,},
{"source":8,"target":82,},
{"source":8,"target":83,},
{"source":8,"target":84,},
{"source":8,"target":85,},
{"source":9,"target":86,},
{"source":9,"target":87,},
{"source":9,"target":88,},
{"source":9,"target":89,},
{"source":9,"target":90,},
{"source":10,"target":91,},
{"source":10,"target":92,},
{"source":10,"target":93,},
{"source":10,"target":94,},
{"source":10,"target":95,},
{"source":11,"target":96,},
{"source":11,"target":97,},
{"source":11,"target":98,},
{"source":11,"target":99,},
{"source":11,"target":100,},
{"source":12,"target":101,},
{"source":12,"target":102,},
{"source":12,"target":103,},
{"source":13,"target":104,},
{"source":13,"target":105,},
{"source":13,"target":106,},
{"source":13,"target":107,},
{"source":13,"target":108,},
{"source":13,"target":109,},
{"source":13,"target":110,},
{"source":13,"target":111,},
{"source":13,"target":112,},
{"source":14,"target":113,},
{"source":14,"target":114,},
{"source":14,"target":115,},
{"source":14,"target":116,},
{"source":14,"target":117,},
{"source":14,"target":118,},
{"source":15,"target":119,},
{"source":15,"target":120,},
{"source":15,"target":121,},
{"source":15,"target":122,},
{"source":15,"target":123,},
{"source":15,"target":124,},
{"source":15,"target":125,},
{"source":15,"target":126,},
{"source":16,"target":127,},
{"source":16,"target":128,},
{"source":16,"target":129,},
{"source":16,"target":130,},
{"source":16,"target":131,},
{"source":16,"target":132,},
{"source":16,"target":133,},
{"source":17,"target":134,},
{"source":17,"target":135,},
{"source":17,"target":136,},
{"source":17,"target":137,},
{"source":17,"target":138,},
{"source":17,"target":139,},
{"source":17,"target":140,},
{"source":17,"target":141,},
{"source":17,"target":142,},
{"source":17,"target":143,},
{"source":17,"target":144,}
];
console.log("初始化打印",linksJson);
loadMap(options, nodesJson, linksJson);
</script>
</body>
</html>

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 575 KiB

5
kg/js/d3.min.js vendored

文件差异因一行或多行过长而隐藏

117
kg/js/strucMap.min.js vendored
查看文件

@@ -1,117 +0,0 @@
function loadMap(options, nodesJson, linkJson) {
debugger;
var t = options,
a = nodesJson,
n = linkJson,
c = ["#1f77b4", "#ff7f0e", "#2ca02c", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"],
l = t.width,
i = t.height,
o = d3.select(t.selector).append("svg").attr({
id: "map",
width: l,
height: i
}),
s = o.append("g"),
u = d3.layout.force();
u.on("tick", function() {
s.selectAll("line.link").each(function(t) {
var e, r, a, n, c = d3.select(this);
if("NEXT" == t.type) {
var l = t.target.x - t.source.x,
i = t.target.y - t.source.y,
o = Math.sqrt(l * l + i * i),
s = l / o,
u = i / o,
d = 35,
f = 35;
e = t.source.x + d * s, r = t.target.x - f * s, a = t.source.y + d * u, n = t.target.y - f * u, c.attr("marker-end", "url(#arrow)")
} else e = t.source.x, a = t.source.y, r = t.target.x, n = t.target.y;
c.attr("x1", e), c.attr("x2", r), c.attr("y1", a), c.attr("y2", n)
}), s.selectAll("g.node").selectAll("circle.ring").attr({
cx: function(t) {
return t.x
},
cy: function(t) {
return t.y
}
}), s.selectAll("g.node").selectAll("circle.outline").attr({
cx: function(t) {
return t.x
},
cy: function(t) {
return t.y
}
}), s.selectAll("g.node").selectAll("text.nTxt").attr({
x: function(t) {
return t.x - 15
},
y: function(t) {
return t.y + 6
}
}), s.selectAll("g.node").selectAll("text.propName").attr({
x: function(t) {
return t.x - 35
},
y: function(t) {
return t.y - 35
}
}), d.attr({
x: function(t) {
return(t.source.x + t.target.x) / 2 - 25
},
y: function(t) {
return(t.source.y + t.target.y) / 2 + 5
},
transform: function(t) {
var e = t.target.x - t.source.x,
r = t.target.y - t.source.y,
a = 360 * Math.atan(r / e) / (2 * Math.PI),
n = (t.target.x + t.source.x) / 2,
c = (t.target.y + t.source.y) / 2;
return "rotate(" + a + "," + n + "," + c + ")"
}
})
}).charge(-1300).linkDistance(t.lineLength || 200).nodes(a).links(n).size([l, i]).alpha(.1), o.append("svg:defs").append("svg:marker").attr("id", "arrow").attr("viewBox", "0 -5 10 10").attr("refX", 6).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("svg:path").attr("d", "M0,-5L10,0L0,5").attr("fill", "#6ac6ff"), s.selectAll("line.link").data(n).enter().append("line").attr("class", "link");
var d = s.selectAll("link.desc").data(n).enter().append("text").attr("class", "desc").text(function(t) {
return t.desc
}),
f = (u.drag().on("dragstart", function(t) {
t.fixed = !0;
options.nodesDragstart(t)
}), s.selectAll("g.node").data(a)),
p = f.enter().append("g").attr("class", function(t, e) {
return 0 === e ? "node active" : "node"
}).call(u.drag).on("click", function(t) {
t.fixed = 0;
options.nodesClick(t)
});
p.append("circle").attr({
r: 17,
class: "ring"
}), p.append("circle").attr({
r: function(t){
return t.prop.size
},
class: "outline"
}).style({
fill: function(t) {
return c[t.index]
},
//r: t.prop.size,//12~30
stroke: "#5CA8DB",
"stroke-width": "2px"
}), p.append("text").attr("class", "nTxt").text(function(t) {
return t.prop.nTxt
}).style({
fill: "black"
}), p.append("text").attr("class", "propName").text(function(t) {
return t.prop.name //球上面的文字
}).style({
fill: t.textColor || "black",
"font-family": t.textFontFamily || "arial, tahoma, 'Microsoft Yahei', '\5b8b\4f53', sans-serif"
}), u.start();
for(var x = 0; x < 50; x++) u.tick();
var g = setInterval(function() {
u.alpha() < .01 ? clearInterval(g) : u.tick()
}, 80)
}

查看文件

@@ -2,3 +2,4 @@ gensim
flask flask
flasgger flasgger
jieba jieba
pyhanlp

119
src/get_words.py 普通文件
查看文件

@@ -0,0 +1,119 @@
from pyhanlp import *
import gc
def group_consecutives(vals, step=1):
"""Return list of consecutive lists of numbers from vals (number list)."""
run = []
result = [run]
expect = None
for v in vals:
if (v == expect) or (expect is None):
run.append(v)
else:
run = [v]
result.append(run)
expect = v + step
return result
def find_word(text, words, del_status):
CustomDictionary = JClass("com.hankcs.hanlp.dictionary.CustomDictionary")
if len(words) != 0:
for element in words:
CustomDictionary.add(element)
sentence = HanLP.parseDependency(text)
data = []
word_array = sentence.getWordArray()
word_cut = []
status = []
location = []
# print(seg_text)
# print(len(word_array))
for i, word in enumerate(word_array):
# print("%s --(%s)--> %s" % (word.LEMMA, word.DEPREL, word.HEAD.LEMMA))
word_cut.append(word.LEMMA)
# if word.DEPREL == "定中关系" or word.DEPREL == "动宾关系":
# if word.DEPREL == "动宾关系" and word.LEMMA+word.HEAD.LEMMA not in text:
# data.append([i, word.HEAD.LEMMA, word.DEPREL, word.LEMMA])
# else:
# data.append([i, word.LEMMA, word.DEPREL, word.HEAD.LEMMA])
if word.DEPREL == "定中关系":
data.append([i, word.LEMMA, word.DEPREL, word.HEAD.LEMMA])
elif word.DEPREL == "右附加关系":
status.append([word.HEAD.LEMMA, word.HEAD.LEMMA + word.LEMMA])
if status:
for element in data:
for element_one in status:
if element_one[0] in element[1] and element_one[1] + element[3] in text:
element[1] = element_one[1]
for element in data:
if element[1] + element[3] not in text:
continue
else:
location.append(element[0])
location_split = group_consecutives(location)
result = []
if location_split is not []:
for children in location_split:
ans_data = ""
if len(children) > 1:
for child in children:
for element in data:
if element[0] == child:
ans_data = ans_data + element[1]
for element in data:
if element[0] == children[len(children) - 1]:
ans_data = ans_data + element[3]
elif data is not [] and children != []:
for element in data:
if element[0] == children[0]:
ans_data = element[1] + element[3]
if ans_data:
result.append(ans_data)
if del_status == 0:
del words
del sentence
del word_array
for x in locals().keys():
del locals()[x]
gc.collect()
return result, word_cut
def text_get(text, words):
f = "add_words.txt"
with open(f, encoding="utf8") as f_data:
all_text = f_data.readlines()
f_data.close()
with open(f, "a+") as file:
if words != []:
for i in words:
temp = str(i) + "\n"
if temp not in all_text:
file.write(temp)
file.close()
# words = []
seg_data = []
count = 0
new_word = []
while True:
result, word_cut = find_word(text, words, 1)
seg_data.append(word_cut)
words.extend(result)
new_word.append([result, count])
count = count + 1
if len(result) == 0 or count > 6:
break
for x in locals().keys():
del locals()[x]
gc.collect()
CustomDictionary = JClass("com.hankcs.hanlp.dictionary.CustomDictionary")
for element in words:
CustomDictionary.remove(element)
return new_word, seg_data
# print(text_get("症状80%以上的患者在短时间内突然发生呼吸困难、烦躁不安、多汗、心悸、胸痛。",["抗凝药物"]))

查看文件

@@ -29,4 +29,4 @@ def to_kg():
if __name__ == '__main__': if __name__ == '__main__':
app.run('0.0.0.0', port=8020) app.run('0.0.0.0', port=8020)
~