faizhalas commited on
Commit
1c732f3
·
verified ·
1 Parent(s): 00d6cca

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +239 -72
Home.py CHANGED
@@ -28,10 +28,10 @@ mt1, mt2 = st.tabs(["Menu", "How to"])
28
  with mt1:
29
  col1, col2, col3 = st.columns(3)
30
  with col1.container(border=True):
31
- st.markdown("![Stemming](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/lemma.png)")
32
- if st.button("Go to Keywords Stem"):
33
- st.switch_page("pages/6 Keywords Stem.py")
34
-
35
  with col2.container(border=True):
36
  st.markdown("![Topic modeling](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/topicmodeling.png)")
37
  if st.button("Go to Topic Modeling"):
@@ -53,15 +53,30 @@ with mt1:
53
  st.switch_page("pages/5 Burst Detection.py")
54
 
55
  with col3.container(border=True):
56
- st.markdown("![Scattertext](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/scattertext.png)")
57
- if st.button("Go to Scattertext"):
58
- st.switch_page("pages/1 Scattertext.py")
59
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  with mt2:
61
  st.header("Before you start", anchor=False)
62
  option = st.selectbox(
63
  'Please choose....',
64
- ('Keyword Stem', 'Topic Modeling', 'Bidirected Network', 'Sunburst', 'Burst Detection', 'Scattertext'))
65
 
66
  if option == 'Keyword Stem':
67
  tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Result"])
@@ -81,7 +96,7 @@ with mt2:
81
  st.error("Please check what has changed. It's possible some keywords failed to find their roots.", icon="🚨")
82
 
83
  with tab3:
84
- st.text("""
85
  +----------------+------------------------+---------------------------------+
86
  | Source | File Type | Column |
87
  +----------------+------------------------+---------------------------------+
@@ -94,28 +109,32 @@ with mt2:
94
  | Lens.org | Comma-separated values | Keywords (Scholarly Works) |
95
  | | (.csv) | |
96
  +----------------+------------------------+---------------------------------+
 
 
 
97
  | Other | .csv | Change your column to 'Keyword' |
98
  +----------------+------------------------+---------------------------------+
99
- """)
100
-
101
- with tab4:
102
- st.subheader(':blue[Result]', anchor=False)
103
- st.button('Press to download result 👈')
104
- st.text("Go to Result and click Download button.")
105
-
106
- st.divider()
107
- st.subheader(':blue[List of Keywords]', anchor=False)
108
- st.button('Press to download keywords 👈')
109
- st.text("Go to List of Keywords and click Download button.")
 
 
110
 
111
  elif option == 'Topic Modeling':
112
- tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
113
  with tab1:
114
  st.write("Topic modeling has numerous advantages for librarians in different aspects of their work. A crucial benefit is an ability to quickly organize and categorize a huge volume of textual content found in websites, institutional archives, databases, emails, and reference desk questions. Librarians can use topic modeling approaches to automatically identify the primary themes or topics within these documents, making navigating and retrieving relevant information easier. Librarians can identify and understand the prevailing topics of discussion by analyzing text data with topic modeling tools, allowing them to assess user feedback, tailor their services to meet specific needs and make informed decisions about collection development and resource allocation. Making ontologies, automatic subject classification, recommendation services, bibliometrics, altmetrics, and better resource searching and retrieval are a few examples of topic modeling. To do topic modeling on other text like chats and surveys, change the column name to 'Abstract' in your file.")
115
  st.divider()
116
  st.write('💡 The idea came from this:')
117
  st.write('Lamba, M., & Madhusudhan, M. (2021, July 31). Topic Modeling. Text Mining for Information Professionals, 105–137. https://doi.org/10.1007/978-3-030-85085-2_4')
118
-
119
  with tab2:
120
  st.text("1. Put your file. Choose your preferred column.")
121
  st.text("2. Choose your preferred method. LDA is the most widely used, whereas Biterm is appropriate for short text, and BERTopic works well for large text data as well as supports more than 50+ languages.")
