# IR Final [Github Repo](https://github.com/tzuhsien/WebIR-final-project) ## 2019-06-22 Meeting - 大家的進度和代辦事項 - Report 寫在這個 HackMD 或可以直接 update 在 https://www.overleaf.com/2955236769nfmrpsdznkct - Slides (兩個人,講12分鐘,QA 3 分) ## Tasks - 以詩找詩 - [x] VSM - [x] LSI - [x] ~~LM~~ //這個LM很難做,因為一筆詩的字量太小,大部分都會到smoothing去,不太合適 - [x] 網頁 - 以詩找人 - 透過 以詩找詩 來實現 以詩找人 - Text Classification - [x] LM - Feature Selection (時間不夠,我會先做CHI) - [x] CHI - [ ] IG - Categorization Methods (時間不夠,我會先做SVM) - [ ] Rocchio - [ ] KNN - [x] Decision Tree - [x] SVM - [ ] Generative Classifier - [x] 網頁 - 詩詞分類 - ~~依照押韻風格~~ - 依照創作風格 - 直接呈現分群,Tune一個合理的參數 ## VSM 1. 以詩找詩 2. 使用結巴斷詞,建立inverted_file,並記錄每首詩的長度,計算平均長度 3. 搜尋參考Okapi BM25公式,對Query的每個term計算idf及normalize tf,將tf∙idf加總得到Score ### LSI 1. 一開始直接建LSI模型,但由於原本的文章數太大(約30萬筆),只能降到500多維以下,不然記憶體或時間會炸。但結果並不好,而且好像對短文章特別有利。 2. 我砍掉文章數小於10的作家做詩人分群(約剩下1600名),每名作家的所有詩為字典建LSI模型(1000維)。然後用原作家的字典直接排列相似度,效果不知怎樣,因為分出來的人太多沒看過了。之後會調其他維度和砍掉更多詩人 3. 以上還沒用到結巴斷詞,之後做看看。但我覺得要用LSI模型的話,要砍掉很多資料不然矩陣太大會跑很久很久(在 1. 我有用過1000多維但等了2個小時還沒跑完就砍掉了,500多維大概跑 30 分鐘)。 4. LSI模型訓練完後可以保存,測試每筆大概要 2~3 分鐘。 ## LM 1. 我實作了unigram和bigram段字 2. 並做了4種smoothing的方法Add-one smoothing,Absolute discounting,Jelinek-Mercer smoothing,Dirichlet Prior/Bayesian 3. 我另外寫算KL-divergence的函式,去排序特定的詩人與所有詩人之間LM的相似度 4. Result: ## 分工表格 ## References - [AUTOMATIC POETRY CLASSIFICATION USING NATURAL LANGUAGEPROCESSING](https://ruor.uottawa.ca/bitstream/10393/37309/1/Kesarwani_Vaibhav_2018_thesis.pdf) - [SVM-Based Classification Method for Poetry Style](https://ieeexplore.ieee.org/abstract/document/4370650) - [Poetry classification using support vector machines](https://ukm.pure.elsevier.com/en/publications/poetry-classification-using-support-vector-machines) - [A Text Classification Application: Poet Detection from Poetry](https://arxiv.org/abs/1810.11414) - [Linguistic Model Propositions for Poetry Retrieval in Web Search](https://pdfs.semanticscholar.org/12fb/e2ec68f9e89cf8546b17f96cfbc8bb5d0223.pdf) 一樣使用 SVM 來分類,其中選用 shape structure feature 來分辨馬來詩和民俗故事;另外透過 term vector 先經過 tf-idf 選出重要的維度後在進行馬來詩的主題分類
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up