Skip to content

Commit 6b48652

Browse files
committed
v0.0.2
1 parent 0521949 commit 6b48652

4 files changed

Lines changed: 63 additions & 24 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
__pycache__/
33
build/
44
dist/
5-
.DS_Store
5+
.DS_Store
6+
stripnet.egg-info/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ STriP Net stands on the shoulder of giants and several prior work. The most nota
6464
If this work helped you in any way, please consider the following way to give me feedback so I can spend more time on this project
6565
1. ⭐ this repository
6666
2. ❤️ [the Huggingface space ](https://huggingface.co/spaces/stephenleo/strip)
67-
3. 📖 [Buy me a Book!](https://www.buymeacoffee.com/stephenleo)
67+
3. [Buy me a Coffee!](https://www.buymeacoffee.com/stephenleo)

notebook/test.ipynb

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,30 +87,30 @@
8787
},
8888
{
8989
"cell_type": "code",
90-
"execution_count": 4,
90+
"execution_count": 2,
9191
"metadata": {},
9292
"outputs": [
9393
{
9494
"name": "stderr",
9595
"output_type": "stream",
9696
"text": [
97-
"2022-01-05 20:26:31 INFO: Load pretrained SentenceTransformer: allenai-specter\n",
98-
"2022-01-05 20:26:49 INFO: Use pytorch device: cuda\n",
99-
"2022-01-05 20:26:49 INFO: Missing data detected. Dropping them\n",
100-
"2022-01-05 20:26:49 INFO: ========== Step1: Calculating Embeddings ==========\n",
101-
"Batches: 100%|██████████| 3/3 [00:02<00:00, 1.43it/s]\n",
102-
"2022-01-05 20:26:52 INFO: ========== Step2: Topic modeling ==========\n",
103-
"2022-01-05 20:26:52 INFO: Initializing the topic model\n",
104-
"2022-01-05 20:26:52 INFO: Training the topic model\n",
105-
"2022-01-05 20:26:54,313 - BERTopic - Reduced dimensionality with UMAP\n",
106-
"2022-01-05 20:26:54,324 - BERTopic - Clustered UMAP embeddings with HDBSCAN\n",
107-
"2022-01-05 20:26:54 INFO: Populating Topic Results\n",
108-
"2022-01-05 20:26:54 INFO: ========== Step3: STriP Network ==========\n",
109-
"2022-01-05 20:26:54 INFO: Cosine similarity\n",
110-
"2022-01-05 20:26:54 INFO: Calculating optimal threshold\n",
111-
"2022-01-05 20:26:54 INFO: Number of connections: 126\n",
112-
"2022-01-05 20:26:54 INFO: Calculating Network Plot\n",
113-
"2022-01-05 20:26:54 INFO: ========== Model Fit Successfully! ==========\n"
97+
"2022-01-05 20:42:12 INFO: Load pretrained SentenceTransformer: allenai-specter\n",
98+
"2022-01-05 20:42:36 INFO: Use pytorch device: cuda\n",
99+
"2022-01-05 20:42:36 INFO: Missing data detected. Dropping them\n",
100+
"2022-01-05 20:42:36 INFO: ========== Step1: Calculating Embeddings ==========\n",
101+
"Batches: 100%|██████████| 3/3 [00:02<00:00, 1.17it/s]\n",
102+
"2022-01-05 20:42:41 INFO: ========== Step2: Topic modeling ==========\n",
103+
"2022-01-05 20:42:41 INFO: Initializing the topic model\n",
104+
"2022-01-05 20:42:41 INFO: Training the topic model\n",
105+
"2022-01-05 20:42:50,425 - BERTopic - Reduced dimensionality with UMAP\n",
106+
"2022-01-05 20:42:50,437 - BERTopic - Clustered UMAP embeddings with HDBSCAN\n",
107+
"2022-01-05 20:42:50 INFO: Populating Topic Results\n",
108+
"2022-01-05 20:42:50 INFO: ========== Step3: STriP Network ==========\n",
109+
"2022-01-05 20:42:50 INFO: Cosine similarity\n",
110+
"2022-01-05 20:42:50 INFO: Calculating optimal threshold\n",
111+
"2022-01-05 20:42:50 INFO: Number of connections: 126\n",
112+
"2022-01-05 20:42:50 INFO: Calculating Network Plot\n",
113+
"2022-01-05 20:42:50 INFO: ========== Model Fit Successfully! ==========\n"
114114
]
115115
},
116116
{
@@ -1141,6 +1141,35 @@
11411141
"stripnet.most_important()"
11421142
]
11431143
},
1144+
{
1145+
"cell_type": "code",
1146+
"execution_count": 3,
1147+
"metadata": {},
1148+
"outputs": [
1149+
{
1150+
"data": {
1151+
"text/plain": [
1152+
"['bertopic==0.9.4',\n",
1153+
" 'networkx==2.6.3',\n",
1154+
" 'numpy==1.22.0',\n",
1155+
" 'pandas==1.3.5',\n",
1156+
" 'plotly==5.5.0',\n",
1157+
" 'pyvis==0.1.9',\n",
1158+
" 'scikit_learn==1.0.2',\n",
1159+
" 'sentence_transformers==2.1.0',\n",
1160+
" 'setuptools==58.0.4']"
1161+
]
1162+
},
1163+
"execution_count": 3,
1164+
"metadata": {},
1165+
"output_type": "execute_result"
1166+
}
1167+
],
1168+
"source": [
1169+
"import pathlib\n",
1170+
"pathlib.Path(\"../requirements.txt\").read_text().splitlines()"
1171+
]
1172+
},
11441173
{
11451174
"cell_type": "code",
11461175
"execution_count": null,

setup.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44
with open("README.md", "r", encoding="utf-8") as fh:
55
long_description = fh.read()
66

7-
required_packages = (pathlib.Path(__file__).parent / "requirements.txt").read_text().splitlines()
7+
# required_packages = (pathlib.Path(__file__).parent / "requirements.txt").read_text().splitlines()
8+
required_packages = ['bertopic==0.9.4',
9+
'networkx==2.6.3',
10+
'numpy==1.22.0',
11+
'pandas==1.3.5',
12+
'plotly==5.5.0',
13+
'pyvis==0.1.9',
14+
'scikit_learn==1.0.2',
15+
'sentence_transformers==2.1.0',
16+
'setuptools==58.0.4']
817

918
setuptools.setup(
10-
name="stripnet",
11-
version="0.0.1",
19+
name="stripnet",
20+
version="0.0.2",
1221
author="stephenleo",
1322
author_email="stephen.leo87@gmail.com",
1423
description="STriP Net: Semantic Similarity of Scientific Papers (S3P) Network",
@@ -27,4 +36,4 @@
2736
"Operating System :: OS Independent",
2837
],
2938
python_requires='>=3.6, <3.9',
30-
)
39+
)

0 commit comments

Comments
 (0)