40 |
54 |
├── Major ├── ASIN.txt ├── TestPhone.json ├── __pycache__ │ └── sentiment2.cpython-35.pyc ├── accuracy.py ├── amazon.php ├── amazon_ajax.php ├── amazon_search.py ├── amazon_sentiment.py ├── amazon_sentiment.pyc ├── css │ ├── amazon_css.css │ ├── bootstrap.min.css │ ├── opensans.css │ └── style.css ├── facebook.php ├── get_product.py ├── harddrive.json ├── headset.json ├── images │ ├── amazon.png │ ├── notavailable.png │ └── search.png ├── index.php ├── js │ ├── bootstrap.min.js │ └── jquery.min.js ├── laptop.json ├── load.gif ├── mouse.json ├── notavailable.png ├── parse.py ├── pendrive.json ├── powerbank.json ├── python_files │ ├── __pycache__ │ │ └── sentiment2.cpython-35.pyc │ ├── amazon.txt │ ├── amazon1.py │ ├── data.json │ ├── sentiment labelled sentences │ │ ├── amazon_cells_labelled.txt │ │ ├── amazon_cells_labelled.txt~ │ │ ├── imdb_labelled.txt │ │ ├── readme.txt │ │ └── yelp_labelled.txt │ ├── sentiment.py │ ├── sentiment2.py │ ├── sentiment2.pyc │ └── youtube1.py ├── sdcard.json ├── sentiment labelled sentences │ ├── amazon_cells_labelled.txt │ ├── amazon_cells_labelled.txt~ │ ├── imdb_labelled.txt │ ├── readme.txt │ └── yelp_labelled.txt ├── sentiment.py ├── sentiment2.pyc ├── speaker.json ├── training_data.txt ├── youtube.php ├── youtube_ajax.php ├── youtube_search.py ├── youtube_sentiment.py └── youtube_sentiment.pyc ├── README.md └── _config.yml /Major/ASIN.txt: -------------------------------------------------------------------------------- 1 | Laptop-B01F4ZG68A,B01DBGVB7K,B01MQTJXWZ,B01NBE6Y5D,B01JLCKP34,B01MQD63WX,B01K1IO3QW,B01J42JPJG,B01MRS3MIS,B01CVKKZ60,B01D27ERMO 2 | 3 | power banks-B01MSHO3NB,B00JP8MZGK,B00VWV8LD4,B01G1XH46M,B01DHTV0Q8,B01LXWIHIO,B01422TC14,B0194WDVHI,B00P7N0320,B00X5RV14Y 4 | 5 | hard drive-B01F5LVTPS,B01M1NHCZT,B0088PUEPK,B00TKFEEAS,B00D0L5BH8,B01IEKG402,B00FRHTTIA,B01LQQH86A,B00TKFEEBW,B00VAT701W 6 | 7 | pen drive-B013CCTM2E,B01MTWDJ1Q,B008B8BK5W,B015CH1NAQ,B00BX5FOCK,B01BGTG2A0,B007JR5368,B003YCOMG4,B006W8U2WU,B006W8U2WU 8 | 9 | sd card- B01GQHOKEW,B0143RT8OY,B00CXI1EI4,B00WWBCSG4,B01LORO7Z6,B00FQMWTGK,B007NDL54C,B00FM5E1EY,B01N9YPY2O,B00FB463E2 10 | 11 | headset-B00N2359DU,B06XPCN4WL,B01N6MLPK0,B01LB1AK7O,B00NBEWB4U,B01A0VQOCQ,B01KK480Q6,B01GOB77F4,B00LYQPDLU,B00007M1TZ 12 | 13 | mouse and keyboard-B00W8RYVR6,B00BP5KOPA,B003NREDC8,B01A7WHWE2,B00NLZUM36,B01CDYAGPY,B00QRPPCMI,B00T94ENKQ,B003VAGXZC,B003VAHYNC 14 | 15 | speakers- B014VJD6PQ,B00EDHQ5ZK,B01IK7BS0U,B010OYASRG,B01CQOV3YO,B00GHY5F3K,B016P9HJIA,B00EZ9XKCM,B015R3XJCK,B00YO2T6ZA 16 | -------------------------------------------------------------------------------- /Major/TestPhone.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "reviews": [ 4 | { 5 | "review_header": "Great value for this price point, love the front camera!", 6 | "review_text": "Very premium look for this price point. Bought one trying out love it so far! Pros: 1. 8MP Selfie camera is definitely surprised me, most front camera at this point sucks so much. This one however looks great . If you haven't, try out the beauty mode, it guess your age and tell you are \"Mrs Dreamy\" or \"Attractive\", I'm showing off this feature to my friends and families, they were laughing how interesting this is. 2. Performance is good. Very smooth on using any app or playing videos/games. Doesn't feel any lag. 3. Customized Cool UI: it's a customized Android OS. But don't feel overwhelmed like Samsung, which typically comes with tons of pre-load apps... so I'm ok with it. Doesn't seem slow down the performance because of it. 4. There are some unique features that I find first time in phones: 1) take a full screenshot using the scroll down on a web page, great feature if i'm sharing an infographic or article to my friends. 2) on-screen recording: i literally record a whole video while it's playing and share on social... interesting 5. Unlock apps with up to 5 fingerprint. Very helpful especially using this when you are driving, i set up one unlock the phone, one quick access to google maps, one to call my husband, one to access my message app. Cons: 1. The camera isn't the best at the low lighting such as night. Can feel a little pixelated when looking at the pictures. 2. Display is a little bit small for me. I would prefer bigger than 5\". But it's personal preference.", 7 | "review_comment_count": "", 8 | "review_posted_date": "21 Jan 2017", 9 | "review_rating": "4.0 ", 10 | "review_author": " chen xin" 11 | }, 12 | { 13 | "review_header": "Cool phone by Coolpad! Conjr is a great value for spec!", 14 | "review_text": "I was excited to use this product after I read it was one of the best value smartphones launched at CES 2017. The reviews from CES sold me on the value, and I quickly pre-ordered. In the days that I have been using it, I have been very pleased with the performance. You will not be disappointed. The device is premium in look and feel. The 2.5D curved glass display and metal body are not typical in this price tier. You typically would see plastic phones at this price point. The Conjr is really nice. I also enjoy taking photos. The 8MP front camera (with LED Flash) is a camera size you wouldn't see typically at this price point. I have had fun shooting in the 'beauty' mode. It was fun to see how the camera would 'label' me and my friends. The LED flash on both front and back cameras is good. The Conjr also has a rear fingerprint scanner. I have used it so far for quick unlocking of the phone, and it identifies my fingerprint quickly. I have also used it for snapping photos from the front camera. Conjr also has a quick response in taking photos, too. You can also program up to 5 fingerprints. I use both Cricket and T-Mobile. I have used both SIM cards in the Conjr. The network compatibility and response using both SIM cards is very good. I have had no issues with making/receiving calls, texts, and using mobile data while both SIM cards are in the phone. One thing that was new to me was the CoolUI. It took a little time for me to get used to it at first. Access to quick features are able to be accessed by swiping up from the bottom of the screen. Stock Android typically gives access to these features by swiping down from the top of the screen. Once I figured that out, it was much easier to access quick settings/features. There is also cool features like \"Screen Recording\" and \"Screen Shot-Scroll Capture\". I haven't seen those previously in other phones, and those are cool features. Lastly, I have used both Bluetooth connectivity in my car and a headset for making phone calls and listening to music/podcasts. No issues using either of those features. The speaker sound quality is good to great. The speaker is located on the back of the phone. As long as you have the speaker exposed, you should have no problem with audio. After using this phone for the past week, I would recommend this phone. At this price point, it is one of the better phones available. Coolpad has impressed me with Conjr. What I'm Impressed With: ** ID - 2.5D curved glass display and metal body (no fingerprints) ** 5\" screen, lightweight ** Fingerprint Scanner (located on rear) ** Comfortable to use ** 3GB RAM ** 8MP front camera, with LED Flash (cool camera software/Beauty Mode) ** Cool UI - different, but I like it more each day ** Dual SIM and micro SD Card expansion ** Protective case included What I wished it had, but not deal breakers: ** No USB Type C charger. It uses Micro USB. ** Quad Core, not Octa Core ** Cool UI - took time to understand some of the features", 15 | "review_comment_count": "2", 16 | "review_posted_date": "19 Jan 2017", 17 | "review_rating": "5.0 ", 18 | "review_author": " ChahEnaL" 19 | }, 20 | { 21 | "review_header": "Very solid phone", 22 | "review_text": "This is very solid device overall and it has a great camera. The device feels premium in hand and works great on GSM networks. The interface is fluid and moves very fast. I would highly recommend this phone as it provides a great value for the price point. I look forward to using more Coolpad products in the future.", 23 | "review_comment_count": "", 24 | "review_posted_date": "19 Jan 2017", 25 | "review_rating": "5.0 ", 26 | "review_author": " ksolo12" 27 | }, 28 | { 29 | "review_header": "Conjr amazing phone", 30 | "review_text": "Great phone. Phone looks expensive, high tier, premier but very affordable. Getting great service, great features, love this phone.", 31 | "review_comment_count": "", 32 | "review_posted_date": "19 Jan 2017", 33 | "review_rating": "5.0 ", 34 | "review_author": " Amazon Customer" 35 | }, 36 | { 37 | "review_header": "Very cool phone", 38 | "review_text": "Pros: The product feels very comfortable in hand. The screen looks very nice and it takes great photos. I'm very impressed with the front facing camera and the flash on it. I use it every day. Overall its a very solid product. I like it very much. Cons: Have not encountered any problems Other Thoughts: I would highly recommend my friends and family members to purchase this product.", 39 | "review_comment_count": "", 40 | "review_posted_date": "14 Feb 2017", 41 | "review_rating": "5.0 ", 42 | "review_author": " Amazon Customer" 43 | }, 44 | { 45 | "review_header": "to my surprised a very good looking phone", 46 | "review_text": "I purchased the device not expecting much, to my surprised a very good looking phone. The fingerprint feature is very easy to set up an just makes it easier to use apps. I am using a TMO and ATT sim cards, with the dual SIM card feature no need to carry 2 phones. Very expensive looking phone, nice features with low price!", 47 | "review_comment_count": "", 48 | "review_posted_date": "27 Jan 2017", 49 | "review_rating": "5.0 ", 50 | "review_author": " American Patriot" 51 | }, 52 | { 53 | "review_header": "Perfect gift for elder parents", 54 | "review_text": "I love this phone, first of all, it is good for elder parents using as first LTE phone , very easy UI and icon. Camera etc it is aslo helpful . Anyway, love it love it!!! Perfect gift for your parents!!!", 55 | "review_comment_count": "", 56 | "review_posted_date": "24 Jan 2017", 57 | "review_rating": "5.0 ", 58 | "review_author": " Owen" 59 | }, 60 | { 61 | "review_header": "Great phone so far", 62 | "review_text": "Great phone so far! After going through 5 phones by Blu last year I tried this phone, way better than any Blu phone I've tried. Definitely recommend this phone by coolpad.", 63 | "review_comment_count": "", 64 | "review_posted_date": "15 Feb 2017", 65 | "review_rating": "5.0 ", 66 | "review_author": " David" 67 | } 68 | ], 69 | "ratings": { 70 | "2 star": "4%", 71 | "1 star": "7%", 72 | "4 star": "8%", 73 | "3 star": "8%", 74 | "5 star": "73%" 75 | }, 76 | "price": "$149.99", 77 | "url": "http://www.amazon.com/dp/B01MXKGK9R", 78 | "name": "Coolpad Conjr \u2013 Unlocked Smartphone, Dual Sim, Multi-Finger Unlock, 4G LTE \u2013 Iron Grey" 79 | } 80 | ] -------------------------------------------------------------------------------- /Major/__pycache__/sentiment2.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manojahi/Project-Search-A-Recommendation-system-for-Youtube-video-and-Amazon-Product-based-on-user-comments/15d630d9602b11a69340e5663ffa1b0655b82503/Major/__pycache__/sentiment2.cpython-35.pyc -------------------------------------------------------------------------------- /Major/accuracy.py: -------------------------------------------------------------------------------- 1 | import nltk 2 | import json 3 | import re 4 | def training(): 5 | tweet=[] 6 | with open("training_data.txt","r") as fp: 7 | for line in fp: 8 | le=len(line) 9 | sentiment=line[le-2] 10 | line=line[0:le-4] 11 | tweet.append([line,sentiment]) 12 | tweets=[] 13 | for (words,sentiment) in tweet: 14 | words_filtered=[e.lower() for e in words.split() if len(e)>=3] 15 | tweets.append((words_filtered,sentiment)) 16 | 17 | def get_words_in_tweets(tweets): 18 | all_words = [] 19 | for (words, sentiment) in tweets: 20 | all_words.extend(words) 21 | return all_words 22 | 23 | def get_word_features(wordlist): 24 | wordlist = nltk.FreqDist(wordlist) 25 | word_features = wordlist.keys() 26 | return word_features 27 | 28 | word_features = get_word_features(get_words_in_tweets(tweets)) 29 | 30 | def extract_features(document): 31 | document_words = set(document) 32 | features = {} 33 | for word in word_features: 34 | features['contains(%s)' % word] = (word in document_words) 35 | return features 36 | training_set = nltk.classify.apply_features(extract_features, tweets) 37 | #training classfier 38 | classifier = nltk.NaiveBayesClassifier.train(training_set) 39 | result=[] 40 | i=0 41 | tweet1=[] 42 | for i in range(0,50): 43 | tweet1.append(tweet[i]) 44 | count=0 45 | for i in range(0,50): 46 | val=classifier.classify(extract_features(tweet1[i][0].split())) 47 | if(val==tweet1[i][1]): 48 | count+=1 49 | print(count/(1.0*50)) 50 | if __name__ == "__main__": 51 | training() -------------------------------------------------------------------------------- /Major/amazon.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 |
9 |Laptop result goes here
53 |Power bank result goes here
56 |Hard Drive result goes here
59 |Pen Drive result goes here
62 |SD Cards result goes here
65 |Headset result goes here
68 |Mouse result goes here
71 |Speaker result goes here
74 |'.$youtube_json["title"].'
56 |'.$youtube_json["author_name"].'
57 | 58 |Positive '.$pos_per.'%
59 |