XufengDuan commited on
Commit
15fa40a
1 Parent(s): 7e4e9e6

update scripts

Browse files
.idea/workspace.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="b60b8d5d-762f-4021-9ce4-054078cb27a7" name="Changes" comment="">
8
+ <change beforePath="$PROJECT_DIR$/src/backend/model_operations.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/backend/model_operations.py" afterDir="false" />
9
+ </list>
10
+ <option name="SHOW_DIALOG" value="false" />
11
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+ <option name="LAST_RESOLUTION" value="IGNORE" />
14
+ </component>
15
+ <component name="PropertiesComponent"><![CDATA[{
16
+ "keyToString": {
17
+ "git-widget-placeholder": "main",
18
+ "node.js.selected.package.tslint": "(autodetect)"
19
+ }
20
+ }]]></component>
21
+ <component name="TaskManager">
22
+ <servers />
23
+ </component>
24
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
25
+ <SUITE FILE_PATH="coverage/HumanLikeness$.coverage" NAME=" Coverage Results" MODIFIED="1723441364832" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tests" />
26
+ <SUITE FILE_PATH="coverage/HumanLikeness$model_operations.coverage" NAME="model_operations Coverage Results" MODIFIED="1723534770448" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/backend" />
27
+ <SUITE FILE_PATH="coverage/HumanLikeness$app.coverage" NAME="app Coverage Results" MODIFIED="1723380005800" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
28
+ <SUITE FILE_PATH="coverage/HumanLikeness$main_backend.coverage" NAME="main_backend Coverage Results" MODIFIED="1723534420423" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
29
+ <SUITE FILE_PATH="coverage/HumanLikeness$evaluate_humanlike.coverage" NAME="evaluate_humanlike Coverage Results" MODIFIED="1723398170634" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/../Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/32b9ff35361847f45b1e7909fcdff84c/Message/MessageTemp/7420e97876942c1eea73293c47ebb239/OpenData" />
30
+ <SUITE FILE_PATH="coverage/HumanLikeness$humanlike.coverage" NAME="humanlike Coverage Results" MODIFIED="1723535841643" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
31
+ <SUITE FILE_PATH="coverage/HumanLikeness$envs.coverage" NAME="envs Coverage Results" MODIFIED="1723400161997" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
32
+ <SUITE FILE_PATH="coverage/HumanLikeness$test.coverage" NAME="test Coverage Results" MODIFIED="1723535341716" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
33
+ </component>
34
+ </project>
src/backend/model_operations.py CHANGED
@@ -31,6 +31,10 @@ from scipy.spatial.distance import jensenshannon
31
  import numpy as np
32
  import spacy_transformers
33
 
 
 
 
 
34
 
35
 
36
 
 
31
  import numpy as np
32
  import spacy_transformers
33
 
34
+ import subprocess
35
+
36
+ # Run the command to download the spaCy model
37
+ subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"], check=True)
38
 
39
 
40