@@ -123,7 +142,7 @@ with mt2:
123
  st.error("This app includes lemmatization and stopwords for the abstract text. Currently, we only offer English words.", icon="💬")
124
 
125
  with tab3:
126
- st.text("""
127
  +----------------+------------------------+----------------------------------+
128
  | Source | File Type | Column |
129
  +----------------+------------------------+----------------------------------+
@@ -137,26 +156,32 @@ with mt2:
137
  | | (.csv) | |
138
  +----------------+------------------------| |
139
  | Other | .csv | |
 
 
140
  +----------------+------------------------+----------------------------------+
141
- """)
142
-
143
  with tab4:
144
- st.subheader(':blue[pyLDA]', anchor=False)
145
- st.button('Download image')
146
- st.text("Click Download Image button.")
147
-
148
- st.divider()
149
- st.subheader(':blue[Biterm]', anchor=False)
150
- st.text("Click the three dots at the top right then select the desired format.")
151
- st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_biterm.jpg)")
152
-
153
- st.divider()
154
- st.subheader(':blue[BERTopic]', anchor=False)
155
- st.text("Click the camera icon on the top right menu")
156
- st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bertopic.jpg)")
 
 
 
 
157
 
158
  elif option == 'Bidirected Network':
159
- tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Graph"])
160
  with tab1:
161
  st.write("The use of network text analysis by librarians can be quite beneficial. Finding hidden correlations and connections in textual material is a significant advantage. Using network text analysis tools, librarians can improve knowledge discovery, obtain deeper insights, and support scholars meaningfully, ultimately enhancing the library's services and resources. This menu provides a two-way relationship instead of the general network of relationships to enhance the co-word analysis. Since it is based on ARM, you may obtain transactional data information using this menu. Please name the column in your file 'Keyword' instead.")
162
  st.divider()
@@ -175,7 +200,7 @@ with mt2:
175
  st.error("If the table contains many rows, the network will take more time to process. Please use it efficiently.", icon="⌛")
176
 
177
  with tab3:
178
- st.text("""
179
  +----------------+------------------------+---------------------------------+
180
  | Source | File Type | Column |
181
  +----------------+------------------------+---------------------------------+
@@ -188,31 +213,38 @@ with mt2:
188
  | Lens.org | Comma-separated values | Keywords (Scholarly Works) |
189
  | | (.csv) | |
190
  +----------------+------------------------+---------------------------------+
 
 
 
191
  | Other | .csv | Change your column to 'Keyword' |
192
  | | | and separate the words with ';' |
193
  +----------------+------------------------+---------------------------------+
194
- """)
 
 
195
 
196
- with tab4:
197
- st.subheader(':blue[Bidirected Network]', anchor=False)
198
- st.text("Zoom in, zoom out, or shift the nodes as desired, then right-click and select Save image as ...")
199
- st.markdown("![Downloading graph](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bidirected.jpg)")
200
-
 
 
201
 
202
  elif option == 'Sunburst':
203
- tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
204
  with tab1:
205
  st.write("Sunburst's ability to present a thorough and intuitive picture of complex hierarchical data is an essential benefit. Librarians can easily browse and grasp the relationships between different levels of the hierarchy by employing sunburst visualizations. Sunburst visualizations can also be interactive, letting librarians and users drill down into certain categories or subcategories for further information. This interactive and visually appealing depiction improves the librarian's understanding of the collection and provides users with an engaging and user-friendly experience, resulting in improved information retrieval and decision-making.")
206
 
207
  with tab2:
208
- st.text("1. Put your Scopus CSV file.")
209
  st.text("2. You can set the range of years to see how it changed.")
210
  st.text("3. The sunburst has 3 levels. The inner circle is the type of data, meanwhile, the middle is the source title and the outer is the year the article was published.")
