Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

554 word frequency for replies v2 #566

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webapp/_lib/view/post.index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
</div>
{if $post->reply_count_cache > $top_20_post_min}
{include file="_post.word-frequency.tpl"}
<script src="{$site_root_path}assets/js/Snowball.stemmer.min.js" type="text/javascript"></script>
<script src="{$site_root_path}assets/js/word_frequency.js" type="text/javascript"></script>
{/if}
{if !$logged_in_user && $private_reply_count > 0}
Expand Down
50 changes: 50 additions & 0 deletions webapp/assets/html/test/word_frequency.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<html>
<head><title>word frequency test</title></head>

<link rel="shortcut icon" type="image/x-icon" href="../../img/favicon.png">
<link type="text/css" rel="stylesheet" href="../../assets/css/base.css">
<link type="text/css" rel="stylesheet" href="../../assets/css/positioning.css">
<link type="text/css" rel="stylesheet" href="../../assets/css/style.css">
<link type="text/css" rel="stylesheet" href="../../assets/css/jquery-ui-1.7.1.custom.css">

<!-- jquery -->
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../js/Snowball.stemmer.min.js"></script>

<script type="text/javascript" src="../../js/word_frequency.js"></script>

<body>

<div class="word-frequency"></div>
<div id="word-frequency-close"></div>
<div id="word-frequency-spinner"></div>
<div id="word-frequency-posts-div"></div>
<div id="word-frequency-posts-close"></div>

<div id="word-frequency-list" style="display: none;">
Top 20 Word list:
<div class="word-frequency-div" id="word-frequency-words">
</div>
</div>

<div id="word-frequency-posts" style="border: solid green 1px; padding: 10px; margin: 10px;"></div>

<div style="border: solid black 1px; padding: 10px; margin: 10px;">
<div class="reply_text" id="reply_text-1">I have some text here I like to reply with. #stuff also tweet sign "sign"</div><br />
<div class="reply_text" id="reply_text-2">I have some more text here, I like it likes. #stuff</div><br />
<div class="reply_text" id="reply_text-3">(apples and apple) and rest and "rested" and I tweeted and log</div><br />
<div class="reply_text" id="reply_text-4">I like eating and to eat "and i ate." and I like texting when i am texted and tweeting</div><br />
<div class="reply_text" id="reply_text-5">when i am "eating" I like to reply to texts when I am replying to texts I have texted to when texted and texting. ("also, I like eats.")</div><br />
<div class="reply_text" id="reply_text-6">I use "log" when I actually log in the database the act. When I an just granting access it's "sign". Many years of govt work.</div><br />
<div class="reply_text" id="reply_text-7">"how many tweets do you eat?" have you replied to those eats?</div><br />
</div>

<script type="text/javascript">


tu_word_freq.find_words();
</script>
</body>
</html>
Loading