final report.doc
DESCRIPTION
TRANSCRIPT
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
Adaptive Job Recommendation System
INFSCI 2955: Adaptive Web Systems By Peter Brusilovsky
Final Project Documentation by JungShan Lee & Zhou Yuan
1/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
Table of Contents
1. Motivation and Acknowledgements....................................31.1 Motivation.....................................................................................................................3
1.2 Acknowledgements.......................................................................................................3
2. Requirments and Goals........................................................42.1 Requirements Analysis..................................................................................................4
2.2 Goal of Adaptive Job Recommendation........................................................................4
3. System Design and Explanation..........................................53.1 Feeds Cache Mechanism...............................................................................................6
3.2 Job Feeds Match and Ranking Method.........................................................................7
3.3 The Login Part..............................................................................................................9
3.4 Home Page..................................................................................................................10
3.5 My Keywords & Recommended Jobs.........................................................................11
3.6 Up-to-Date Search......................................................................................................14
3.7 My Saved Jobs............................................................................................................15
4. Conclusion...........................................................................17
5. Constraints and Future Work...........................................185.1 Constraints of Current System....................................................................................18
5.2 Future Work................................................................................................................18
6. References and Glossary....................................................196.1 References...................................................................................................................19
6.2 Glossary......................................................................................................................19
2/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
1. Motivation and Acknowledgements
1.1 Motivation
Motivated by the knowledge we learned from Adaptive Web System by Peter Brusilovsky, we
designed and developed this “Adaptive Job Recommendation” system in the hope that the
user can read personalized job feeds based on keyword-level user model without losing
privacy.
1.2 Acknowledgements
The project was motivated by Peter Brusilovsky. He provided us the opportunity to develop
an Adaptive System based on the knowledge we learned from the class. We built the system
with PHP web language and MySql database. In the system, we also used some technologies
to support our development, SimplePie and Ajax with jQuery. The following are the brief
introduction of these technologies.
SimplePie is a very fast and easy-to-use class, written in PHP, which puts the “simple” back
into “really simple syndication”. Flexible enough to suit beginners and veterans alike,
SimplePie is focused on speed, ease of use, compatibility and standards compliance. You can
find more information about it at http://simplepie.org/.
All the Ajax works and editable content of this project are based on jQuery and PHP. jQuery
is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that
simplifies HTML document traversing, event handling, animating, and Ajax interactions for
rapid web development. jQuery is designed to change the way that you write JavaScript –
Write less, do more. The login part in this project are based on this following article
http://www.chazzuka.com/blog/?p=82 and we changed slightly.
3/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
2. Requirments and Goals
2.1 Requirements Analysis
A web feed (or news feed) is a data format used for providing users with frequently updated
content. Content distributors syndicate a web feed, thereby allowing users to subscribe to it.
Making a collection of web feeds accessible in one spot is known as aggregation
(http://en.wikipedia.org/wiki/Web_feed), but with the rapid growing of web feeds it becomes
harder for single user to read personalized feeds, especially for the job hunters to read
personalized job information based on web feeds.
2.2 Goal of Adaptive Job Recommendation
The main goal of my design of “Adaptive Job Recommendation” is to enable users to get the
right job feeds information they want quickly and easily, and also save the preferred jobs for
future reference.
Besides, another goal of this system is to create an open keyword-level user model based on
which the job feeds can be filtered and personalized. Such model adds transparency and
controllability to this system. From the use’s point of view, no personal/privacy information is
required to filter feeds so that to produce personalized job feeds.
4/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
3. System Design and Explanation
Here is the project tree view (Figure 1.). We will describe the important things about this
project using some file icons to make the description more user-friendly. Meantime, you can
also know the basic structure of this project.
Project Tree
Figure 1. Project Tree View
The main structure of this system shows in below organizational diagram. We wil focus on
some significant features.
Feeds Cache Mechanism
User Preferred Keywords and Weighting
Recommended Jobs by User Keywords
Up-to-Date Job Search
User Saved Jobs
5/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
Figure 2. Organizational Diagram
3.1 Feeds Cache Mechanism
The cache folder caches the feeds fetched by SimplePie.inc .
Process:
1. You tell SimplePie what feed you want to get and where to cache it.
2. SimplePie looks to see if the feed is already cached:
1) If the cache is fresh use that.
2) If there is no cached copy at all, SimplePie will grab and cache the feed.
3) If the cache is there but it's old (SimplePie defaults to 60 minutes; configurable with
set_cache_duration()), then SimplePie will ask the feed if it has changed since the last
time we grabbed it (this is the HTTPCG part).
i. If it hasn't changed, we reset the timer on the cache's freshness and keep it for
another 60 minutes before checking again.
ii. If the cache has changed, SimplePie dumps the existing cache (since the cache
is just a copy of the data object based on the feed), and grabs a new copy of the
feed and uses it.
With the assistance of cache machnisim I don’t need to create a database table only for storing
the updated feeds. The server’s load has been reduced, too.
6/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
3.2 Job Feeds Match and Ranking Method
The following code is the most important chunk in , which uses SimplePie fetch
feeds from target source and caculate sum weight for each feed based on user’s
keyword/weight pair. Then all the information, including feed title, permanent link,
description, posted time, and sum weight will be pushed into a 2d array $feeditem. And then
we sort this 2d array using function multisort order by ‘sum’ field descendingly. Finally,
display the feeds list in different styles.
<?php
$query1 = "SELECT * FROM jobs";
$result1 = $mysqli->query($query1);
$jobs = array();
while ($row1 = $result1->fetch_assoc()) {
$keywords = "";
$weightsum = 0;
$data = array();
$query2 = "SELECT * FROM goals WHERE uid=1 ORDER BY weight DESC";
$result2 = $mysqli->query($query2);
while ($row2 = $result2->fetch_assoc()) {
if (stristr($row1['title'].$row1['description'], $row2['goal'])) {
$keywords .= "[".$row2['goal']."] ";
$weightsum = $weightsum + $row2['weight'];
}
}
$data['keywords'] = $keywords;
$data['sum'] = $weightsum;
$data['title'] = $row1['title'];
$data['link'] = $row1['link'];
$data['description'] = $row1['description'];
$data['posted_time'] = $row1['posted_time'];
array_push($jobs, $data);
}
7/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
function multisort($array)
{
for ($i = 1; $i < func_num_args(); $i += 3) {
$key = func_get_arg($i);
$order = true;
if ($i + 1 < func_num_args())
$order = func_get_arg($i + 1);
$type = 0;
if ($i + 2 < func_num_args())
$type = func_get_arg($i + 2);
switch($type) {
case 1: // Case insensitive natural.
$t = 'strcasenatcmp($a[' . $key . '], $b[' . $key . '])';
break;
case 2: // Numeric.
$t = '$a[' . $key . '] - $b[' . $key . ']';
break;
case 3: // Case sensitive string.
$t = 'strcmp($a[' . $key . '], $b[' . $key . '])';
break;
case 4: // Case insensitive string.
$t = 'strcasecmp($a[' . $key . '], $b[' . $key . '])';
break;
default: // Case sensitive natural.
$t = 'strnatcmp($a[' . $key . '], $b[' . $key . '])';
break;
}
uasort($array, create_function('$a, $b', 'return ' . ($order ? '' : '-') . '(' . $t . ');'));
}
return $array;
}
$jobs = multisort($jobs, "'sum'", 0); //sort the 2d array by 'sum' field
foreach ($jobs as $job) {
8/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
$query3 = "SELECT * FROM saved WHERE title='".$job['title']."' AND link='".
$job['link']."'";
$result3 = $mysqli->query($query3);
echo "<div class=\"item\">";
if ($result3->num_rows > 0) {
echo "<h2><em class=\"sumweight\">[".$job['sum']."]</em> <a href=\"".
$job['link']."\">".$job['title']."</a><span class=\"saved\"><img src=\"images/saved.gif\"
title=\"You have saved this job\" /></span></h2>";
} else {
echo "<h2><em class=\"sumweight\">[".$job['sum']."]</em> <a href=\"".
$job['link']."\">".$job['title']."</a><span class=\"save_add\"><img
src=\"images/save_add.gif\" class=\"save_add\" name=\"".$job['title']."\"
id=\"".urlencode($job['link'])."\" title=\"Click to save this job\" /></span></h2>";
}
echo "<p>Matched Keywords: ".$job['keywords']."</p>";
echo "<p>".$job['description']."</p>";
echo "<p><small>Posted on ".$job['posted_time']."</small></p>";
echo "</div>";
}
?>
3.3 The Login Part
This is an Ajax user login page (Figure 3.). You can choose use MySQL database to store the
user’s login information or you can also use JSON to process the login data. Besides, you can
also define the login combination, for example, the combination of username/password,
email/password, and username/email/password.
When you put the cursor in the input field the background of field becomes highlighted at the
same time, we like it because it is user-friendly, and maybe it is useful for some user with
cognitive problems.
9/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
Figure 3. The Login Page
3.4 Home Page
There are several important achievements in the system. We introduced each of them below,
categorized them into the suitable adaptive topics we learned from the adaptive web system
class and explained with the screenshots of the system.
Figure 4. Home Page
10/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
3.5 My Keywords & Recommended Jobs
Once login into the system, the home page contains the primary functions in the system. The
content page was divided into two parts: “My Keywords” and “Recommended Jobs”. Below
we gave the detailed explanation of the functions.
My Keywords
On the left part of the above screenshot (Figure 4.), you can input any keywords and assign
them different weights range from 1 to 100 depending on how important you weight for the
keyword. I’m not sure whether this scalar range is the best one, but it allows the user input
many keywords and order them differently. Also, the keywords display by weight number
from greatest to smallest, in descent order. If you want to change one of your keywords, just
delete it by clicking icon and create a new one.
The adaptive topics we have covered: Open Keyword-Level User Profile
Users do not have to provide any personal information but the keywords they preferred, and
the system does not need to work on the users’ personal information as well. This feature
provides the privacy protected for job seekers (Figure 5.).
Figure 5. User Profile
11/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
The adaptive topics we have covered: Adaptive Presentation
Users can delete the keywords by clicking on the icon directly (Figure 6.). The input
method for the weighting is colored slider, which implies the idea of vague weighting while
users do not know the exact number to insert (Figure 7.).
Figure 6. Delete Icon
Figure 7. Colored Slider
Recommended Jobs
On the left part of the above screenshot (Figure 4.), there are several Job Feed tabs, which
provide you different feeds source. Current the feed source are defined by me for testing
purpose, in the future I will let the users to add their own feeds tabs. The default feed is
“Feed1” and there is a list of recent feeds from this source. SimplePie does a great job on
fetching and parsing different feeds. Most of the feeds, no matter their formats is RSS or
Atom, they can be parsed by SimplePie. You can see the title of each feed and their brief
summary/description, the posted time as well.
The color [%] at the beginning of each feed shows you the total sum weight based on your
keywords and their corresponding weights. The feeds will display by total sum weight from
greatest to smallest. In this case, the first feed of this source might be the best feed for you
based on your defined keywords and their weight.
You can click the title of job to see all the content of it. And the icon at the end of a default
job title stands for that you can save this job to the “My Saved Jobs” if you want to view them
later, because jobs will be updated at a timely manner and it’s hard to find the old jobs that
12/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
you might want to come back sometime. After clicking this icon it will changed into
another icon , which tells you that this is a save job.
The adaptive topics we have covered: Content-Based Recommendation
The recommended jobs we gave are filter by the keywords user inputted (Figure 8.). The jobs
are retrieved from the RSS feed we cached with SimplePie and saved in the database. The
total sum weight percentage is calculated by the sum of keywords that appeared from the title
and the description in the field of each job divided with the total sum of the user keywords.
Figure 8. Keywords Filter
The adaptive topics we have covered: Adaptive Presentation
The recommended jobs are displayed in a descent order of the matched weighting percentage
(Figure 9.). After each job title, user can add the job into their saved job by clicking on the
icon , and the icon changed to , which shows the saved status of the job.
13/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
Figure 9 Ranking & Saved Icon
The adaptive topics we have covered: Usability Engineering
All the recommended jobs are separated by different sources with Tabs (Figure 10.). We
consider that this is the feature of usability, allowing more content in the same page, and we
found it matched with the paper “Usability Engineering for the Adaptive Web” recommended
from Michael Yudelson in the topic “Empirical Evaluation of Personalized Web Systems”.
Figure 10. Tabs
3.6 Up-to-Date Search
For the Recommended Jobs and My Keywords functions, we retrieved the jobs from the RSS
feed saved in the database. We considered that user might have demand to get some more
extra information from other resource. Thus, we provided this function allowing users to
search from the URLs they preferred and showing the result in our organized format,
14/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
consistent with the recommended job page (Figure 11.). Except the URLs, user can also input
keywords as search query. The result will retrieve from the URLs user inserts.
Figure 11. Search Jobs, URL is
http://www.careerbuilder.com/RTQ/JobRecommendationsRSS.aspx?
DossierDID=DNH0K06QNK5HMQS2FVM&DateStarted=2009-04-20T23%3a48%3a41
The adaptive topics we have covered: Personalized Search
The function allows user insert and search keywords in the URLs they query (Figure 11.). We
categorized this function in personalized search topic, because user can put their personal
search in our website and also get the result in a structural layout consistent with the whole
system. Also, there is an implicit expectation that user can learn and refine their
recommended jobs result by searching their own URLs. For example, users might look into
the titles of the content and figure out some important words that they can add into their own
keywords.
15/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
3.7 My Saved Jobs
In the saved job page (Figure 12.), the jobs are saved from the recommended jobs page. With
the consistency, users can delete the saved job from the list by clicking on the delete icon .
The purpose of this function is that users can save the job they like for the future followed up.
Also, by saved jobs, users do not have to wonder how to get the job information next time.
Figure 12. Saved Jobs
The adaptive topics we have covered: Adaptive Presentation
Users can delete the saved job by clicking on the icon directly (Figure 12.). Meanwhile,
users can view the keywords they created to understand the condition the job was
recommended. We considered this is the adaptive feature since the same job might be
recommended to many different users; however, the ranking is depended on the weighting
each user gives. Different user gets different ranking result best matched their requirements.
16/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
4. Conclusion
Overall, the system provides the recommended job by open keyword-level user model profile
with only keywords information from users, and content-based recommended method with
calculating the ranking from user given keyword weighting. Then, user can do the
personalized saved jobs on the recommended job page and viewing from the independent
page. The other significant feature on the system is personalized resource search, by which
user can do the keyword based search on the URLs they are interested in. In the end, we
implemented the system with a uniform layout, and took adaptive presentation into account
on the whole system with simple and consistent icons on the similar items. We hoped user can
get the overall idea of the presentation by working on this effort.
17/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
5. Constraints and Future Work
5.1 Constraints of Current System
I believe that there is no constraint of thinking how to design a great web application, but
there are constraints of how to implement the design into real good web application.
1. The users can not add their own job feeds sources
2. There is no registeration section for creating new users, because I’m still thinking how to
make this system more open.
3. The scalar value used for keyword weight may need more resonable support.
4. The method we are using is keyword-based weight ranking, but the user sometines
doesn’t know how to decide a keyword and how to order/weight the keywords. So the
ranking results may be not very accurate.
5. The user can not read other user’s annotations.
5.2 Future Work
As future work, we are still shaping my ideas to make this system better. Maybe we should
improve the things have been mentioned above first or maybe we will change the direction of
this project later. Hard to predicate.
But we hope that we can make as many contribution as we can to enhance the process of
Semantic Web.
The following are some further improvements we might to make:
1. Evaluation – user study, experiments, questionnaires
2. Allow user to enable and disable some keywords
3. Choose a better alogrithm to improve recommendation accuracy
4. Give recommendations based on both keywords and saved jobs history
5. Insert feeds data into database at a timely manner
6. Develop some features using the theory of Collaborative filtering
18/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
6. References and Glossary
6.1 References
[1] Bibeault, Bear. JQuery in action / Bear Bibeault, Yehuda Katz.
[2] Ayers, Danny. Beginning RSS and Atom programming / Danny Ayers, Andrew Watt.
[3] Ahn, J., Brusilovsky, P., Grady, J., He, D., and Syn, S. Y. (2007) Open user profiles for
adaptive news systems: help or harm?
[4] Gena, C., and Weibelzahl, S. (2007). Usability Engineering for the Adaptive Web. In: P.
Brusilovsky, A. Kobsa and W. Neidl (eds.): The Adaptive Web: Methods and Strategies of
Web Personalization. Lecture Notes in Computer Science, Vol. 4321, Berlin Heidelberg New
York: Springer-Verlag, pp.720-762.
6.2 Glossary
Ajax http://en.wikipedia.org/wiki/AJAX
CSS http://en.wikipedia.org/wiki/CSS
JavaScript http://en.wikipedia.org/wiki/JavaScript
jQuery http://en.wikipedia.org/wiki/Jquery
PHP http://en.wikipedia.org/wiki/PHP
SimplePie http://simplepie.org/
Web Feed http://en.wikipedia.org/wiki/Web_feed
Monster Feed http://rss.jobsearch.monster.com/rssquery.ashx?q=PHP&q=
%20Developer&q=%20XHTML&q=%20CSS&q=
%20XML&q=%20XSLT&q=%20MySQL&q=
%20Javascript&q=
%20DOM&cy=us&lid=316&re=0&pg=1&dv=1&baseurl=jobv
iew.monster.com
Indeed Feed http://rss.indeed.com/rss?q=PHP%2C+Developer
%2C+XHTML%2C+CSS%2C+XML%2C+XSLT%2C+Mysql
%2C+Sql+server%2C+Oracle%2C+javascrpt%2C+actionscript
%2C+java%2C+DOM%2C+flash&l=Pittsburgh%2C+PA
Yahoo HotJobs Feed http://hotjobs.yahoo.com/job-rss-l-Pittsburgh-PA-k-(PHP%2C
%20developer%2C%20XHTML%2C%20CSS%2C%20XML
19/20
Adaptive Web Systems Final Project JungShan Lee & Zhou Yuan
%2C%20XSLT%2C%20Mysql%2C%20sql%20server%2C
%20oracle%2C%20javascript%2C%20DOM%2C
%20actionscript%2C%20flash)-d-FT-d-PT-j-PERM-j-CONT-h-
PHP%2C%20developer%2C%20XHTML%2C%20CSS%2C
%20XML%2C%20XSLT%2C%20Mysql%2C%20sql
%20server%2C%20oracle%2C%20javascript%2C%20DOM
%2C%20actionscript%2C%20flash-f-
kwany;_ylt=AncAXIQsqUfiHz82VgQ58xP6Q6IX
Career Builder RSS Feed http://www.careerbuilder.com/RTQ/
JobRecommendationsRSS.aspx?
DossierDID=DNH0K06QNK5HMQS2FVM&DateStarted=200
9-04-20T23%3a48%3a41
20/20