Download presentation
Presentation is loading. Please wait.
Published byDennis Jenkins Modified over 9 years ago
1
BlogWall at Kent Ridge MRT Station Janaka Prasad 02/07/2008
2
Project Plan
3
SMS reading and writing to database/ Testing Task 10 – completed SMS read by the SMSReader written to 2 tables “sms”, “sms_log” “sms_log” will log of all the SMS received by the system Status in “sms” indicate who to process it next Status = 0 SMS Processor application Status = 1 Display application Valid in “sms” indicate validity of the SMS Valid = 0 Invalid SMS Valid = 1 Valid SMS
4
SMS reading and writing to database/ Testing Base on the traffic of the system “sms_log” table may grow very rapidly necessary to clear contents of this table from time to time Developed a tool to do this task
5
SMS reading and writing to database/ Testing
6
Processing SMS from the database/ Testing Task 12 – completed Reading configuration file Polling Banned words Invalid characters POSTagger Finding poetry
7
Reading configuration file How the application is going to work is set using the configuration file Located at Data\settings.cfg Data read from the config file are No. of keywords selected from the SMS Default 3 No. of synonyms selected for each keyword Default 1 Connect to Internet to generate synonyms? 1 YES 0 NO Remove banned words? 1 YES 0 NO Maximum length of the SMS Default 100 Polling enabled? 1 YES 0 NO
8
Polling Polling data is held in “poll” and “poll_answers” tables
9
Polling
11
Banned words If the SMS contains banned words we can not display them “swearwords” table hold all the banned words When the system initialize all the words in that table get loaded to a list to compare against the words in the SMS
12
Invalid characters If the SMS contains characters that the POSTagger can not process it will generate an error All the chars that can be processed by the system get loaded to a list when the system initialize The SMS is checked to see whether it contains any chars other than what is in the list
13
Finding the poetry The application goes to a infinite loop and check the “sms” table with entries with status==0 Check for length of the SMS If > Max length error Check SMS is poll answer Update poll answers table Check for invalid chars Set valid=0 Process message with POSTagger If return text length == 0 then error
14
Finding the poetry Check No. of words in the SMS Less than 3 unique words valid=0 Check for length of each word in the SMS If > 40 malicious attack? valid=0 Check for banned words Error Calculate emotional weight of the SMS Identify the tag ids in the output string generated by POSTagger Retrieve the tf-idf weight of each word from the database Select maximum weighted words Store results in “sms_text_word”
15
Finding the poetry
16
Post each of the selected word to free dictionary website (http://www.thefreedictionary.com) Analyze HTML response from the website to find the synonyms for each of the word Retrieve the tf-idf weight of each synonym from the database Select maximum weighted synonyms Store the result in “sms_synonym” table
17
Finding the poetry Find poetry lines from the database where the selected synonym is used in the same context as in the SMS Select the final poetry line which maximize the tf weight and minimizes emotional weight difference to the users SMS
18
Data entry 234 poems added to the database
19
Important points … Testing still processing Shinsuke will come up with the first visuals by this week OpenGL, FreeType
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.