Академический Документы
Профессиональный Документы
Культура Документы
A PROJECT REPORT
Submitted by
PRASANTH.G
- 100105901019
SURYA.B
- 100105901034
VEMBARASU.L - 100105901039
in partial fulfillment for the award of the degree
of
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
DR.NALLINI INSTITUTE OF ENGINEERING AND TECNOLOGY
DHARAPURAM-638 673
APRIL 2014
BONAFIDE CERTIFICATE
SIGNATURE
SIGNATURE
Mr.P.MANIVANNAN M.TECH.,
Mr.S.ANANDHASARAVANAN ME.,
SUPERVISOR
Engineering
Engineering
and Tecnology
and Tecnology
INTERNAL EXAMINER
EXTERNAL EXAMINER
ACKNOWLEDGEMENT
First of all i thank god almighty for all his blessings our heartfelt
thankfulness goes to our honorable chairman Dr.S.APPUSWAMY,
M.S.,PH.D.,F.I.C.M.,M.R.S.H.(LOND) for having provided us with the
entire necessary infra structure and other facilities for his extensive support to
successfully carry out this project.
I
extremely happy for
expressing
our
heartfelt
gratitude
to
Mr.P.MANIVANNAN M.TECH.,head of the department ,department of
computer
science
engineering,
Dr.Nallini
institute
of
engineering&technology,Dharapuram, for extending all possible works and also
his valuable guidance in making this project a grand success.
I thank all teaching & non teaching staffs of computer science engineering
department who have helped us during the course of our project.
I am also express gratitude towards our parents and friends for their valuable help.
3
ABSTRACT
In general, while searching in search engine one would search for an exact
answer for his query. In the existing QA forums, it usually provide only textual
answers which are not informative enough for real queries. In this paper, we
propose the scheme that is able to enrich the textual answers with appropriate
media data. By processing a large set of question answer, this approach can enable
a multimedia question answering(MMQA). MMQA research offers that attempt to
directly answer questions with image and video data. In my approach, we propose
to contribute textual answers and able to deal with more complex queries.To
enhance the above said process, propose a scheme named WSMA to enrich text
answers with image & video and able to take relevance and diversity into account
by exploring the content retreival.
TABLE OF CONTENTS
CHAPTER NO
TITLE
PAGE NO
ABSTRACT
LIST OF TABLES
Iv
LIST OF FIGURES
LIST OF ABBREVIATIONS
Vi
INTRODUCTION
01
LITERATURE SURVEYS
04
04
04
05
Question Answering
2.4Semi-supervised kernel density estimation
05
06
SYSTEM ANALYSIS
07
07
08
SOFTWARE DESCRIPTION
12
SYSTEM DESIGN
35
35
5.2 Algorithm
37
MODULE SPECIFICATION
38
6.1 Modules
38
38
CONCLUSION
40
APPENDICES-1
41
APPENDICES-2
53
REFERENCES
63
LIST OF TABLES
TABLE NO
3.1
TITLE
PAGE NO
09
layer
3.2
10
LIST OF FIGURES
TABLE NO
TITLE
PAGE
NO
3.1
09
3.2
10
4.1
15
4.2
.net Architecture
16
4.3
19
4.4
20
4.5
21
4.6
22
5.1
Architectural Diagram
35
LIST OF ABBREVIATIONS
MLMIL
HCRFs
SSKDE
KDE
SSAKDE
MMQA
SMTP
SOAP
CIL
GUI
ECMA
CHAPTER 1
INTRODUCTION
First, information seekers are able to post their specific questions on any
topic and obtain answers provided by other participants. By leveraging community
efforts, they are able to get better answers than simply using search engines.
Second, in comparison with automated QA systems, cQA usually receives answers
with better quality as they are generated based on human intelligence. Third, over
times, a tremendous number of QA pairs have been accumulated in their
repositories, and it facilitates the preservation and search of answered questions.
10
For example, Wiki Answer, one of the most well-known cQA systems, hosts more
than 13 million answered questions distributed in 7,000
categories. Despite their great success, existing cQA forums mostly support
only textual answers. Unfortunately, textual answers may not provide sufficient
natural and easy-to grasp information. For the questions What are the steps to
make a weather vane and What does $1 Trillion Look Like, the answers are
described by long sentences. Clearly, it will be much better if there are some
accompanying videos and images that visually demonstrate the process or the
object. Therefore, the textual answers in cQA can be significantly enhanced by
adding multimedia contents, and it will provide answer seekers more
comprehensive information and better experience.
In fact, users usually post URLs that link to supplementary images or videos
in their textual answers. For example, for the questions , the best answers on Y!A
both contain video URLs. It further confirms that multimedia contents are useful in
answering several questions. But existing cQA forums do not provide adequate
support in using media information.
In this paper, we propose a novel scheme which can enrich community-contributed
textual answers in cQA with appropriate media data. It contains three main
components:
(1) Answer medium selection. Given a QA pair, it predicts whether the textual
answer should be enriched with media information, and which kind of media data
should be added. Specifically, we will categorize it into one of the four classes. It
means that the scheme will automatically collect images, videos, or the
combination of images and videos to enrich the original textual answers.
11
(2) Query generation for multimedia search. In order to collect multimedia data,
we need to generate informative queries. Given a QA pair, this component extracts
three queries from the question, the answer, and the QA pair, respectively. The
most informative query will be selected by a three-class classification model.
(3) Multimedia data selection and presentation. Based on the generated queries, we
vertically collect image and video data with multimedia search engines. We then
perform reranking and duplicate removal to obtain a set of accurate and
representative images or videos to enrich the textual answers.
12
CHAPTER 2
LITERARURE SURVEY
2.1
image and video information. Our scheme investigates a rich set of techniques
including question/answer classification, query generation, image and video search
reranking, etc. Given a question and the community-contributed answer, our
approach is able to determine which type of media information should be added,
and then automatically collects data from Internet to enrich the textual answer.
Different from some efforts that attempt to directly answer questions with image
and video data, our approach is built based on the community-contributed textual
answers and thus it is more feasible and able to deal with more complex questions.
We have conducted empirical study on more than 3,000 QA pairs and the results
demonstrate the effectiveness of our approach.
2.2
analyze the forum categories and cluster them according to content characteristics
and patterns of interaction among the users. While interactions in some categories
resemble expertise sharing forums, others incorporate discussion, everyday advice,
and support. With such a diversity of categories in which one can participate, we
find that some users focus narrowly on specific topics, while others participate
across categories. This not only allows us to map related categories, but to
characterize the entropy of the users interests. We find that lower entropy
correlates with receiving higher answer ratings, but only for categories where
13
factual expertise is primarily sought after. We combine both user attributes and
answer characteristics to predict, within a given category, whether a particular
answer will be chosen as the best answer by the asker.
2.3
15
CHAPTER 3
SYSTEM ANALYSIS
3.1
EXISTING SYSTEM:
16
3.2
PROPOSED SYSTEM:
17
FOR EXAMPLES:
CATEGORY
ALL
SAMPLE QUESTIONS
What is it?
Is it in stock?
PRODUCT
How much is this on Amazon?
Where can I buy it?
What is its rating?
ENTERTAINMENT What is its review?
Is there a sequel?
Is there a blue-ray edition?
MOVIE
What is its boxoffice?
Who is the director?
Is it a fiction?
BOOK
Is there a paperback edition?
Who is the author?
Where is it?
LANDMARK
Who is the architect?
When was it built?
TABLE 3.1 Sample questions answerable by the
template-based QA layer.
WH-Question QA
Event Elements
Who/Whose/Whom
Subject, Object
Where
When
Location
Time
What
Which
How
Quantity, Description
ADVANTAGES:
The benefits from solving the above challenge would be enormous. Potential
applications include 1) a formalized machine-readable encyclopedia that can be
queried with high precision like a semantic database; 2) a key asset for
disambiguating entities by supporting fast and accurate mappings of textual
phrases onto named entities in the knowledge base; 3) an enabler for entityrelation- ship-oriented semantic search on the Web, for detecting entities and
relations in Web pages and reasoning about them in expressive (probabilistic)
logics; 4) a backbone for natural-language question answering that would aid in
dealing with entities and their relationships in answering who/where/when/ etc.
questions; 5) a catalyst for acquisition of further knowledge and largely automated
maintenance and growth of the knowledge base
20
CHAPTER 4
SOFTWARE DESCRIPTION
SOFTWARE REQUIREMENTS:
Operating system
Windows XP Professional
Environment
.Net framework
Version 3.5
Language
C#.NET
Web technology
ASP.NET
Backend
PROCESSOR
RAM
128 MD SD RAM
MONITOR
15 COLOR
HARD DISK
20 GB
FLOPPY DRIVE
1.44 MB
CD DRIVE
LG 52X
KEYBOARD
MOUSE
3 BUTTONS
HARDWARE REQUIREMENTS
21
SOFTWARE SPECIFICATION
Microsoft C#. Net used as front end tool. The reason for selecting C# dot
Net as front end tool as follows:
C#. Net has flexibility , allowing one or more language to interoperate to
provide the solution. This Cross Language Compatibility allows to do
project at faster rate.
C#. Net has Common Language Runtime , that allows all the component to
converge into one intermediate format and then can interact.
C#. Net has provide excellent security when your application is executed in
the system
C#.Net has flexibility, allowing us to configure the working environment to
best suit our individual style. We can choose between a single and multiple
document interfaces, and we can adjust the size and positioning of the
various IDE elements.
C#. Net has Intelligence
FEATURES OF DOTNET
When .NET was announced in late 1999, Microsoft positioned the
technology as a platform for building and consuming Extensible Markup Language
(XML) Web services. XML Web services allow any type of application, be it a
Windows- or browser-based application running on any type of computer system,
to consume data from any type of server over the Internet. The reason this idea is
so great is the way in which the XML messages are transferred: over established
23
standard protocols that exist today. Using protocols such as SOAP, HTTP, and
SMTP, XML Web services make it possible to expose data over the wire with little
or no modifications to your existing code. Figure 4.1 presents a high-level
overview of the .NET Framework and how XML Web services are positioned.
Fig 4.1
Stateless XML Web services model.
Since the initial announcement of the .NET Framework, it's taken on many new
and different meanings to different people. To a developer, .NET means a great
environment for creating robust distributed applications. To an IT manager, .NET
means simpler deployment of applications to end users, tighter security, and
simpler management. To a CTO or CIO, .NET means happier developers using
state-of-the-art development technologies and a smaller bottom line. To understand
why all these statements are true, you need to get a grip on what the .NET
Framework consists of, and how it's truly a revolutionary step forward for
application architecture, development, and deployment.
24
.NET FRAMEWORK
Now that you are familiar with the major goals of the .NET Framework,
let's briefly examine its architecture. As you can see in Figure 3-2, the .NET
Framework sits on top of the operating system, which can be a few different
flavors of Windows and consists of a number of components .NET is essentially a
system application that runs on Windows. Conceptually, the CLR and the JVM are
similar in that they are both runtime infrastructures that abstract the underlying
platform differences. However, while the JVM officially supports only the Java
language, the CLR supports any language that can be represented in its Common
Intermediate Language (CIL).
the key technology behind ASP.NET, include a number of classes that allow you to
rapidly develop web Graphical User Interface (GUI) applications.
If you're currently developing web applications with Visual Interdev, you
can think of Web Forms as a facility that allows you to develop web GUIs using
the same drag-and-drop approach as if you were developing the GUIs in Visual
Basic. Simply drag-and-drop controls onto your Web Form, double-click on a
control, and write the code to respond to the associated event. Forms support a set
of classes that allow you to develop native Windows GUI applications. You can
think of these classes collectively as a much better version of the MFC in C++
because they support easier and more powerful GUI development and provide a
common, consistent interface that can be used in all languages.
THE COMMON LANGUAGE RUNTIME:
At the heart of the .NET Framework is the common language runtime. The
common language runtime is responsible for providing the execution environment
that code written in a .NET language runs under. The common language runtime
can be compared to the Visual Basic 6 runtime, except that the common language
runtime is designed to handle all .NET languages, not just one, as the Visual Basic
6 runtime did for Visual Basic 6. The following list describes some of the benefits
the common language runtime gives you
Cross-language debugging
XCOPY deployments
You might expect all those features, but this has never been possible using
Microsoft development tools. Figure 10.3 shows where the common language
runtime fits into the .NET Framework.
The common language runtime and the .NET Framework.
28
When you compile in .NET, you're converting your codeno matter what
.NET language you're usinginto an assembly made up of an intermediate
language called Microsoft Intermediate Language (MSIL or just IL, for short). The
IL contains all the information about your application, including methods,
properties, events, types, exceptions, security objects, and so on, and it also
includes metadata about what types in your code can or cannot be exposed to other
applications. This was called a type library in Visual Basic 6 or an IDL (interface
definition language) file in C++. In .NET, it's simply the metadata that the IL
contains about your assembly.
29
31
all the description information for the assembly. However, the assembly manifest
can be contained in its own file or within one of the assemblys modules. An
assembly contains one or more modules. A module contains the code that makes
up your application or library, and it contains metadata that describes that code.
When you compile a project into an assembly, your code is converted
from high-level code to IL. Because all managed code is first converted to IL code,
applications written in different languages can easily interact. For example, one
developer might write an application in Visual C# that accesses a DLL in Visual
Basic .NET. Both resources will be converted to IL modules before being
executed, thus avoiding any language-incompatibility issues. Each module also
contains a number of types.
32
rest of the application environment without detailing the inner workings of the
object itself. Objects are created from a template called a class. The .NET base
class library provides a set of classes from which you can create objects in your
applications. You also can use the Microsoft Visual Studio programming
environment to create your own classes. This lesson introduces you to the concepts
associated with object-oriented programming.
OVERVIEW OF ADO.NET
Most applications require some kind of data access. Desktop applications
need to integrate with central databases, Extensible Markup Language (XML) data
stores, or local desktop databases. ADO.NET data-access technology allows
simple, powerful data access while maximizing system resource usage. Different
applications have different requirements for data access. Whether your application
simply displays the contents of a table, or processes and updates data to a central
SQL server, ADO.NET provides the tools to implement data access easily and
efficiently.
DISCONNECTED DATABASE ACCESS
Previous data-access technologies provided continuously connected data
access by default. In such a model, an application creates a connection to a
database and keeps the connection open for the life of the application, or at least
for the amount of time that data is required. However, as applications become more
complex and databases serve more and more clients, connected data access is
impractical for a variety of reasons, including the following:
34
Open database connections can quickly consume all available database licenses,
which can be a significant expense. In order to work within a limited set of
client licenses, connections must be reused whenever possible.
ADO.NET addresses these issues by implementing a disconnected data
access model by default. In this model, data connections are established and left
open only long enough to perform the requisite action. For example, if an
application requests data from a database, the connection opens just long enough to
load the data into the application, and then it closes. Likewise, if a database is
updated, the connection opens to execute the UPDATE command, and then closes
again.
By keeping connections open only for the minimum required time, ADO.NET
conserves system resources and allows data access to scale up with a minimal
impact on performance.
ADO.NET DATA ARCHITECTURE
Data access in ADO.NET relies on two entities: the Dataset, which stores
data on the local machine, and the Data Provider, a set of components that
mediates interaction between the program and the database.
35
The DATASET
The Dataset is a disconnected, in-memory representation of data. It can be
thought of as a local copy of the relevant portions of a database. Data can be
loaded into a Dataset from any valid data source, such as a SQL Server database, a
Microsoft Access database, or an XML file. The Dataset persists in memory, and
the data therein can be manipulated and updated independent of the database.
When appropriate, the Dataset can then act as a template for updating the central
database.
The Dataset object contains a collection of zero or more Data Table objects,
each of which is an in-memory representation of a single table. The structure of a
particular Data Table is defined by the Data Columns collection, which enumerates
the columns in a particular table, and the Constraint collection, which enumerates
any constraints on the table. Together, these two collections make up the table
schema. A Data Table also contains a Data Rows collection, which contains the
actual data in the Dataset.
The Dataset contains a Data Relations collection. A Data Relation object
allows you to create associations between rows in one table and rows in another
table. The Data Relations collection enumerates a set of Data Relation objects that
define the relationships between tables in the Dataset. For example, consider a
Dataset that contains two related tables: an Employees table and a Projects table. In
the Employees table, each employee is represented only once and is identified by a
unique Employee field. In the Projects table, an employee in charge of a project is
identified by the Employee field, but can appear more than once if that employee is
in charge of multiple projects. This is an example of a one-to-many relationship;
36
you would use a Data Relation object to define this relationship. Additionally, a
Dataset contains an Extended Properties collection, which is used to store custom
information about the Dataset.
THE DATA PROVIDER
The link to the database is created and maintained by a data provider. A data
provider is not a single component; rather it is a set of related components that
work together to provide data in an efficient, performance-driven manner. The first
version of the Microsoft .NET Framework shipped with two data providers: the
SQL Server .NET Data Provider, designed specifically to work with SQL Server 7
or later, and the Loeb .NET Data Provider, which connects with other types of
databases. Microsoft Visual Studio .NET 2005 added two more data providers: the
ODBC Data Provider and the Oracle Data Provider. Each data provider consists of
versions of the following generic component classes:
The Connection object provides the connection to the database.
complete tables. Command objects provide three methods that are used to execute
commands on the database.
EXECUTENONQUERY
Executes commands that return no records, such as INSERT, UPDATE, or
DELETE
EXECUTESCALAR
Returns a single value from a database query
EXECUTEREADER
Returns a result set by way of a DataReader object
39
INSERT COMMAND
Contains the command text or object that inserts a row into a table.
DELETE COMMAND
Contains the command text or object that deletes a row from a table.
UPDATE COMMAND
Contains the command text or object that updates the values of a
database.
When the Update method is called, changes in the DataSet are copied back to the
database, and the appropriate Insert Command, Delete Command, or Update
Command is executed.
40
ACCESSING DATA
Visual Studio .NET has many built-in wizards and designers to help you
shape your data-access architecture rapidly and efficiently. With minimal actual
coding, you can implement robust data access for your application. However, the
ADO.NET object model is fully available through code to implement customized
features or to fine-tune your program.
FEATURES OF SQL SERVER
The OLAP Services feature available in SQL Server version 7.0 is now called
SQL Server 2000 Analysis Services. The term OLAP Services has been replaced
with the term Analysis Services. Analysis Services also includes a new data mining
component. The Repository component available in SQL Server version 7.0 is now
called Microsoft SQL Server 2000 Meta Data Services. References to the
component now use the term Meta Data Services.
SQL-SERVER database consist of six type of objects, They are,
1. TABLE
2. QUERY
3. FORM
4. REPORT
5. MACRO
6. MODULE
41
TABLE:
A database is a collection of data about a specific topic.
VIEWS OF TABLE:
We can work with a table in two types,
1. Design View
2. Datasheet View
QUERY:
A query is a question that has to be asked the data. Access gathers data that
answers the question from one or more table. The data that make up the answer
is either dynaset (if you edit it) or a snapshot (it cannot be edited).Each time we
run query, we get latest information in the dynaset. Access either displays the
dynaset or snapshot for us to view or perform an action on it, such as deleting or
updating.
FORMS:
A form is used to view and edit information in the database record by
record .A form displays only the information we want to see in the way we
want to see it. Forms use the familiar controls such as textboxes and
checkboxes. This makes viewing and entering data easy.
42
VIEWS OF FORM:
We can work with forms in several primarily there are two views,
They are,
Design View
Form View
DESIGN VIEW:
To build or modify the structure of a form, we work in forms design view.
We can add control to the form that are bound to fields in a table or query,
includes textboxes, option buttons, graphs and pictures.
FORM VIEW:
The form view which display the whole design of the form.
REPORT:
A report is used to views and print information from the database. The
report can ground records into many levels and compute totals and average by
checking values from many records at once. Also the report is attractive and
distinctive because we have control over the size and appearance of it.
MACRO:
A macro is a set of actions. Each action in macros does something. Such as
opening a form or printing a report .We write macros to automate the common
tasks the work easy and save the time.
MODULE:
Modules are units of code written in access basic language. We can write and
use module to automate and customize the database in very sophisticated ways.
43
CHAPTER 5
SYSTEM DESIGN
5.1
ARCHITECTURAL DIAGRAM:
44
45
5.2
ALGORITHM
Sim(u,u)=sum[R(u,i).R(u,i)]/sqrt[sum[R(u,i)2].sqrt[sum[R(u,i)]
Where I (u, u') represents the set of all items rated by both user u and user u'. Based
on the similarity calculation, set N (u) of nearest neighbors of user u is obtained.
The size of set N (u) can range anywhere from 1 to |U|-1, i.e., all other users in the
dataset.
46
CHAPTER 6
MODULE DESCRIPTION
6.1
MODULES
Posting the opinion
Recommendation Technique
Rating Prediction
Ranking Approach
6.2
MODULES DESCRIPTION
48
CHAPTER 7
CONCLUSION
49
APPENDICES-1
Source Code:
Admin Login:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
Ask Question:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Windows.Forms;
51
Doc Details:
using System;
using System.Data;
52
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
using System.Windows.Forms;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string vfilename = string.Empty;
string filename = string.Empty;
MessageBox.Show("Saved");
}
}
Doc Register:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
Register:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
56
con.Close();
}
}
}
Search:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
con.Close();
}
}
}
void textbind()
{
SqlConnection connection = new
SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString
);
SqlCommand command = new SqlCommand("SELECT* from replydata where
ques like '%" + TextBox1.Text + "%'", connection);
SqlDataAdapter ada = new SqlDataAdapter(command);
ada.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
View:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
60
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
61
APPENDICES-2
SCREENSHOTS:
User registration:
62
User aa login:
Other inbox
63
Raise question:
Another user cc
65
Other user going to anwer the aa question:(user open other inbox to view aa
question)
66
67
68
69
70
71
REFERENCES
[1]
[2]
[3]
H. Cui, M.-Y. Kan, and T.-S. Chua,(2007) Soft pattern matching models
for definitional question answering, ACM Trans. Inf. Syst., vol. 25, no. 2,
pp. 3030.
[4]
[5]
[6]
[7]
[8]
Z.-J. Zha, X.-S. Hua, T. Mei, J. Wang, G.-J. Qi, and Z. Wang,(2008)Joint
multi-
73