Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0bd5f6652d
Fetching contributors…

Cannot retrieve contributors at this time

201 lines (198 sloc) 11.024 kb
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset=UTF-8>
<title>HTML5 文字雲:文章詞彙分析機</title>
<link rel="stylesheet" type="text/css" href="../wordcloud.css" />
</head>
<body>
<canvas id="canvas" class="toggleUI"></canvas>
<div id="fb-root"></div>
<div id="loading" class="center_msg">
<p>載入中 ...</p>
</div>
<div id="error" class="error toggleUI center_msg">
<p>&nbsp;</p>
<a href="#" class="start">再試一次</a>
</div>
<div id="too_slow" class="error toggleUI center_msg">
<p>您的瀏覽器效能太慢,請改用其他瀏覽器(部分電腦的 Firefox 會有此問題)</p>
</div>
<div id="not_support" class="error toggleUI center_msg">
<p>您的瀏覽器缺少必要的功能。</p>
<p>請升級,或是改用支援 HTML5 相關功能的瀏覽器:</p>
<ul>
<li><a href="http://moztw.org/" target="_blank">Firefox</a></li>
<li><a href="http://www.apple.com/tw/safari/" target="_blank">Safari</a></li>
<li><a href="http://www.google.com/chrome/" target="_blank">Chrome</a></li>
<li><a href="http://www.opera.com/" target="_blank">Opera</a></li>
</ul>
</div>
<noscript>
<div class="center_msg">
<p>請開啟瀏覽器的 JavaScript。</p>
</div>
</noscript>
<p id="title" class="toggleUI"></p>
<a id="start" href="#" class="toggleUI start center_btn">文字雲 - 按這裡開始</a>
<a id="ready" href="#" class="toggleUI ready center_btn">準備完成</a>
<div id="controls" class="toggleUI left_tool">
<ul>
<li><a href="#" class="changetheme"><span class="famfamfam_sprite color_wheel"></span>主題</a></li>
<li><a href="#" class="larger"><span class="famfamfam_sprite comment"></span>放大文字</a></li>
<li><a href="#" class="smaller"><span class="famfamfam_sprite comments"></span>縮小文字</a></li>
<li><a href="#" class="thicker"><span class="famfamfam_sprite arrow_out"></span>增大間距</a></li>
<li><a href="#" class="thiner"><span class="famfamfam_sprite arrow_in"></span>縮小間距</a></li>
<li><a href="#" class="ready"><span class="famfamfam_sprite arrow_refresh"></span>重新排列</a></li>
</ul>
</div>
<div id="interactive" class="toggleUI left_tool">
<ul>
<li><a href="#" class="facebook"><span class="famfamfam_sprite facebook"></span>Facebook</a></li>
<li><a href="#" class="twitter"><span class="famfamfam_sprite twitter"></span>Twitter</a></li>
<li><a href="#" class="plurk"><span class="famfamfam_sprite plurk"></span>噗浪分享</a></li>
<li><a href="#" class="save"><span class="famfamfam_sprite disk"></span>儲存圖片</a></li>
</ul>
</div>
<div id="help" class="left_tool">
<ul>
<li><a href="#" class="start"><span class="famfamfam_sprite arrow_undo"></span>重來</a></li>
<li><a href="#" class="help"><span class="famfamfam_sprite help"></span>關於</a></li>
</ul>
</div>
<div id="language" class="left_tool">
<ul>
<li><a href="../en/">English</a></li>
<li><strong>正體中文</strong></li>
</ul>
</div>
<div id="source_panel" class="toggleUI panel">
<h2>詞彙分析文字來源</h2>
<form id="source_panel_form" action="#" method="post">
<p class="menu panel_left">
<label class="generic"><span class="famfamfam_sprite award_star_bronze_1"></span><input type="radio" name="source" value="demo" checked /> 範例資料</label>
<label class="generic"><span class="famfamfam_sprite feed"></span><input type="radio" name="source" value="feed" /> RSS Feed</label>
<label class="generic"><span class="famfamfam_sprite page_world"></span><input type="radio" name="source" value="html" /> 網頁</label>
<label class="generic"><span class="famfamfam_sprite disk"></span><input type="radio" name="source" value="file" /> 硬碟裡的檔案</label>
<label><input type="radio" name="source" value="wiki" /> 中文維基百科</label>
<label><input type="radio" name="source" value="blog:blogger" /> Blogger</label>
<label><input type="radio" name="source" value="blog:pixnet"/> 痞客邦部落格</label>
<label><input type="radio" name="source" value="blog:wretch"/> 無名小站部落格</label>
<label><input type="radio" name="source" value="blog:plurk"/> 噗浪</label>
<label><input type="radio" name="source" value="blog:twitter"/> Twitter</label>
<label><input type="radio" name="source" value="fbok"/> Facebook</label>
<label><input type="radio" name="source" value="goog"/> Google+</label>
</p>
<hr />
<div id="demo_entry" class="entry">
<p>分析來源範例</p>
<p class="menu">
<label><input type="radio" name="demo" value="feed:http://www.president.gov.tw/RSS.aspx?tabid=1104&amp;moduleid=2074" checked /> 馬英九總統治國週記 </label>
<label><input type="radio" name="demo" value="feed:http://feeds.feedburner.com/Pansci" /> 泛科學探索實驗空間 <a href="http://pansci.tw/" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="feed:http://feeds.feedburner.com/blogspot/gCLK" /> 阿簡生物筆記 <a href="http://a-chien.blogspot.com/" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="html:http://zh.wikipedia.org/zh-tw/台灣" /> 中文維基百科「台灣」條目 <a href="http://zh.wikipedia.org/zh-tw/%E5%8F%B0%E7%81%A3" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="feed:http://et.e-info.org.tw/rss.xml" /> 環境信託「全民來認股 守護白海豚」網站 <a href="http://et.e-info.org.tw/" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="feed:http://sophist4ever.pixnet.net/blog/feed/rss" /> 假圖天國 <a href="http://sophist4ever.pixnet.net/blog" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="feed:http://richter.pixnet.net/blog/feed/rss" /> 地圖會說話 <a href="http://richter.pixnet.net/blog" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
<label><input type="radio" name="demo" value="feed:http://playpcesor.blogspot.com/feeds/posts/default" /> 電腦玩物 <a href="http://playpcesor.blogspot.com/" target="_blank" class="link famfamfam_sprite application_double">link</a></label>
</p>
</div>
<div id="blog_entry" class="entry">
<p><label><span><span class="feed_type_name"></span>帳號 ID:</span><input type="text" size="14" id="username" /></label></p>
<p>某些網站沒有提供全文 RSS,僅能處理可抓到的部份。</p>
</div>
<div id="feed_entry" class="entry">
<p><label><span>RSS 網址:</span><input type="url" size="40" id="rss" /></label></p>
<p>未曾被訂閱過的 RSS 無法取得。</p>
</div>
<div id="file_entry" class="entry">
<p><label><span>選擇純文字檔案:</span><input type="file" id="file" multiple /></label></p>
<p><label><span>編碼:</span><input type="text" size="10" id="encoding" value="UTF-8" /></label></p>
<p>檔案會直接處理,不會被上傳。</p>
</div>
<div id="wiki_entry" class="entry">
<p><label><span>條目:</span><input type="text" size="14" id="wikipedia_entry" /></label></p>
</div>
<div id="html_entry" class="entry">
<p><label><span>網址:</span><input type="url" size="40" id="html_url" /></label></p>
<p>僅能處理被搜尋引擎分析過的公開網頁。</p>
</div>
<div id="fbok_entry" class="entry">
<p>讀取中…</p>
<p>若無法讀取,請到 <a href="https://www.facebook.com/settings?tab=applications" target="_blank">Facebook 權限頁面</a>刪除 HTML5 Word Cloud 再重新認證。</p>
</div>
<div id="goog_entry" class="entry">
<p><label><input type="radio" name="goog_type" id="goog_type_me" checked="checked" /> 我的文章</label></p>
<p><input type="radio" name="goog_type" id="goog_type_userid" /> <label>個人頁面網址:<input type="url" size="30" id="goog_url" /></label></p>
</div>
<button type="submit" id="source_panel_finish">開始</button>
</form>
</div>
<div id="help_panel" class="panel toggleUI">
<h2>關於</h2>
<div class="entry">
<p>作者:<a href="http://timc.idv.tw/" target="_blank">timdream</a>。</p>
<p>任何建議歡迎<a href="http://blog.timc.idv.tw/posts/wordcloud/" target="_blank">留言</a>。<a href="https://github.com/timdream/wordcloud" target="_blank">源碼</a>以 MIT 授權釋出。</p>
<p>使用技術:</p>
<ul>
<li>中文:自製的 N-gram 演算法</li>
<li>英文:<a href="http://tartarus.org/~martin/PorterStemmer/" target="_blank">Porter Stemming Algorithm</a></li>
<li>HTML5 canvas</li>
<li>HTML5 FileReader API</li>
<li>HTML5 Web Workers API</li>
<li>Javascript 1.6 <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" target="_blank">新 Array 函式</a></li>
</ul>
<p>資料提供:</p>
<ul>
<li><a href="https://code.google.com/apis/feed/" target="_blank">Google Feed API</a></li>
<li><a href="https://developers.facebook.com/docs/reference/javascript/" target="_blank">Facebook JavaScript SDK</a></li>
<li><a href="https://developers.google.com/+/" target="_blank">Google Plus API</a></li>
<li><a href="http://developer.yahoo.com/yql/" target="_blank">YQL API</a></li>
</ul>
<button>關閉</button>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.wordcloud.js"></script>
<script type="text/javascript" src="../go2.js"></script>
<script type="text/javascript" src="../jquery.getcontent.js"></script>
<script type="text/javascript" src="../worker.js"></script>
<script type="text/javascript" src="../wordfreq.js"></script>
<script type="text/javascript" src="../wordcloud.js"></script>
<script src="http://connect.facebook.net/zh_TW/all.js"></script>
<script type="text/javascript">
window.Worker.iframeURI = '../worker.iframe.html';
window.Worker.baseURI = 'zh/';
var T = {
title: '$1 的文字雲',
downloading: '下載中 ...',
reading: '讀取中 ...',
processing: '處理中 ...',
analyzing: '分析中 ...',
errorReading: '讀取失敗,請稍後再試。',
errorWordCount: '取得詞彙數量太少,請選其他內容。',
fbNeedLogin: '請先 <a id="fb_login" href="#">登入 Facebook</a>。',
fbReady: '已登入,按『開始』分析內容。',
startList_1: 'HTML5 文字雲',
startList_1C: 60,
startList_2: 'Word Cloud',
startList_2C: 35,
startList_3: '文章詞彙分析機',
startList_3C: 40,
startList_4: '點選後開始',
startList_4C: 26,
readyList_1: '詞彙分析完成',
readyList_1C: 45,
readyList_2: '共 $1 詞',
readyList_2C: 26,
readyList_3: '最多重複 $2 次',
readyList_3C: 20,
readyList_4: '點選後開始',
readyList_4C: 17,
listHeading: '最常出現的詞彙:',
listComma: '',
listEllipsis: ''
};
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.