211
  st.text("4. The size of the slice depends on total documents. The average of inner and middle levels is calculated by formula below:")
212
  st.code('avg = sum(a * weights) / sum(weights)', language='python')
213
 
214
  with tab3:
215
- st.text("""
216
  +----------------+------------------------+--------------------+
217
  | Source | File Type | Column |
218
  +----------------+------------------------+--------------------+
@@ -227,12 +259,17 @@ with mt2:
227
  | | | Source Title, |
228
  | | | Citing Works Count |
229
  +----------------+------------------------+--------------------+
230
- """)
 
 
231
 
232
  with tab4:
233
- st.subheader(':blue[Sunburst]', anchor=False)
234
- st.text("Click the camera icon on the top right menu")
235
- st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bertopic.jpg)")
 
 
 
236
 
237
  elif option == 'Burst Detection':
238
  tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
@@ -241,16 +278,15 @@ with mt2:
241
  st.divider()
242
  st.write('💡 The idea came from this:')
243
  st.write('Kleinberg, J. (2002). Bursty and hierarchical structure in streams. Knowledge Discovery and Data Mining. https://doi.org/10.1145/775047.775061')
244
-
245
  with tab2:
246
  st.text("1. Put your file. Choose your preferred column to analyze.")
247
- st.text("2. Choose your preferred method to count the words and decide how many top words you want to include or remove.")
248
- st.text("3. Choose your preferred visualization: line graph or square scatter plot.")
249
- st.text("4. Finally, you can visualize your data.")
250
  st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
251
-
252
  with tab3:
253
- st.text("""
254
  +----------------+------------------------+----------------------------------+
255
  | Source | File Type | Column |
256
  +----------------+------------------------+----------------------------------+
@@ -264,26 +300,28 @@ with mt2:
264
  | | (.csv) | |
265
  +----------------+------------------------| |
266
  | Other | .csv | |
 
 
267
  +----------------+------------------------+----------------------------------+
268
- """)
269
-
270
  with tab4:
271
  st.subheader(':blue[Burst Detection]', anchor=False)
272
- st.button('📊 Download high resolution image')
273
  st.text("Click download button.")
274
-
275
  st.divider()
276
  st.subheader(':blue[Top words]', anchor=False)
277
- st.button('👉 Press to download list of top words')
278
  st.text("Click download button.")
279
-
280
  st.divider()
281
  st.subheader(':blue[Burst]', anchor=False)
282
- st.button('👉 Press to download the list of detected bursts')
283
  st.text("Click download button.")
284
 
285
  elif option == 'Scattertext':
286
- tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
287
  with tab1:
288
  st.write("Scattertext is an open-source tool designed to visualize linguistic variations between document categories in a language-independent way. It presents a scatterplot, with each axis representing the rank-frequency of a term's occurrence within a category of documents.")
289
  st.divider()
@@ -297,7 +335,49 @@ with mt2:
297
  st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
298
 
299
  with tab3:
