Skip to content

Commit a957b0b

Browse files
committed
fixing docs
1 parent 5c4ed8e commit a957b0b

File tree

5 files changed

+186
-194
lines changed

5 files changed

+186
-194
lines changed

docs/load-topic-modelling.rst

Lines changed: 86 additions & 88 deletions
Large diffs are not rendered by default.

docs/load-topics-influencers.rst

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
.. code:: ipython3
2+
.. code:: python
33
44
import malaya
55
6-
.. code:: ipython3
6+
.. code:: python
77
88
news = 'najib razak dan mahathir mengalami masalah air di kemamam terengganu'
99
second_news = 'ikat penyedia perkhidmatan jalur lebar Telekom Malaysia (TM) perlu mencari jalan penyelesaian bagi meningkatkan akses capaian Internet ke seluruh negara, kata Menteri Komunikasi dan Multimedia, Gobind Singh Deo. Beliau berkata menjadi dasar kerajaan untuk membekalkan akses Internet jalur lebar kepada semua dan memberi penekanan kepada kualiti perkhidmatan yang terbaik. "Dasar kerajaan untuk bekalkan akses kepada semua bukan sekadar pembekalan sahaja tetapi beri penekanan kepada kualiti perkhidmatan yang baik dan dapat bersaing dengan negara lain pada tahap antarabangsa," kata Gobind Singh menerusi catatan di laman rasmi Twitter beliau, malam tadi. Beliau berkata demikian sebagai respons terhadap aduan beberapa pengguna Twitter berhubung akses Internet yang masih tidak stabil serta harga yang tidak berpatutan di beberapa lokasi di seluruh negara.'
1010
1111
Using fuzzy for topics
1212
----------------------
1313

14-
.. code:: ipython3
14+
.. code:: python
1515
1616
malaya.topic_influencer.fuzzy_topic(news)
1717
@@ -24,7 +24,7 @@ Using fuzzy for topics
2424
2525
2626
27-
.. code:: ipython3
27+
.. code:: python
2828
2929
malaya.topic_influencer.fuzzy_topic(second_news)
3030
@@ -49,7 +49,7 @@ Using fuzzy for topics
4949
Using fuzzy for influencers
5050
---------------------------
5151

52-
.. code:: ipython3
52+
.. code:: python
5353
5454
malaya.topic_influencer.fuzzy_influencer(news)
5555
@@ -62,7 +62,7 @@ Using fuzzy for influencers
6262
6363
6464
65-
.. code:: ipython3
65+
.. code:: python
6666
6767
malaya.topic_influencer.fuzzy_influencer(second_news)
6868
@@ -78,7 +78,7 @@ Using fuzzy for influencers
7878
Using fuzzy for location
7979
------------------------
8080

81-
.. code:: ipython3
81+
.. code:: python
8282
8383
malaya.topic_influencer.fuzzy_location('saya suka makan sate di sungai petani')
8484
@@ -94,7 +94,7 @@ Using fuzzy for location
9494
Check location from a string
9595
----------------------------
9696

97-
.. code:: ipython3
97+
.. code:: python
9898
9999
malaya.topic_influencer.is_location('sungai petani')
100100
@@ -110,11 +110,11 @@ Check location from a string
110110
Train TF-IDF for topics analysis
111111
--------------------------------
112112

113-
.. code:: ipython3
113+
.. code:: python
114114
115115
topics_similarity = malaya.topic_influencer.fast_topic()
116116
117-
.. code:: ipython3
117+
.. code:: python
118118
119119
topics_similarity.get_similarity(news)
120120
@@ -133,11 +133,11 @@ Train TF-IDF for topics analysis
133133
Train TF-IDF for influencers analysis
134134
-------------------------------------
135135

136-
.. code:: ipython3
136+
.. code:: python
137137
138138
influencers_similarity = malaya.topic_influencer.fast_influencer()
139139
140-
.. code:: ipython3
140+
.. code:: python
141141
142142
influencers_similarity.get_similarity(news)
143143
@@ -153,7 +153,7 @@ Train TF-IDF for influencers analysis
153153
154154
155155
156-
.. code:: ipython3
156+
.. code:: python
157157
158158
influencers_similarity.get_similarity(second_news)
159159
@@ -176,7 +176,7 @@ Train TF-IDF for influencers analysis
176176
Train skip-thought model for topics analysis
177177
--------------------------------------------
178178

