Vivian commited on
Commit
be4e820
·
1 Parent(s): 0322c01
Files changed (3) hide show
  1. app.py +2 -0
  2. markdown/critical.md +4 -0
  3. markdown/overview.md +15 -0
app.py CHANGED
@@ -9,6 +9,8 @@ st.set_page_config(layout='wide',
9
 
10
  def main():
11
  st.title('Twitter Hashtag Recommender')
 
 
12
  # about_stripnet = read_md('markdown/about_stripnet.md')
13
  # st.markdown(about_stripnet)
14
 
 
9
 
10
  def main():
11
  st.title('Twitter Hashtag Recommender')
12
+ st.markdown('markdown/overview.md')
13
+ st.markdown('markdown/critical.md')
14
  # about_stripnet = read_md('markdown/about_stripnet.md')
15
  # st.markdown(about_stripnet)
16
 
markdown/critical.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ ## Critical Analysis
2
+ 1. For efficiency consideration, we only added the top 1000 hashtag topics to our vocab dictionary. However, the actual number of potential hashtags should be millions. If adding all the hashtags to the dictionary, the efficiency of this approach will grow expoenentially. But not including these hashtags might also decrease toe candidate hashtags for users to choose. In addition to this, topics might be unavailable to be predicted if it is not trained in our model.
3
+ 2. Training data is small as well. The size of training data is about 30k.
4
+ 3. Future modifications on this model might be add weights on different topics. For example, more recent topics will be weighted higher than older topics.
markdown/overview.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ## Overview
3
+
4
+ ### Backgroud
5
+ On Twitter, adding a '#' to the beging of a word or a phrases creats a hashtag. When people click on the hastags, you can jump into the a topic with a list of tweets related to this topic. Hashtags on Twitter helps people easily follow topics that they are interested.
6
+
7
+ ### Problem
8
+ When people sending out a tweet and we want to add a hashtag to the tweets, it pumped hashtag list is neither related to the context of tweet very much, nor sorted from trending list.
9
+
10
+ ### Solution
11
+ To solve this problem, I trained a BERT model and utilize the fill-mask task to solve this problem.
12
+ Some special modifications I made to the model are as follows:
13
+ 1. Hashtags are usually consists of multiple words without space. When tokenizing these words, it will be splitted into different words and therefore cannot form up an existed hashtags. Therefore, I added the top 1000 trending hashtags to the token dictioanry and provide special token_ids for each hastags.
14
+ 2. When masking the tweets during training, I intentionally mask the tokens that is a hastag, so that the model will learn to predict the place of hashtags specifically.
15
+ 3. After training the model, we limit the potential candidates of [MASK] with the topics existed on Twitter, to get the relavent hashtags the user can add on.