300
- st.text("""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  +----------------+------------------------+----------------------------------+
302
  | Source | File Type | Column |
303
  +----------------+------------------------+----------------------------------+
@@ -311,9 +391,96 @@ with mt2:
311
  | | (.csv) | |
312
  +----------------+------------------------| |
313
  | Other | .csv | |
 
 
314
  +----------------+------------------------+----------------------------------+
315
- """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
 
317
  with tab4:
318
- st.subheader(':blue[Scattertext]', anchor=False)
319
- st.write("Click the :blue[Download SVG] on the right side.")
 
28
  with mt1:
29
  col1, col2, col3 = st.columns(3)
30
  with col1.container(border=True):
31
+ st.markdown("![Scattertext](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/scattertext.png)")
32
+ if st.button("Go to Scattertext"):
33
+ st.switch_page("pages/1 Scattertext.py")
34
+
35
  with col2.container(border=True):
36
  st.markdown("![Topic modeling](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/topicmodeling.png)")
37
  if st.button("Go to Topic Modeling"):
 
53
  st.switch_page("pages/5 Burst Detection.py")
54
 
55
  with col3.container(border=True):
56
+ st.markdown("![Stemming](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/lemma.png)")
57
+ if st.button("Go to Keywords Stem"):
58
+ st.switch_page("pages/6 Keywords Stem.py")
59
+
60
+ with col1.container(border=True):
61
+ st.markdown("![Sentiment](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/sentiment.png)")
62
+ if st.button("Go to Sentiment Analysis"):
63
+ st.switch_page("pages/7 Sentiment Analysis.py")
64
+
65
+ with col2.container(border=True):
66
+ st.markdown("![Shifterator](https://raw.githubusercontent.com/faizhalas/library-tools/refs/heads/main/images/shifterator.png)")
67
+ if st.button("Go to Shifterator"):
68
+ st.switch_page("pages/8 Shifterator.py")
69
+
70
+ with col3.container(border=True):
71
+ st.markdown("![WordCloud](https://raw.githubusercontent.com/faizhalas/library-tools/refs/heads/main/images/wordcloud.png)")
72
+ if(st.button("Go to WordCloud")):
73
+ st.switch_page("pages/9 WordCloud.py")
74
+
75
  with mt2:
76
  st.header("Before you start", anchor=False)
77
  option = st.selectbox(
78
  'Please choose....',
79
+ ('Scattertext', 'Topic Modeling', 'Bidirected Network', 'Sunburst', 'Burst Detection', 'Keyword Stem', 'Sentiment Analysis', 'Shifterator', 'WordCloud'))
80
 
81
  if option == 'Keyword Stem':
82
  tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Result"])
 
96
  st.error("Please check what has changed. It's possible some keywords failed to find their roots.", icon="🚨")
97
 
98
  with tab3:
99
+ st.code("""
100
  +----------------+------------------------+---------------------------------+
101
  | Source | File Type | Column |
102
  +----------------+------------------------+---------------------------------+
 
109
  | Lens.org | Comma-separated values | Keywords (Scholarly Works) |
110
  | | (.csv) | |
111
  +----------------+------------------------+---------------------------------+
112
+ | Dimensions | Comma-separated values | MeSH terms |
113
+ | | (.csv) | |
114
+ +----------------+------------------------+---------------------------------+
115
  | Other | .csv | Change your column to 'Keyword' |
116
  +----------------+------------------------+---------------------------------+
117
+ | Hathitrust | .json | htid (Hathitrust ID) |
118
+ +----------------+------------------------+---------------------------------+
119
+ """, language=None)
120
+
121
+ with tab4:
122
+ st.subheader(':blue[Result]', anchor=False)
123
+ st.button('Click to download result 👈.')
124
+ st.text("Go to Result and click Download button.")
125
+
126
+ st.divider()
127
+ st.subheader(':blue[List of Keywords]', anchor=False)
128
+ st.button('Click to download keywords 👈.')
129
+ st.text("Go to List of Keywords and click Download button.")
130
 
131
  elif option == 'Topic Modeling':
132
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download"])
133
  with tab1:
134
  st.write("Topic modeling has numerous advantages for librarians in different aspects of their work. A crucial benefit is an ability to quickly organize and categorize a huge volume of textual content found in websites, institutional archives, databases, emails, and reference desk questions. Librarians can use topic modeling approaches to automatically identify the primary themes or topics within these documents, making navigating and retrieving relevant information easier. Librarians can identify and understand the prevailing topics of discussion by analyzing text data with topic modeling tools, allowing them to assess user feedback, tailor their services to meet specific needs and make informed decisions about collection development and resource allocation. Making ontologies, automatic subject classification, recommendation services, bibliometrics, altmetrics, and better resource searching and retrieval are a few examples of topic modeling. To do topic modeling on other text like chats and surveys, change the column name to 'Abstract' in your file.")
135
  st.divider()
136
  st.write('💡 The idea came from this:')
137
  st.write('Lamba, M., & Madhusudhan, M. (2021, July 31). Topic Modeling. Text Mining for Information Professionals, 105–137. https://doi.org/10.1007/978-3-030-85085-2_4')
 
138
  with tab2:
139
  st.text("1. Put your file. Choose your preferred column.")
140
  st.text("2. Choose your preferred method. LDA is the most widely used, whereas Biterm is appropriate for short text, and BERTopic works well for large text data as well as supports more than 50+ languages.")
 
142
  st.error("This app includes lemmatization and stopwords for the abstract text. Currently, we only offer English words.", icon="💬")
143
 
144
  with tab3:
145
+ st.code("""
146
  +----------------+------------------------+----------------------------------+
147
  | Source | File Type | Column |
148
  +----------------+------------------------+----------------------------------+
 
156
  | | (.csv) | |
157
  +----------------+------------------------| |
158
  | Other | .csv | |
159
+ +----------------+------------------------| |
160
+ | Hathitrust | .json | |
161
  +----------------+------------------------+----------------------------------+
162
+ """, language=None)
163
+
164
  with tab4:
165
+ st.subheader(':blue[pyLDA]', anchor=False)
166
+ st.button('Download image.', on_click=None)
167
+ st.text("Click Download Image button.")
168
+
169
+ st.divider()
170
+ st.subheader(':blue[Biterm]', anchor=False)
171
+ st.text("Click the three dots at the top right then select the desired format.")
172
+ st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_biterm.jpg)")
173
+
174
+ st.divider()
175
+ st.subheader(':blue[BERTopic]', anchor=False)
176
+ st.text("Click the camera icon on the top right menu")
177
+ st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bertopic.jpg)")
178
+ st.divider()
179
+ st.subheader(':blue[CSV Result]', anchor=False)
180
+ st.text("Click Download button")
181
+ st.button('Download Results.',on_click=None)
182
 
