UDICatNCHU/swingerApp: 情緒分析的django App - GitHub

文章推薦指數: 80 %
投票人數:10人

swingerApp. 一個將Swinger 中文情緒分類器套用到django上的套件. Prerequisities. OS:Ubuntu / OSX would be nice; environment:need python3 sudo apt-get update; ... Skiptocontent {{message}} UDICatNCHU / swingerApp Public Notifications Fork 0 Star 0 情緒分析的djangoApp License GPL-3.0license 0 stars 0 forks Star Notifications Code Issues 0 Pullrequests 0 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights UDICatNCHU/swingerApp Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. master Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 1 branch 0 tags Code Latestcommit   Gitstats 8 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime swingerApp     .gitignore     LICENSE     MANIFEST     README.md     setup.cfg     setup.py     Viewcode swingerApp Prerequisities Installing Running&Testing Run API Deployment BuiltWith Contributors License README.md swingerApp 一個將Swinger中文情緒分類器套用到django上的套件 Prerequisities OS:Ubuntu/OSXwouldbenice environment:needpython3sudoapt-getupdate;sudoapt-getinstall;python3python3-dev Installing 使用虛擬環境Usevirtualenvisrecommended: virtualenvvenv 啟動方法Howtoactivatevirtualenv forLinux:.venv/bin/activate forWindows:venv\Scripts\activate 安裝Install:pipinstallswingerApp Running&Testing Run settings.py裏面需要新增swingerApp這個app: addthis: INSTALLED_APPS=[ ... ... ... 'swingerApp', ] urls.py需要新增下列代碼把所有swinger開頭的request都導向到swingerApp這個app: addthis: #swingerApp importswingerApp.urls urlpatterns+=[ url(r'^swinger/',include(swingerApp.urls)) ] pythonmanage.pyrunserver:即可進入頁面127.0.0.1:8000/swinger測試swinger是否安裝成功。

API /swinger/bulkswing 需要對此API做POST:下方有範例code。

api >>>importjson,requests >>>requests.post('http://udiclab.cs.nchu.edu.tw/swinger/bulkswing',data={'sentence':json.dumps( [ '齊家治國平天下,小家給治了!國家更需要妳,加油!', '擇善固執莫在意全家滿意,至於她家謾駡攻許隨她去(正常情緒紓緩),革命未成功期盼繼續努力' ... ] )}).json() #結果為:{'result':['pos','pos'...]} Deployment swingerAppisadjango-app,sodependsondjangoproject. BuiltWith python3.5 pymongo Contributors 張泰瑋david License ThispackageuseGPL3.0License. About 情緒分析的djangoApp Resources Readme License GPL-3.0license Stars 0 stars Watchers 2 watching Forks 0 forks Releases Noreleasespublished Packages0 Nopackagespublished Languages Python 100.0% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?