179-
.. code:: ipython3
179+
.. code:: python
180180
181181
deep_topic = malaya.topic_influencer.skipthought_topic()
182182
@@ -190,7 +190,7 @@ Train skip-thought model for topics analysis
190190
minibatch loop: 100%|██████████| 157/157 [01:44<00:00, 1.70it/s, cost=0.00152]
191191
192192
193-
.. code:: ipython3
193+
.. code:: python
194194
195195
deep_topic.get_similarity(news, anchor = 0.5)
196196
@@ -211,7 +211,7 @@ Train skip-thought model for topics analysis
211211
212212
213213
214-
.. code:: ipython3
214+
.. code:: python
215215
216216
deep_topic.get_similarity(second_news, anchor = 0.5)
217217
@@ -237,7 +237,7 @@ Train skip-thought model for topics analysis
237237
Train skip-thought model for influencers analysis
238238
-------------------------------------------------
239239

240-
.. code:: ipython3
240+
.. code:: python
241241
242242
deep_influencer = malaya.topic_influencer.skipthought_influencer()
243243
@@ -256,7 +256,7 @@ Train skip-thought model for influencers analysis
256256
minibatch loop: 100%|██████████| 20/20 [00:12<00:00, 1.62it/s, cost=0.219]
257257
258258
259-
.. code:: ipython3
259+
.. code:: python
260260
261261
deep_influencer.get_similarity(news, anchor = 0.5)
262262
@@ -269,7 +269,7 @@ Train skip-thought model for influencers analysis
269269
270270
271271
272-
.. code:: ipython3
272+
.. code:: python
273273
274274
deep_influencer.get_similarity(second_news, anchor = 0.5)
275275
@@ -285,7 +285,7 @@ Train skip-thought model for influencers analysis
285285
Train siamese network for topics analysis
286286
-----------------------------------------
287287

288-
.. code:: ipython3
288+
.. code:: python
289289
290290
deep_topic = malaya.topic_influencer.siamese_topic()
291291
print(deep_topic.get_similarity(news, anchor = 0.5))
@@ -294,11 +294,11 @@ Train siamese network for topics analysis
294294
295295
.. parsed-literal::
296296
297-
minibatch loop: 100%|██████████| 157/157 [01:50<00:00, 1.67it/s, accuracy=1, cost=0.114]
298-
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.69it/s, accuracy=1, cost=0.0739]
299-
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.66it/s, accuracy=1, cost=0.0686]
300-
minibatch loop: 100%|██████████| 157/157 [01:50<00:00, 1.68it/s, accuracy=1, cost=0.0279]
301-
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.70it/s, accuracy=1, cost=0.0193]
297+
minibatch loop: 100%|██████████| 157/157 [01:50<00:00, 1.67it/s, accuracy=1, cost=0.114]
298+
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.69it/s, accuracy=1, cost=0.0739]
299+
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.66it/s, accuracy=1, cost=0.0686]
300+
minibatch loop: 100%|██████████| 157/157 [01:50<00:00, 1.68it/s, accuracy=1, cost=0.0279]
301+
minibatch loop: 100%|██████████| 157/157 [01:49<00:00, 1.70it/s, accuracy=1, cost=0.0193]
302302
303303
304304
.. parsed-literal::
@@ -307,7 +307,7 @@ Train siamese network for topics analysis
307307
['politik', 'kkmm', 'bumiputra', 'malaysia-indonesia', 'menteri pertahanan', 'motogp', 'programming language', 'twitter', 'lgbt', 'gaji menteri', 'singapura']
308308
309309
310-
.. code:: ipython3
310+
.. code:: python
311311
312312
print(deep_topic.get_similarity(news, anchor = 0.7))
313313
print(deep_topic.get_similarity(second_news, anchor = 0.7))
@@ -322,7 +322,7 @@ Train siamese network for topics analysis
322322
Train siamese network for influencers analysis
323323
----------------------------------------------
324324

325-
.. code:: ipython3
325+
.. code:: python
326326
327327
deep_influencer = malaya.topic_influencer.siamese_influencer()
328328
@@ -336,7 +336,7 @@ Train siamese network for influencers analysis
336336
minibatch loop: 100%|██████████| 20/20 [00:14<00:00, 1.47it/s, accuracy=0.875, cost=0.0637]
337337
338338
339-
.. code:: ipython3
339+
.. code:: python
340340
341341
deep_influencer.get_similarity(news, anchor = 0.5)
342342
@@ -349,7 +349,7 @@ Train siamese network for influencers analysis
349349
350350
351351
352-
.. code:: ipython3
352+
.. code:: python
353353
354354
deep_influencer.get_similarity(second_news, anchor = 0.5)
355355
@@ -359,5 +359,3 @@ Train siamese network for influencers analysis
359359
.. parsed-literal::
360360
361361
['gobind singh deo']
362-
363-

0 commit comments

Comments
 (0)