183
  elif option == 'Bidirected Network':
184
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download"])
185
  with tab1:
186
  st.write("The use of network text analysis by librarians can be quite beneficial. Finding hidden correlations and connections in textual material is a significant advantage. Using network text analysis tools, librarians can improve knowledge discovery, obtain deeper insights, and support scholars meaningfully, ultimately enhancing the library's services and resources. This menu provides a two-way relationship instead of the general network of relationships to enhance the co-word analysis. Since it is based on ARM, you may obtain transactional data information using this menu. Please name the column in your file 'Keyword' instead.")
187
  st.divider()
 
200
  st.error("If the table contains many rows, the network will take more time to process. Please use it efficiently.", icon="⌛")
201
 
202
  with tab3:
203
+ st.code("""
204
  +----------------+------------------------+---------------------------------+
205
  | Source | File Type | Column |
206
  +----------------+------------------------+---------------------------------+
 
213
  | Lens.org | Comma-separated values | Keywords (Scholarly Works) |
214
  | | (.csv) | |
215
  +----------------+------------------------+---------------------------------+
216
+ | Dimensions | Comma-separated values | MeSH terms |
217
+ | | (.csv) | |
218
+ +----------------+------------------------+---------------------------------+
219
  | Other | .csv | Change your column to 'Keyword' |
220
  | | | and separate the words with ';' |
221
  +----------------+------------------------+---------------------------------+
222
+ | Hathitrust | .json | htid (Hathitrust ID) |
223
+ +----------------+------------------------+---------------------------------+
224
+ """, language=None)
225
 
226
+ with tab4:
227
+ st.subheader(":blue[Download visualization]", anchor=False)
228
+ st.text("Zoom in, zoom out, or shift the nodes as desired, then right-click and select Save image as ...")
229
+ st.markdown("![Downloading graph](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bidirected.jpg)")
230
+ st.subheader(":blue[Download table as CSV]", anchor=False)
231
+ st.text("Hover cursor over table, and click download arrow")
232
+ st.markdown("![Downloading table](https://raw.githubusercontent.com/faizhalas/library-tools/refs/heads/main/images/tablenetwork.png)")
233
 
