Coder Social home page Coder Social logo

cowbei-jieba's Introduction

CowBei Jieba

下載指定粉絲專頁的所有貼文並使用Jieba進行斷詞頻率分析後生成文字雲。

建議可以使用 Virtualenv 隔離不同專案的套件。

Python3 only

安裝必須套件

$ pip3 install -r requirement.txt

新增粉絲專頁

main.py第60行新增要分析的粉絲專頁ID數字或ID字串,可一次新增多個。後方需自訂字串作為輸出時的檔案命名。

例如:

fanpage = {
    # 'Page ID number or ID string': 'Custom Page Name'
    '576881715763166': '靠北輔大'
} 

執行程式

$ python3 main.py

此程式需要藉由Facebook Graph API存取粉絲專頁資料,程式運作時需要輸入Token,請至 Graph API 取得你的個人權杖。

執行後會建立tmp資料夾,程式運作產生的資料全部會儲存在這裡。

注意,再次執行程式時,如果tmp資料夾存在會先將tmp資料夾刪除,若要保留資料請先複製到別處。

自訂忽略詞

如果有字詞不想被列入計算的話,可以在data/ignore_dict.txt中新增,一行一個詞,存檔後再次執行即可忽略該詞。

範例

靠北輔大

cowbei-jieba's People

Contributors

theoklein avatar

Stargazers

Dennis Chung avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.