Rahul Doc Main 1
Rahul Doc Main 1
A PROJECT REPORT
Submitted by
RAHUL N K
(OTASMCS006)
ACKNOWLEDGEMENTS
First and foremost, I thank the almighty God who gave me the knowledge and strength
to successfully complete this project.
I take this opportunity to express my gratitude to all people who advice and support
me. I wish to express my sincere thanks to Mr.K RADHAKRISHNAN,Associate
Professor and Head of the Department of Computer Science, for giving his expert
guidance through the project work and I express my heartfelt gratitude to my project
coordinator Mr R SANTHOSH , associate professor, NSS college Ottapalam.
Date :
Name : Rahul N K
DECLARATION
I hereby declare that this submission is my own work and that, to the best of my
knowledge and belief, it contains no material previously published or written by another
person or material which has been accepted for the award of any other degree or diploma
of the university or other institute of higher learning, except where due acknowledgement
has been made in the text.
NSS COLLEGE
OTTAPALAM
CERTIFICATE
This is to certify that the project report entitled “AUDIENCE BEHAVIOR MINING”
submitted by Rahul N K (Register Number:OTASMCS006) to University of Calicut for
the award of the degree of Master of Science(M.S.c) in Computer Science is a bonafide
record of the project work carried out by him/her under my supervision and guidance.
The content of the report, in full or parts have not been submitted to any other Institute or
University for the award of any other degree or diploma.
Mr.Santhosh R Mr.Radhakrishnan K
Faculty Guide Head of Department
Associate Professor
Place : Ottapalam
Date :
Certified that the candidate was examined was examined by us in the Project Viva Voice
Examination held on ......................... and his/her Register Number is.............................
Examiners:
1.
2.
CONTENTS
i. Abstract
ii. List of Figures
1. Introduction
1.1 About the proposed work , underlying technology and techniques
1.2 Project Profile
1.3 About the organization
2.4 Methodology
2.5 Scope
4. System Design
7. Conclusion
7.1 Future Enhancement
8. Bibliography
8.1 Publications
9. Appendix
9.1 Code
9.2 User Interface Design
ABSTRACT
The online recommendation system has become a trend. Recommended systems
are powerful new technology and it helps users to watch videos, programmes, news and
products which they want to view. Now a days rather than going out and viewing
videos for themselves, reason being, online recommendation provides an easier and
quicker way to view videos, programmes, news and products. A recommendation
system is broadly used to recommend contents to the end users that are most
appropriate.
A recommendation system is one of the strongest tools to increase profit and
retaining viewers. The existing system lead to extraction of irrelevant information and
lead to lack of user satisfaction. The Audience Behavior Mining based on combined
features of Collaborative filtering and Sentimental analysis to produce efficient and
effective recommendation. It helps to recommend the contents like movies or videos,
programmes, news and products based on the user’s interest.
LIST OF FIGURES
4.4.2 E R Diagram..……………….………….………………..….…........…….....30
LIST OF TABLES
1 register………………………………………….…………………..…...………23
2 login…………………………………………………………...……………...…24
3 movie………………………....……………………...…………………..……...24
4 movie comments.………………………………………………………….....…25
5 product…………………………………...…………………………….…....….25
7 news….………………………………………...…………...………….…....….26
8 news comments..……….……………………………………...……...…....…..27
9 programme ……………………………………………………......…..….…….27
10 programme comments……….……………………………………...…...……28
11 programme eps………………………………….………………..…...……….28
12 monitor user…………………………………………….…...……...…………29
INTRODUCTION
1. INTRODUCTION
Collaborative filtering
EXAMPLE:
Let’s say Alice and Bob have similar interests in video games. Alice recently played and
enjoyed the game Prince of Persia. Bob has not played this game, but because the system has
learned that Alice and Bob have similar tastes, it recommends this game to Bob .
Sentiment Analysis
Sentiment analysis also known as Opinion mining. Sentiment analysis is a type of data
mining that measures the inclination of people’s opinions through natural language
processing (NLP). Which are used to extract and analyze subjective information from the
Web - mostly social media and similar sources.
The project entitled “Audience Behavior Mining” have users and admin.
The admin add contents and allow the users to login to the system. User have register
option and can login to the system. Users can view the contents uploaded by the admin
and also have the ability\option to add comments and ratings. Then the users get
recommendation of contents by the help of two algorithms. Collaborative Filtering
and Sentimental analysis.
2.2 Objectives
2.3 Motivation
2.4 Methodology
1. Collaborative Filtering
2. Sentimental Analysis
Collaborative Filtering
Example: Let’s say Alice and Bob have similar interests in video games. Alice
recently played and enjoyed the game Prince of Persia. Bob has not played this
game, but because the system has learned that Alice and Bob have similar tastes, it
recommends this game to Bob.
Sentimental Analysis
Sentiment analysis also known as Opinion mining.
It is a type of data mining that measures the inclination of people’s opinions
through natural language processing (NLP).
Which are used to extract and analyze subjective information from the Web -
mostly social media and similar sources
2.5 Scope
This system can be helpful for users to get recommendation of contents. And it
help to recommend Movies or Videos, Programmes, News And Products in a single
website.
REQUIREMENT ANALYSIS
AND SPECIFICATION
In some cases a requirements analyst generates use cases after gathering and
validating a set of functional requirements. The hierarchy of functional requirements is:
user/stakeholder request → feature → use case → business rule. Each use case illustrates
behavioral scenarios through one or more functional requirements. Often, though, an
analyst will begin by eliciting a set of use cases, from which the analyst can derive the
functional requirements that must be implemented to allow a user to perform each use
case.
Hardware Requirements:
Software Requirements:
Economic feasibility is the most frequently used method for evaluating the
effectiveness of proposed system. The procedures are to determine the benefits and
savings that are expected from this system is in time savings.
The Audience Behavior Mining is economically feasible because this system uses less
expensive for processing various functions in this. Features of the system are the low
cost, time saving & scalability. Hence this system is economically feasible.
Hardware Requirements:
Software Requirements:
SYSTEM DESIGN
4. SYSTEM DESIGN
1. Administrator :-
Here admin can add movies, programmes, news and products. And also
monitor users. This module handles the administrative functions of the system.
2. Users :-
Users can view all the contents uploaded by the admin and comment, rate
the contents.
1. Content Uploading
2. News event analysis and detection
3. Comments
4. User add/delete
5. Monitor the user and its review
6. Recommendation of Contents
Level 0
Level 1 Admin
Level 1 User
Level 2 User
username varchar 20
password varchar 15
emailid varchar 20
phonenumber varchar 10
status varchar 10
username varchar 20
password varchar 15
title Varchar 25
description Varchar 50
video_image Tinytext
video_link Varchar 25
user varchar 20
date Date
comments varchar 50
rate Int 10
product_name Varchar 25
description Varchar 50
product_image Tinytext
price Varchar 5
date date
user Varchar 20
date Date
comments Varchar 50
rate Int 10
news_name Varchar 25
description Varchar 50
news_image Tinytext
news_link Varchar 25
date date
user Varchar 20
date Date
comments Varchar 50
rate Int 10
pgm_name Varchar 20
description Varchar 50
images Tinytext
category Varchar 20
pgm_epsid Varchar 10
user Varchar 20
date Date
comments Varchar 50
rate Int 10
episode Varchar 20
episode_image Tinytext
episode_link Varchar 25
user Varchar 20
age Int 10
category Varchar 20
category_id Int 10
date Date
4.4.2 ER Diagram
IMPLEMENTATION AND
MAINTENANCE
Adobe Dreamweaver
Adobe Dreamweaver is a web design and development application that
combines a visual design surface known as Live View and a code editor with standard
features such as syntax highlighting, code completion, and code collapsing as well as
more sophisticated features such as real-time syntax checking and code introspection for
generating code hints to assist the user in writing code. Combined with an array of site
management tools, Dreamweaver lets its users design, code and manage websites, as
well as mobile content. Dreamweaver is an Integrated Development Environment (IDE)
tool. You can live preview of changes for the frontend. Dreamweaver is positioned as a
versatile web design and development tool that enables visualization of web content
while coding. Dreamweaver, like other HTML editors, edits files locally then uploads
them to the remote web server using FTP, SFTP, or WebDAV. Dreamweaver CS4 now
supports the Subversion (SVN) version control system.
XAMPP Server
XAMPP is a free and open source cross-platform web server solution stack
package developed by Apache Friends, consisting mainly of the Apache HTTP Server,
Maria DB database, and interpreters for scripts written in the PHP and Perl programming
Languages. XAMPP stands for Cross-Platform (X), Apache (A), Maria DB (M), PHP (P)
and Perl (P). It is a simple, lightweight Apache distribution that makes it extremely easy
for developers to create a local web server for testing and deployment purposes.
Everything needed to set up a web server – server application (Apache), database (Maria
DB), and scripting language (PHP) – is included in an extractable file. XAMPP is also
cross-platform, which means it works equally well on Linux, Mac and Windows. Since
most actual web server deployments use the same components as XAMPP, it makes
transitioning from a local test server to a live server extremely easy as well.
MySQL
1. Content Uploading
2. News event analysis and detection
3. Comments
4. User add/delete
5. Monitor the user and its review
6. Recommendation of Contents
5.3 Coding
Coding refers to creating computer programming code. In a more general
sense, the word coding is used to refer to assigning a code or classification to something.
Coding is the primary method for allowing intercommunication between humans and
machines. Early coding was done through physical punch cards and similar methods.As
digital computers were created, early programming languages like BASIC, FORTRAN
and COBOL were used, each with its own syntax and operators.
TESTING AND
IMPLEMENTATION
A test plan documents strategy that will be used to verify and ensure that a
product or system meets its design specification and other requirements. A test plan is
usually prepared by or with significant input from the engineer. This document describes
the plans for testing the architectural prototype of AUDIENCE BEHAVIOR MINING.
This project do the following
If Construction and UT are scheduled as a single phase, Unit testing results need
to be made as a separate deliverable – This would help in filtering out any
mistakes in the business flows at a nascent stage instead of in the integration
testing or system testing which is more expensive.
Make use of the count of test cases planned, executed, passed, and failed to
apprehend the progress and replicate Unit testing if required.
5. Try to include on-the-fly test cases that are developed while executing a pre-
defined set of test cases.
CONCLUSION
7. CONCLUSION
BIBLIOGRAPHY
8. BIBLIOGRAPHY
[3] F. Å. Nelsen, "A new anew: Evaluation of a word list for sentiment analysis in
microblogs," CoRR , 2011.
[4] M. Thelwall, K. Buckley, and G. Paltoglou, “Sentiment strength detection for the
social Web, Journal of the American Society for Information Science and Technology,
vol. 63, no. 1, pp. 163-173, 2012.
APPENDIX
9. APPENDIX
9.1 Code
<?php
if(isset($_POST['login']))
session_start();
$con=mysqli_connect("localhost","root","","sentimental_analysis");
$email=$_POST['Username'];
$password=$_POST['Password'];
if($email=="admin"&&$password=="admin")
header("location:admin/dashboard/dashboard.php");
else
$res=mysqli_query($con,$query);
$row1=mysqli_fetch_array($res);
$count=mysqli_num_rows($res);
if($count==1)
$_SESSION['user']=$email;
$_SESSION['user_name']=$email;
//$_SESSION['user']=$row1['id'];
$_SESSION['age']=$row1['age'];
header("location:index.php?b=1");
else
header("location:index.php?b=1&status=error");
?>
User Registration
<?php
include("connection.php");
if(isset($_POST['register']))
//database connectivity
echo $query;
if(mysqli_query($con,$query))
header("location:series.php?b=2");
?>
<?php
include("../connection.php");
include("table.php");
$i = 0;
$name=$row['Field'];
//echo $name."<br>";
$post_values[]=addslashes($_POST[$name]);
$field_name[]=$name;
$data_type[]=$row['Type'];
// echo $post_values[$i];
$i++;
$j=$i;
//echo "<br>";
for($k=0;$k<$i;$k++)
if($fields=="")
$fields=$field_name[$k];
else
$fields=$fields.",".$field_name[$k];
$type=$data_type[$k];
//$data_type[$k];
$type_only=$type[0];
if($type_only=='tinytext')
$date=date("Y-m-d-h-i-s");
$target_path =
$target_path.$date.basename($_FILES[$field_name[$k]]['name']);
$target_path2 = $date.basename($_FILES[$field_name[$k]]['name']);
//echo $target_path;
move_uploaded_file($_FILES[$field_name[$k]]['tmp_name'],
$target_path);
if($datas=="")
$datas="'".$target_path2."'";
//echo $field_name[$k];
else
$datas=$datas.",'".$target_path2."'";
//echo $field_name[$k];
else
if($datas=="")
$datas="'".$post_values[$k]."'";
else
$datas=$datas.",'".$post_values[$k]."'";
//echo $datas;
header("location:form.php?a=sucess");
else
header("location:form.php?a=error");
?>
<?php
include("table.php");
include("../header_inner.php");
$del_id=0;
$i=0;
?>
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
<style>
.hiddentd
display:inline-block;
width:180px;
white-space: nowrap;
overflow:hidden !important;
</style>
<div class="">
<?php
?>
<div class="clearfix"></div>
<?php
include("../connection.php");
if(isset($_REQUEST['del_id']))
$del_id=$_REQUEST['del_id'];
//if($del_id!="")
?>
<script>
function rem()
return true;
else
return false;
function rem2()
return true;
else
return false;
</script>
<?php
echo "<thead><tr>";
$name=$row2['Field'];
echo "<th>".
."</th>";
$i++;
echo "
<th>Update</th>
<th>Delete</th>
</tr></thead>";
// $i=0;
echo "<tbody>";
while($row = mysqli_fetch_array($result))
$id=$row['0'];
echo "<tr>";
for($k=0;$k<$i;$k++)
if($k==30)
$row2 =mysqli_fetch_array($result2);
elseif($k==0)
$j++;
elseif($k==31)
elseif($k==3)
elseif($k==4)
else
echo "
<td><a href='update.php?id=$id'>Update</a></td>
</tr>";
?>
</tbody>
</table>
<script type="text/javascript">
$('#example')
.removeClass( 'display' )
</script>
<div class="clearfix"></div>
</div>
<?php
//include("../footer_inner.php");
?>
<?php
error_reporting(0);
include("connection.php");
//echo "$row[user]<br>";
$books[$row['user']][$row24['video_id']]=$row24['rate'];
$data=substr("$data", 0, -2);
$data=$data.')';
?>
Recommendation of Contents
<?php
class Recommend
$similar = array();
$sum = 0;
foreach($preferences[$person1] as $key=>$value)
if(array_key_exists($key, $preferences[$person2]))
$similar[$key] = 1;
if(count($similar) == 0)
return 0;
foreach($preferences[$person1] as $key=>$value)
if(array_key_exists($key, $preferences[$person2]))
$score = array();
foreach($preferences as $otherPerson=>$values)
if($sim > 0)
$score[$otherPerson] = $sim;
array_multisort($score, SORT_DESC)
return $score;
$result = array();
$result[$key][$otherPerson] = $value;
return $result;
$total = array();
$simSums = array();
$ranks = array();
$sim = 0;
foreach($preferences as $otherPerson=>$values)
if($otherPerson != $person)
if($sim > 0)
foreach($preferences[$otherPerson] as $key=>$value)
if(!array_key_exists($key, $preferences[$person]))
if(!array_key_exists($key, $total)) {
$total[$key] = 0;
if(!array_key_exists($key, $simSums)) {
$simSums[$key] = 0;
$simSums[$key] += $sim;
foreach($total as $key=>$value)
array_multisort($ranks, SORT_DESC);
return $ranks;
?>
Sentimental Analysis
<?php
require_once('SentimentAnalyzer.php');
$sentimentAnalysisOfSentence1 = $sat>analyzeSentence($sentence1);
$resultofAnalyzingSentence1 =
$sentimentAnalysisOfSentence1['sentiment'];
$probabilityofSentence1BeingPositive =
$sentimentAnalysisOfSentence1['accuracy']['positivity'];
$probabilityofSentence1BeingNegative =
$sentimentAnalysisOfSentence1['accuracy']['negativity'];
$sentimentAnalysisOfSentence2 = $sat-
>analyzeSentence($sentence2);
$resultofAnalyzingSentence2 =
$sentimentAnalysisOfSentence2['sentiment'];
$probabilityofSentence2BeingPositive =
$sentimentAnalysisOfSentence2['accuracy']['positivity'];
$probabilityofSentence2BeingNegative =
$sentimentAnalysisOfSentence2['accuracy']['negativity'];
$documentLocation = 'trainingSet/review.txt';
$sentimentAnalysisOfDocument = $sat-
>analyzeDocument($documentLocation);
$resultofAnalyzingDocument =
$sentimentAnalysisOfDocument['sentiment'];
$probabilityofDocumentBeingPositive =
$sentimentAnalysisOfDocument['accuracy']['positivity'];
$probabilityofDocumentBeingNegative =
$sentimentAnalysisOfDocument['accuracy']['negativity'];
require_once('test/presentation.php');
?>
Sentimental Analysis
<div id="test">
Negative or Neutral</h3>
</form>
<div id="result">
<?php
if (isset($_POST['sentence']) || isset($_POST['location']))
if ($type == 'sentence')
$result = $sat->analyzeSentence($value);
else
$result = $sat->analyzeDocument($value);
else
if(isset($_POST['submit']))
$sen=$_POST['sentence'];
$pos=$result['accuracy']['positivity'];
$date=date("Y-m-d");
mysqli_query($con,"INSERT INTO
programme_comments(pgm_epsid,user_name,date,comments,rate)
VALUES
('$_REQUEST[id]','$_SESSION[user_name]','$date','$sen','$pos')");
?>
Homepage
User Registration
Login
Admin Panel
Programme Contents
Product Contents
Movies
News Contents
Sentimental Analysis
Recommendation of Contents