234
  elif option == 'Sunburst':
235
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download"])
236
  with tab1:
237
  st.write("Sunburst's ability to present a thorough and intuitive picture of complex hierarchical data is an essential benefit. Librarians can easily browse and grasp the relationships between different levels of the hierarchy by employing sunburst visualizations. Sunburst visualizations can also be interactive, letting librarians and users drill down into certain categories or subcategories for further information. This interactive and visually appealing depiction improves the librarian's understanding of the collection and provides users with an engaging and user-friendly experience, resulting in improved information retrieval and decision-making.")
238
 
239
  with tab2:
240
+ st.text("1. Put your CSV file.")
241
  st.text("2. You can set the range of years to see how it changed.")
242
  st.text("3. The sunburst has 3 levels. The inner circle is the type of data, meanwhile, the middle is the source title and the outer is the year the article was published.")
243
  st.text("4. The size of the slice depends on total documents. The average of inner and middle levels is calculated by formula below:")
244
  st.code('avg = sum(a * weights) / sum(weights)', language='python')
245
 
246
  with tab3:
247
+ st.code("""
248
  +----------------+------------------------+--------------------+
249
  | Source | File Type | Column |
250
  +----------------+------------------------+--------------------+
 
259
  | | | Source Title, |
260
  | | | Citing Works Count |
261
  +----------------+------------------------+--------------------+
262
+ | Hathitrust | .json | htid(Hathitrust ID)|
263
+ +----------------+------------------------+--------------------+
264
+ """, language=None)
265
 
266
  with tab4:
267
+ st.subheader(':blue[Sunburst]', anchor=False)
268
+ st.text("Click the camera icon on the top right menu (you may need to hover your cursor within the visualization)")
269
+ st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_bertopic.jpg)")
270
+ st.subheader(":blue[Download table as CSV]", anchor=False)
271
+ st.text("Hover cursor over table, and click download arrow")
272
+ st.markdown("![Downloading table](https://raw.githubusercontent.com/faizhalas/library-tools/refs/heads/main/images/tablenetwork.png)")
273
 
274
  elif option == 'Burst Detection':
275
  tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
 
278
  st.divider()
279
  st.write('💡 The idea came from this:')
280
  st.write('Kleinberg, J. (2002). Bursty and hierarchical structure in streams. Knowledge Discovery and Data Mining. https://doi.org/10.1145/775047.775061')
281
+
282
  with tab2:
283
  st.text("1. Put your file. Choose your preferred column to analyze.")
284
+ st.text("2. Choose your preferred method to compare.")
285
+ st.text("3. Finally, you can visualize your data.")
 
286
  st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
287
+
288
  with tab3:
289
+ st.code("""
290
  +----------------+------------------------+----------------------------------+
291
  | Source | File Type | Column |
292
  +----------------+------------------------+----------------------------------+
 
300
  | | (.csv) | |
301
  +----------------+------------------------| |
302
  | Other | .csv | |
303
+ +----------------+------------------------| |
304
+ | Hathitrust | .json | |
305
  +----------------+------------------------+----------------------------------+
306
+ """, language=None)
307
+
308
  with tab4:
309
  st.subheader(':blue[Burst Detection]', anchor=False)
310
+ st.button('📊 Download high resolution image.')
311
  st.text("Click download button.")
312
+
313
  st.divider()
314
  st.subheader(':blue[Top words]', anchor=False)
315
+ st.button('👉 Click to download list of top words.')
316
  st.text("Click download button.")
317
+
318
  st.divider()
319
  st.subheader(':blue[Burst]', anchor=False)
320
+ st.button('👉 Click to download the list of detected bursts.')
321
  st.text("Click download button.")
322
 
323
  elif option == 'Scattertext':
