增加百度相似度

这个提交包含在:
lidunwei
2020-10-07 22:41:37 +08:00
父节点 6bde4ea8b6
当前提交 89e3b783ab
共有 5 个文件被更改,包括 122 次插入263 次删除

1
.gitignore vendored
查看文件

@@ -8,3 +8,4 @@ cmake_install.cmake
install_manifest.txt install_manifest.txt
compile_commands.json compile_commands.json
CTestTestfile.cmake CTestTestfile.cmake
config.py

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

@@ -2,11 +2,10 @@
<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="jdk" jdkName="Python 3.6.6 (E:\python+\python\envs\lidunwei\python.exe)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="TestRunnerService"> <component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" /> <option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component> </component>
</module> </module>

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

@@ -1,64 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="818087ba-af84-4167-ab4f-8ca76742a4b1" name="Default" comment=""> <list default="true" id="818087ba-af84-4167-ab4f-8ca76742a4b1" name="Default" comment="">
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/README.md" afterPath="" /> <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/css/strucMap.min.css" afterPath="" /> <change beforePath="$PROJECT_DIR$/.idea/Medical-nlp.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/Medical-nlp.iml" afterDir="false" />
<change type="DELETED" beforePath="$PROJECT_DIR$/kg/file/3.json" afterPath="" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<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> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" 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="FileTemplateManagerImpl">
<component name="FileEditorManager"> <option name="RECENT_TEMPLATES">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="375"> <list>
<file leaf-file-name="tenxun.py" pinned="false" current-in-tab="false"> <option value="Python Script" />
<entry file="file://$PROJECT_DIR$/src/tenxun.py"> </list>
<provider selected="true" editor-type-id="text-editor"> </option>
<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>
<component name="FindInProjectRecents"> <component name="FindInProjectRecents">
<findStrings> <findStrings>
@@ -69,157 +45,82 @@
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="IdeDocumentHistory"> <component name="ProjectId" id="1gymoaX2ed0sYMmC69w3x0sbgUs" />
<option name="CHANGED_PATHS"> <component name="ProjectViewState">
<list> <option name="hideEmptyMiddlePackages" value="true" />
<option value="$PROJECT_DIR$/del.txt" /> <option name="showLibraryContents" value="true" />
<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>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" /> <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component> </component>
<component name="RunDashboard"> <component name="RunManager" selected="Python.text_sim">
<option name="ruleStates"> <configuration name="baidu" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<list> <module name="Medical-nlp" />
<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="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />
<envs> <envs>
<env name="PYTHONUNBUFFERED" value="1" /> <env name="PYTHONUNBUFFERED" value="1" />
</envs> </envs>
<option name="SDK_HOME" value="" /> <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
<option name="IS_MODULE_SDK" value="false" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/baidu.py" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" /> <option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<method /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<configuration default="true" type="Tox" factoryName="Tox"> <configuration name="text_sim" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="Medical-nlp" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />
<envs /> <envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" /> <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
<option name="IS_MODULE_SDK" value="false" /> <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/text_sim.py" />
<method /> <option name="PARAMETERS" value="" />
</configuration> <option name="SHOW_COMMAND_LINE" value="false" />
<configuration default="true" type="tests" factoryName="Doctests"> <option name="EMULATE_TERMINAL" value="false" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="MODULE_MODE" value="false" />
<option name="PARENT_ENVS" value="true" /> <option name="REDIRECT_INPUT" value="false" />
<envs /> <option name="INPUT_FILE" value="" />
<option name="SDK_HOME" value="" /> <method v="2" />
<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>
<configuration default="true" type="tests" factoryName="Nosetests"> <configuration default="true" type="tests" factoryName="Nosetests">
<module name="Medical-nlp" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />
<envs />
<option name="SDK_HOME" value="" /> <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="" /> <option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" /> <option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" />
<module name="Medical-nlp" />
<option name="_new_regexPattern" value="&quot;&quot;" /> <option name="_new_regexPattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" /> <option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;.&quot;" /> <option name="_new_target" value="&quot;.&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" /> <option name="_new_targetType" value="&quot;PATH&quot;" />
<method /> <method v="2" />
</configuration> </configuration>
<recent_temporary>
<list>
<item itemvalue="Python.text_sim" />
<item itemvalue="Python.baidu" />
</list>
</recent_temporary>
</component> </component>
<component name="ShelveChangesManager" show_recycled="false"> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<option name="remove_strategy" value="false" />
</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="" /> <changelist id="818087ba-af84-4167-ab4f-8ca76742a4b1" name="Default" comment="" />
@@ -230,101 +131,37 @@
</task> </task>
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="Vcs.Log.Tabs.Properties">
<frame x="-9" y="-9" width="1938" height="1048" extended-state="0" /> <option name="TAB_STATES">
<editor active="true" /> <map>
<layout> <entry key="MAIN">
<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" /> <value>
<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" /> <State />
<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" /> </value>
<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" /> </entry>
<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" /> </map>
<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" /> </option>
<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>
<component name="VcsContentAnnotationSettings"> <component name="WindowStateProjectService">
<option name="myLimit" value="2678400000" /> <state width="1515" height="210" key="GridCell.Tab.0.bottom" timestamp="1602081661544">
</component> <screen x="0" y="0" width="1536" height="824" />
<component name="XDebuggerManager"> </state>
<breakpoint-manager /> <state width="1515" height="210" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1602081661544" />
<watches-manager /> <state width="1515" height="210" key="GridCell.Tab.0.center" timestamp="1602081661544">
</component> <screen x="0" y="0" width="1536" height="824" />
<component name="editorHistoryManager"> </state>
<entry file="file://$PROJECT_DIR$/src/tenxun.py"> <state width="1515" height="210" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1602081661544" />
<provider selected="true" editor-type-id="text-editor"> <state width="1515" height="210" key="GridCell.Tab.0.left" timestamp="1602081661544">
<state relative-caret-position="0"> <screen x="0" y="0" width="1536" height="824" />
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> </state>
<folding> <state width="1515" height="210" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1602081661544" />
<element signature="e#0#38#0" expanded="true" /> <state width="1515" height="210" key="GridCell.Tab.0.right" timestamp="1602081661544">
</folding> <screen x="0" y="0" width="1536" height="824" />
</state> </state>
</provider> <state width="1515" height="210" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1602081661544" />
</entry> <state x="431" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1599057981367">
<entry file="file://$PROJECT_DIR$/src/tenxun.py"> <screen x="0" y="0" width="1536" height="824" />
<provider selected="true" editor-type-id="text-editor"> </state>
<state relative-caret-position="0"> <state x="431" y="145" width="672" height="678" key="search.everywhere.popup/0.0.1536.824@0.0.1536.824" timestamp="1599057981367" />
<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> </component>
</project> </project>

二进制
__pycache__/config.cpython-37.pyc 普通文件

二进制文件未显示。

22
src/baidu.py 普通文件
查看文件

@@ -0,0 +1,22 @@
from aip import AipNlp
from config import Config
def baidu_sim(text1, text2):
"""
百度词语相似度
:param text1: 词语1
:param text2: 词语2
:return: 相似度
"""
APP_ID = Config.APP_ID
API_KEY = Config.API_KEY
SECRET_KEY = Config.SECRET_KEY
# options = {}
# options["model"] = "CNN"
client = AipNlp(APP_ID, API_KEY, SECRET_KEY)
result = client.simnet(text1, text2)
if "score" in result:
return {"score": result['score']}
else:
return {"error": "error"}