• 沒有找到結果。

第三章 研究方法

第二節 研究架構

在本研究之系統架構圖中,主要可分為兩部份:一是前端使用者介面;二是 後端計算方法。以下會針對前端使用者介面和後端所使用之計算方法進一步說 明。

圖 3.2 研究架構

(一) 使用者界面

在使用者介面中包括了搜尋介面、傳回的結果頁面和使用者評分三部份。使 用者可以透過本研究所提供之社會搜尋進行問題之查詢,透過一系列社會關係計 算、地點相似度計算和基本斷詞計算處理後,再傳回結果至介面上,使用者可以 透過系統傳回之結果進行相關比較。本研究將採取同樣實驗中不同條件的比較的 結果顯示出使用者不同的喜好,例如第一次的搜尋結果為只考慮 TF-IDF 的計算 來代表一般的搜尋引擎型態,第二步加上社會關係的因素影響,最後再考慮本研 究的地理因素,相互比較在同樣的環境下使用者對於那些條件是有需求的。最後 則將比較結果傳回資料庫中。

(二) 前置資料處理與分析

2013 年 Facebook 的用戶數達 10 億人次,在台灣為目前主要的社群網站,

其他社群網站則稍顯乏力。由於 Facebook 網站註冊的會員數眾多,Facebook 為 了防止有虛名帳號的問題,定期會提醒上網次數小於門檻值的會員要定期上線,

倘若超過一定的次數,便會開始強制上網次數較少的會員進行刪除此帳號的動作

,因此表示在 Facebook 上除了每個人會以實名制來註冊之外,所以可以確定每

主要利用 Facebook 所提供 API 為資料擷取方法-Graph API。設計一個應用 程式,透過 Facebook 會員允許擷取該會員的相關資料之機制,當會員點選允許

Name Description Returns

id The Friend ID of the Facebook string

from The user that created the comment object containing the id and name of the creating user

message The comment text string

created_time The timedate the comment was created string containing ISO-8601 date-time

likes The number of times this comment was liked integer user_likes This field is returned only if the authenticated

user likes this comment

string; always true

type The type of this object; always returnscomment string

表 3.2 FB 朋友列表

Name Description Returns

id The Friend list ID string

name The name of the friend list string

type The type of the friends list; Possible values are: close_friends, acquaintances, restricted, user_created, education, work, current_city or Family

string

表 3.3 FB 個人資料

Name Description Returns

id The user ID string

name The name of the user string

close_friend The type of the close friends list; Possible values are: close_friends, acquaintances, restricted, user_created, education, work, current_city or Family

string

education The education of the user string

work The work of the user string

current_city The current city of the user string

interest The interest of the user string

2. CKIP 中文斷詞技術

透過 CKIP 斷詞斷字後,將進行 TF-IDF 的計算。首先是詞頻(Term Frequency, TF)作計算,所謂的詞頻是指某一個給定的詞語在該文件中所出現之次數。而逆 向文件頻率 (Inverse Document Frequency, IDF) 的計算是指在總文件中,某一個 給定的詞語所出現之次數。關於 IDF 的概念,首先將某個詞彙設為 t ,如果包 含 t 的訊息或文章數量越少,依公式的算法 IDF 會越大,則說明 t 具有很好的類 別區分的能力,而 TF 與 IDF 公式算出的值相乘會得到 TF-IDF 的最後結果。

從上述所講將塗鴉牆文章內容作基本中文斷詞處理,將每篇文章中出現較不 能列為關鍵字的字詞抽取出來,接著對剩下的字詞進行 TF-IDF 的計算。由所求 得的值得知,本研究所蒐集的訊息或文章數中所代表之關鍵字為何,接著每則訊 息或文章所代表的 TF-IDF 值會與下面的社會關係計算結合。

相關文件