324
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download"])
325
  with tab1:
326
  st.write("Scattertext is an open-source tool designed to visualize linguistic variations between document categories in a language-independent way. It presents a scatterplot, with each axis representing the rank-frequency of a term's occurrence within a category of documents.")
327
  st.divider()
 
335
  st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
336
 
337
  with tab3:
338
+ st.code("""
339
+ +----------------+------------------------+----------------------------------+
340
+ | Source | File Type | Column |
341
+ +----------------+------------------------+----------------------------------+
342
+ | Scopus | Comma-separated values | Choose your preferred column |
343
+ | | (.csv) | that you have |
344
+ +----------------+------------------------| |
345
+ | Web of Science | Tab delimited file | |
346
+ | | (.txt) | |
347
+ +----------------+------------------------| |
348
+ | Lens.org | Comma-separated values | |
349
+ | | (.csv) | |
350
+ +----------------+------------------------| |
351
+ | Other | .csv | |
352
+ +----------------+------------------------| |
353
+ | Hathitrust | .json | |
354
+ +----------------+------------------------+----------------------------------+
355
+ """, language=None)
356
+
357
+ with tab4:
358
+ st.subheader(':blue[Image]', anchor=False)
359
+ st.write("Click the :blue[Download SVG] on the right side.")
360
+ st.divider()
361
+ st.subheader(':blue[Scattertext Dataframe]', anchor=False)
362
+ st.button('📥 Click to download result.', on_click=None)
363
+ st.text("Click the Download button to get the CSV result.")
364
+
365
+
366
+ elif option == 'Sentiment Analysis':
367
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download"])
368
+ with tab1:
369
+ st.write('Sentiment analysis uses natural language processing to identify patterns in large text datasets, revealing the writer’s opinions, emotions, and attitudes. It assesses subjectivity (objective vs. subjective), polarity (positive, negative, neutral), and emotions (e.g., anger, joy, sadness, surprise, jealousy).')
370
+ st.divider()
371
+ st.write('💡 The idea came from this:')
372
+ st.write('Lamba, M., & Madhusudhan, M. (2021, July 31). Sentiment Analysis. Text Mining for Information Professionals, 191–211. https://doi.org/10.1007/978-3-030-85085-2_7')
373
+
374
+ with tab2:
375
+ st.write("1. Put your file. Choose your prefered column to analyze")
376
+ st.write("2. Choose your preferred method and decide which words you want to remove")
377
+ st.write("3. Finally, you can visualize your data.")
378
+
379
+ with tab3:
380
+ st.code("""
381
  +----------------+------------------------+----------------------------------+
382
  | Source | File Type | Column |
383
  +----------------+------------------------+----------------------------------+
 
391
  | | (.csv) | |
392
  +----------------+------------------------| |
393
  | Other | .csv | |
394
+ +----------------+------------------------| |
395
+ | Hathitrust | .json | |
396
  +----------------+------------------------+----------------------------------+
397
+ """, language=None)
398
+
399
+ with tab4:
400
+ st.subheader(':blue[Sentiment Analysis]', anchor=False)
401
+ st.write("Click the three dots at the top right then select the desired format")
402
+ st.markdown("![Downloading visualization](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/download_sentiment.png)")
403
+ st.divider()
404
+ st.subheader(':blue[CSV Results]', anchor=False)
405
+ st.text("Click Download button")
406
+ st.markdown("![Downloading results](https://raw.githubusercontent.com/faizhalas/library-tools/main/images/sentitable.png)")
407
+
408
+ elif option == 'Shifterator':
409
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
410
+ with tab1:
411
+ st.write("Shifterator is a tool that helps compare two pieces of text by showing which words make them different, and in what way. It uses clear bar chart visuals, called word shift graphs, to explain these differences. You can use it to compare texts directly, analyze sentiment, or even as a more reliable alternative to word clouds.")
412
+ st.divider()
413
+ st.write('💡 The idea came from this:')
414
+ st.write('Gallagher, R.J., Frank, M.R., Mitchell, L. et al. (2021). Generalized Word Shift Graphs: A Method for Visualizing and Explaining Pairwise Comparisons Between Texts. EPJ Data Science, 10(4). https://doi.org/10.1140/epjds/s13688-021-00260-3')
415
+
416
+ with tab2:
417
+ st.text("1. Put your file. Choose your preferred column to analyze.")
418
+ st.text("2. Choose your preferred method to count the words and decide how many top words you want to include or remove.")
419
+ st.text("3. Finally, you can visualize your data.")
420
+ st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
421
+
422
+ with tab3:
423
+ st.code("""
424
+ +----------------+------------------------+----------------------------------+
425
+ | Source | File Type | Column |
426
+ +----------------+------------------------+----------------------------------+
427
+ | Scopus | Comma-separated values | Choose your preferred column |
428
+ | | (.csv) | that you have to analyze and |
429
+ +----------------+------------------------| and need a column called "Year" |
430
+ | Web of Science | Tab delimited file | |
431
+ | | (.txt) | |
432
+ +----------------+------------------------| |
433
+ | Lens.org | Comma-separated values | |
434
+ | | (.csv) | |
435
+ +----------------+------------------------| |
436
+ | Other | .csv | |
437
+ +----------------+------------------------| |
438
+ | Hathitrust | .json | |
439
+ +----------------+------------------------+----------------------------------+
440
+ """, language=None)
441
+
442
+ with tab4:
443
+ st.subheader(':blue[Shifterator]', anchor=False)
444
+ st.button('📥 Download Graph.', on_click="ignore")
445
+ st.text("Click Download Graph button.")
446
+
447
+ st.divider()
448
+ st.subheader(':blue[Shifterator Dataframe]', anchor=False)
449
+ st.button('📥 Press to download result.', on_click="ignore")
450
+ st.text("Click the Download button to get the CSV result.")
451
+
452
+
453
+ elif option == 'WordCloud':
454
+ tab1, tab2, tab3, tab4 = st.tabs(["Prologue", "Steps", "Requirements", "Download Visualization"])
455
+ with tab1:
456
+ st.write("A word cloud is a simple yet powerful way to see which words appear most often in a collection of text. Words that occur more frequently are shown larger, giving you an at-a-glance view of the key themes and topics. While it doesn’t provide deep analysis, a word cloud is a quick and intuitive tool to spot trends & highlight important terms")
457
+ st.divider()
458
+ st.write('💡 The idea came from this:')
459
+ st.write('Mueller, A. (2012). A Wordcloud in Python. Peekaboo. Available at: https://peekaboo-vision.blogspot.com/2012/11/a-wordcloud-in-python.html.')
460
+
461
+ with tab2:
462
+ st.text("1. Put your file. Choose your preferred column to analyze (if CSV).")
463
+ st.text("2. Choose your preferred method to count the words and decide how many top words you want to include or remove.")
464
+ st.text("3. Finally, you can visualize your data.")
465
+ st.error("This app includes lemmatization and stopwords. Currently, we only offer English words.", icon="💬")
466
+
467
+ with tab3:
468
+ st.code("""
469
+ +----------------+------------------------+
470
+ | Source | File Type |
471
+ +----------------+------------------------+
472
+ | Scopus | Comma-separated values |
473
+ | | (.csv) |
474
+ +----------------+------------------------|
475
+ | Lens.org | Comma-separated values |
476
+ | | (.csv) |
477
+ +----------------+------------------------|
478
+ | Other | .csv/ .txt(full text) |
479
+ +----------------+------------------------|
480
+ | Hathitrust | .json |
481
+ +----------------+------------------------+
482
+ """, language=None)
483
 
484
  with tab4:
485
+ st.subheader(':blue[WordCloud Download]', anchor=False)
486
+ st.write("Right-click image and click \"Save-as\"")