namb0010 commited on
Commit
0bbd349
1 Parent(s): 3342b69

Upload 3 files

Browse files
HotelListInBarcelona__en2019100120191005.csv ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,hotel_name,url,locality,reviews,tripadvisor_rating,checkIn,checkOut,price_per_night,booking_provider,no_of_deals,hotel_features
2
+ 0,Crowne Plaza Barcelona - Fira Center,http://www.tripadvisor.com/Hotel_Review-g187497-d228466-Reviews-Crowne_Plaza_Barcelona_Fira_Center-Barcelona_Catalonia.html,Barcelona,1618,,10/1/2019,10/5/2019,,Expedia.com,9,"This hotel is great for tourists who want to walk to locations. It is near 27 attractions and 157 restaurants. Free WIFI,hot tub,bar,taxi.Good for business travelers and eco friendly travelers"
3
+ 1,Hotel Barcelona 1882,http://www.tripadvisor.com/Hotel_Review-g187497-d13962383-Reviews-Hotel_Barcelona_1882-Barcelona_Catalonia.html,Barcelona,179,,10/1/2019,10/5/2019,,Expedia.com,13,"If you are looking for an accommodation which combines luxury and relaxation and is environmentally sustainable, Radisson Blu 1882 Hotel, Barcelona Sagrada Familia is the hotel for you. The name of our hotel is a tribute to Gaud� and Modernism: 1882 is the year in which construction began on the Sagrada Familia, a small gesture to recognise Gaud� and his masterpiece. We know that every detail makes a difference, which is why the exclusive services, gastronomic selection and activities we have planned for you are full of surprising details. Among other things, you can enjoy free Wi-Fi connection, guided tours, yoga classes, bicycle rental service, gym, swimming pool and unique Selfie Point for Sagrada Familia. We care about energy efficiency, a sustainable use of resources and not wasting food. Our actions add social value to the community. Our location next to Sagrada Familia and the Sant Pau Modernist complex puts you very close to Passeig de Gr�cia and next to Gr�cia, one of Barcelona�s most emblematic neighbourhoods."
4
+ 2,Ibis Styles Barcelona City Bogatell,http://www.tripadvisor.com/Hotel_Review-g187497-d10670124-Reviews-Ibis_Styles_Barcelona_City_Bogatell-Barcelona_Catalonia.html,Barcelona,755,,10/1/2019,10/5/2019,,Booking.com,13,"The ibis Styles Barcelona City hotel is designed so that you can enjoy an outstanding experience immersed in the heart of Barcelona. The rooms have been created for your comfort: modern, comfortable and designed so that you can enjoy yourself in an environment inspired by the Mediterranean. Savor the snack menu and tapas dishes in our bar or on our indoor terrace, or relax in our swimming pool with sea views. The beach is only 12 minutes away on foot, and you can also enjoy a pleasant stroll to the Port Ol�mpic marina. If you'd prefer, the chance to explore the iconic and cultural center of Barcelona is only 4 metro stop away"
5
+ 3,H10 Casa Mimosa,http://www.tripadvisor.com/Hotel_Review-g187497-d10683772-Reviews-H10_Casa_Mimosa-Barcelona_Catalonia.html,Barcelona,666,,10/1/2019,10/5/2019,,Booking.com,14,"H10 Casa Mimosa is a superior hotel situated in the Eixample district in Barcelona, 100 metres from La Pedrera. Guests can enjoy the on-site bar and a breakfast restaurant. Casa Batllo is 600 metres from H10 Casa Mimosa, while Pla�a Catalunya is 1.2 km from the property. The nearest airport is Barcelona El Prat Airport, 13 km from H10 Casa Mimosa. Eixample is a great choice for travellers interested in architecture, food and art."
6
+ 4,The Corner Hotel,http://www.tripadvisor.com/Hotel_Review-g187497-d10127321-Reviews-The_Corner_Hotel-Barcelona_Catalonia.html,Barcelona,1073,,10/1/2019,10/5/2019,,Booking.com,14,"The Corner Hotel is located in the Eixample, one of Barcelona's most traditional neighborhoods, founded in the 19th century in response to the urban and industrial growth of a city that's been keen on keeping its history intact. The Hotel is the result of the extensive renovation of one of the Eixample's most representative structures. Somber and elegant, it has maintained the stylistic hallmarks of centuries past, while beyond its fa�ade, the interior showcases a modern, convenient, and comfortable atmosphere whose d�cor pays homage to the city's industrial tradition. The Corner combines fine materials with contemporary elements to achieve a cosmopolitan design that captures the essence of the city, and reaches the guest in every corner. It is a functional, cozy, and friendly space in which to relax after a long day of shopping, museums, terraces or business dealings, and it's all... just around the Corner."
7
+ 5,H10 Art Gallery,http://www.tripadvisor.com/Hotel_Review-g187497-d6510499-Reviews-H10_Art_Gallery-Barcelona_Catalonia.html,Barcelona,967,,10/1/2019,10/5/2019,,Booking.com,15,"This hotel is great for tourists who want to walk to locations. It is near 109 attractions and 531 restaurants. Free WIFI,pool,bar,valet parking.It is modern and trendy."
8
+ 6,H10 Madison,http://www.tripadvisor.com/Hotel_Review-g187497-d13223478-Reviews-H10_Madison-Barcelona_Catalonia.html,Barcelona,532,,10/1/2019,10/5/2019,,Booking.com,12,"Located in the heart of Barcelona, just 240 metres from the cathedral, the H10 Madison is a new four-star superior hotel. The hotel features elegant rooms, a full range of dining options with restaurant and Lobby Bar, two meeting rooms and an amazing terrace with plunge pool and close-up views of the cathedral."
9
+ 7,Hotel Rec Barcelona,http://www.tripadvisor.com/Hotel_Review-g187497-d13313633-Reviews-Hotel_Rec_Barcelona-Barcelona_Catalonia.html,Barcelona,794,,10/1/2019,10/5/2019,$180 ,Booking.com,12,"REC HOTEL BARCELONA a new way of experiencing Barcelona, exploring one of its oldest neighborhoods, La Ribera. Light, color, and simple open spaces the perfect atmosphere in which to connect and relax. Designed for the cosmopolitan guest who enjoys blending in with natives, exploring the city�s lesser-known spots and ending the day with a few cocktails on a terrace overlooking the cityscape."
10
+ 8,BarcelonaBB,http://www.tripadvisor.com/Hotel_Review-g187497-d736822-Reviews-BarcelonaBB-Barcelona_Catalonia.html,Barcelona,599,,10/1/2019,10/5/2019,,TripAdvisor,5,"Our B&B is in the center of Barcelona, in the heart of the Art Noveau district, steps away from Passeig the Gracia and its Gaudi Houses, also from la Sagrada Familia and most places of interest. We are in a beautiful Art Noveau building in a flat with high ceilings typical ""Modernista"". Our B&B is very warm as well as tastefuly decorated for your enjoyment."
11
+ 9,Coroleu House Barcelona,http://www.tripadvisor.com/Hotel_Review-g187497-d3357953-Reviews-Coroleu_House_Barcelona-Barcelona_Catalonia.html,Barcelona,179,,10/1/2019,10/5/2019,,Booking.com,0,"Just 10 minutes from Paseo de Gracia!Coroleuhouse-Bcn is located in a typical neighborhood of Barcelona (Sant Andreu). You could mingle with the people who really live in Barcelona but will have the city center just 10 minutes by subway. Come from the airport by train directly in just 40 minutes!!! and from Plaza Catalunya in 15 minutes by metro.In the neighborhood, you will find typical 'tapas' bars, shops, streets to walk, a park for cycling and wonderful people!!- sheets and towels on arrival - mineral water - Free WIFI in all the house. GROUP: COROLEUHOUSE-BCN & AJUNTAMENT APARTMENTS BARCELONA"
12
+ 10,Guesthouse Barcelona Gotic,http://www.tripadvisor.com/Hotel_Review-g187497-d3613255-Reviews-Guesthouse_Barcelona_Gotic-Barcelona_Catalonia.html,Barcelona,616,,10/1/2019,10/5/2019,,TripAdvisor,6,"Guesthouse BARCELONA GOTIC is located in Barcelona city center, at only few steps of the most popular avenue, las ramblas. The property was recently refurbished and offer simple & budget accommodation in the most popular quarter of Barcelona, EL BARRI GOTIC."
13
+ 11,Gran Hotel Torre Catalunya,http://www.tripadvisor.com/Hotel_Review-g187497-d289670-Reviews-Gran_Hotel_Torre_Catalunya-Barcelona_Catalonia.html,Barcelona,4195,,10/1/2019,10/5/2019,,TripAdvisor,15,"Prepare to be enchanted. The magic of Barcelona meets the iconic spirit of Nobu Hotels. A luxury lifestyle experience designed for the sophisticated traveler. ? The stylish hotel offers 259 sleek and spacious accommodations, an elegant spa and gym, thoughtfully tailored meeting and event spaces, the world-class Nobu Restaurant, and Kozara � our laidback lobby bar."
14
+ 12,Hotel Acta Antibes,http://www.tripadvisor.com/Hotel_Review-g187497-d236190-Reviews-Hotel_Acta_Antibes-Barcelona_Catalonia.html,Barcelona,2068,,10/1/2019,10/5/2019,,Booking.com,11,"The Acta Antibes Hotel is a 2 star hotel in Barcelona located very close to the Sagrada Familia and well-connected with public transport.It has 71 comfortable and spacious rooms that have a full equipped bathroom, TV with international channels, air conditioning, heating and free WIFI.The Hotel, of welcoming design, has private parking in the same building, and in addition a meeting and conference room with capacity of 12 people. It also offers a buffet breakfast at the best price-quality for customers."
15
+ 13,Occidental Atenea Mar - Adults only,http://www.tripadvisor.com/Hotel_Review-g187497-d291590-Reviews-Occidental_Atenea_Mar_Adults_only-Barcelona_Catalonia.html,Barcelona,2129,,10/1/2019,10/5/2019,,Booking.com,14,"The 4-star Occidental Atenea Mar Adults only stands out for its proximity to both the beach and the city. It is 150 m from the Nova Mar Bella beach and 15 minutes from the CCIB convention centre and the Diagonal Mar shopping centre. The hotel has spacious and modern rooms, most of them with sea or city views. All the rooms have free Wi-Fi. Among the services offered by the hotel you can enjoy parking, free use of the gym, sauna, hydromassage bath and free Wi-fi throughout the hotel. Also, there are 5 modular function rooms for meetings with natural light and capacity for 400 people, equipped with the latest technology in audiovisual and communication equipment. Try exquisite dishes of the finest Mediterranean cuisine in its restaurant Likewise, enjoy a refreshing cocktail in the exclusive terrace with views of the promenade. Finish your day with a relaxing walk along the beach."
16
+ 14,The Patio Barcelona,http://www.tripadvisor.com/Hotel_Review-g187497-d789571-Reviews-The_Patio_Barcelona-Barcelona_Catalonia.html,Barcelona,400,,10/1/2019,10/5/2019,,Booking.com,0,"The Patio offers two spacious and attractively furnished double bedrooms, one fully equiped bathroom, a dining room with an open kitchen area and a sitting area. We can accommodate up to 5 people. Ideal as a base for couples, families on holiday or for guests attending a congress or a trade fair in Barcelona. The Patio is located in a house, next door to our home, in a unique private courtyard and a large roof terrace and patio area which our guests are welcome to use. Perfect for relaxing after a day sight seeing in Barcelona. To see how to get to The Patio, have a look at the location/rates page and you will see a map, written directions and transport options. The Patio is an ideal alternative to a hotel. Try The Patio for a memorable stay in Barcelona, and you will not be disappointed"
17
+ 15,Blanc Guesthouse,http://www.tripadvisor.com/Hotel_Review-g187497-d2191843-Reviews-Blanc_Guesthouse-Barcelona_Catalonia.html,Barcelona,425,,10/1/2019,10/5/2019,,TripAdvisor,9,"The Blanc Guest House warmly welcomes you to Barcelona. This newly opened guest house, situated in Calle Tuset is situated in the heart of downtown Barcelona and is located close to Diagonal metro station and is right in the centre of one of the main shopping areas between Paseo de Gracia, Rambla Catalunya and Diagonal, in one of the city�s safest areas. There is an endless selection of bars and restaurants right on your doorstep, offering the best in local Catalan cuisine, or simply a great location for a drink on one of the numerous terraces to be found nearby."
18
+ 16,Barcino 147 Bed & Breakfast,http://www.tripadvisor.com/Hotel_Review-g187497-d633836-Reviews-Barcino_147_Bed_Breakfast-Barcelona_Catalonia.html,Barcelona,648,,10/1/2019,10/5/2019,,TripAdvisor,9,"Come and enjoy Barcino147, one of the top Barcelona bed and breakfast. Located in the heart of the city at 5 minutes walk from Las Ramblas, our spacious apartments have been beautifully renovated and furnished with local art and antiques. This unique bed and breakfast in Barcelona has an artist and art collector as an owner. He studied art at La Llotja, the same school Picasso attended. A native of Barcelona, he is an excellent resource for information.
19
+
20
+ Barcino147, Bed and Breakfast Barcelona is located in a more than 120 years old building with a lot of original architectural details.We offer the best tours in and out of the city in the most elegant and comfortable transportation, offering the best touristic and non-touristic spots in the city.
21
+
22
+ Our Bed and Breakfast in Barcelona offers a high standard of accommodation to an international clientele. Families and small groups specially catered for, including your pet!"
23
+ 17,Generator Barcelona,http://www.tripadvisor.com/Hotel_Review-g187497-d3540235-Reviews-Generator_Barcelona-Barcelona_Catalonia.html,Barcelona,1906,,10/1/2019,10/5/2019,,Booking.com,10,"You�ll find Generator Barcelona conveniently located just a 5 minute walk from two main metro stations, Diagonal and Verdaguer. Travelling to and from the hostel to all the must see sights is a piece of cake. The beautiful sandy beaches are just a 15 minute metro journey away, and only a short walk away are the maze of small streets of the Eixample district, home to Barcelona�s trendy shops, bars and restaurants. Generator is the perfect place for those looking to combine style with great atmosphere. You�ll find great beds for sleepy heads, a communal TV room with outdoor patio to a chill out lounge/caf� that serves the best drinks and snacks for miles around. Choose from a great selection of rooms, from Dorms, to Quads, to Private en-suites with your own power socket and LED light for late night reading. Fast and free Wi-Fi is all yours too. To get the most out of your stay, visit the travel shop and our city experts will help you devise an itinerary that will take you to all the hidden treasures this dynamic city has to offer. Barcelona is the latest edition to the Generator family, We will see you there."
24
+ 18,"Alexandra Barcelona Hotel, Curio Collection by Hilton",http://www.tripadvisor.com/Hotel_Review-g187497-d228648-Reviews-Alexandra_Barcelona_Hotel_Curio_Collection_by_Hilton-Barcelona_Catalonia.html,Barcelona,2319,,10/1/2019,10/5/2019,$185 ,Booking.com,13,"Welcome to the Alexandra Barcelona Hotel, Curio Collection by Hilton. This designer boutique hotel is where fascinating history, modernist details, and avant-garde meet. Moments from Passeig de Gr�cia � the fashion, culture, and commercial heart of Barcelona � our hotel is a quick walk to Rambla de Catalunya, Casa Batll�, La Pedrera, and other top attractions. Our fully renovated 19th-century building reflects the charm, elegance, and spirit of our Barcelona surroundings. You will love the local photography that lines our walls, designer furniture from the �50s and �60s, original mosaic flooring, framed ceilings, and natural oak throughout the hotel. Every guest room features parquet flooring or modernist tiles, plush bedding, and complimentary WiFi. Upgrade to one of our spacious suites for a king size bed and a minimum 40-inch HDTV. Some of our suites feature a living room area with sofa, an indoor/outdoor bathtub plus bathrobe and slippers, and terrace. Alexandra Barcelona Hotel, Curio Collection by Hilton offers excellent dining experiences including a Catalan gastronomic breakfast buffet with local quality products, a brasserie featuring ingredients grown in our own vegetable garden, a Charcuterie bar with Catalan specialties, and a stunning patio terrace by the pool. We are also pleased to send delicious meals to your door, 24-hours a day. Pamper your mind and body in our outdoor pool with chill out sundeck, dry Finnish sauna, massage cabins, or fitness center. We offer an extraordinary central location with stylish indoor/outdoor function spaces for up to 150 guests � perfect for business meetings, social events, and weddings"
25
+ 19,Leonardo Boutique Hotel Barcelona Sagrada Familia,http://www.tripadvisor.com/Hotel_Review-g187497-d1999376-Reviews-Leonardo_Boutique_Hotel_Barcelona_Sagrada_Familia-Barcelona_Catalonia.html,Barcelona,1727,,10/1/2019,10/5/2019,,Booking.com,10,"The Leonardo Boutique Hotel Barcelona Sagrada Familia is a three-star hotel, ten minutes walking to Sagrada Familia and the future AVE train station. It has a total of 66 comfortable rooms to have a pleasant stay in Barcelona whether you're traveling for business or a family travel."
26
+ 20,Hostal Martinval,http://www.tripadvisor.com/Hotel_Review-g187497-d2700829-Reviews-Hostal_Martinval-Barcelona_Catalonia.html,Barcelona,766,,10/1/2019,10/5/2019,,TripAdvisor,11,"Hostal Martinval is a two stars, pleasant and exclusively modernized. In the heart of the Eixample Neighborhood Next to the famous Passeig de Gracia and 10 minutes walk from Pla�a Catalunya. The area is well connected with public transport, metro, train and bus, very close to Barcelona�s architectural wonders, ""Segrada-Famila"", ""La pedrera"" and ""Casa Batill�"". The historic city center, the Gothic quarter, is also just 15 min walk. Martinval is a boutique Hostal, we offer 10 private rooms, all the rooms have elevated ceilings and beautiful interiors, most of the rooms are patted with balcony. Rooms have attached private bathrooms which are modernly designed. The rooms have televisions in it with the entire regional and national television channels. At Martinval you feel at home with our exceptional quality services of rooms. We are aimed to offer tourist, backpackers and group an economical and modernize accommodation with best room services and facilities which can be found at any high level hostals in Barcelona. Have a great experience in Barcelona by staying at the most innovative and economical hostal: Martinval Barcelona!!"
27
+ 21,La Casa Gran B&B,http://www.tripadvisor.com/Hotel_Review-g187497-d1902672-Reviews-La_Casa_Gran_B_B-Barcelona_Catalonia.html,Barcelona,272,,10/1/2019,10/5/2019,,TripAdvisor,12,"La Casa Gran is a traditional bed&breakfast in a monumental building called Cases Almirall from 1928, in the heart of l'Eixample district. We are located between two main streets of the city, Diagonal and Muntaner. It is a lively area with lots of restaurants, new bars and traditional bodegas and ""vermuterias"". Our place is walking distance to the main tourist attractions, you can reach Passeig de Gracia or Las Ramblas walking through l'Eixample streets. You can also get to Gothic quarter, Raval and Gracia district. We want to offer local products and experiences for you to enjoy the city. Your stay includes Catalan breakfast, free WIFI, water, fruits, tea and coffee facilities all day. We have a large common area where you can sit and relax during the day. We share our home with our guests, so we are here to help if needed."
28
+ 22,Casa Camper Hotel Barcelona,http://www.tripadvisor.com/Hotel_Review-g187497-d543153-Reviews-Casa_Camper_Hotel_Barcelona-Barcelona_Catalonia.html,Barcelona,2235,,10/1/2019,10/5/2019,,TripAdvisor,10,"This hotel is great for tourists who want to walk to locations. It is near 214 attractions and 673 restaurants. Free WIFI,free breakfast,rooftop terrace,fitness center,taxi.Good for business travelers and boutique travelers"
29
+ 23,Inside Barcelona Apartments Mercat,http://www.tripadvisor.com/Hotel_Review-g187497-d2094107-Reviews-Inside_Barcelona_Apartments_Mercat-Barcelona_Catalonia.html,Barcelona,120,,10/1/2019,10/5/2019,,TripAdvisor,11,"This hotel is great for tourists who want to walk to locations. It is near 172 attractions and 354 restaurants. Free WIFI,babysitting,laundry service,washing machine,taxi.Great for families"
30
+ 24,Eric Vokel Boutique Apartments - Gran Via Suites,http://www.tripadvisor.com/Hotel_Review-g187497-d2062882-Reviews-Eric_Vokel_Boutique_Apartments_Gran_Via_Suites-Barcelona_Catalonia.html,Barcelona,1416,,10/1/2019,10/5/2019,,TripAdvisor,12,"Eric V�kel Gran Via Suites has been personally and decorated by Eric in a style that is a unique mix of functionality and the beauty of Nordic design with all creativity and spontaneity of Mediterranean design.Light and confort create the spaces in the apartments and have the highest level of ecological efficiency and confort, providing every convenience to make the stay as pleasant as posible. This building is located very close to the city center, Plaza Catalunya and Ramblas is the Eixample neighborhood. Furthermore, it is very easily communicated by public transportation from the airport."
31
+ 25,Gracia City Hostel,http://www.tripadvisor.com/Hotel_Review-g187497-d3683673-Reviews-Gracia_City_Hostel-Barcelona_Catalonia.html,Barcelona,439,,10/1/2019,10/5/2019,,Booking.com,9,"Gracia City Hostel has everything! Location-location-location, breakfast, wifi, private/shared rooms, tours, you name it!"
32
+ 26,Novotel Barcelona City,http://www.tripadvisor.com/Hotel_Review-g187497-d1532202-Reviews-Novotel_Barcelona_City-Barcelona_Catalonia.html,Barcelona,4332,,10/1/2019,10/5/2019,$146 ,TripAdvisor,12,"The 4-star Novotel Barcelona City Hotel has 264 rooms (including 22 suites) and is located right in the heart of the city on Avenida Diagonal (one of the city's main streets), next to Plaza Gl�ries and 55 yards (50 m) from the Jean Nouvel Tower. The hotel features a Clarav�a restaurant, a bar, 6222 sq. ft (578 m2) of meeting rooms, an outdoor pool on the terrace with panoramic views of Barcelona and a fitness center. Easy access to the hotel via Ronda de Dalt and Ronda Litoral. (The swimming pool is open only from 1st June to 20th September 2011)"
33
+ 27,NH Collection Constanza,http://www.tripadvisor.com/Hotel_Review-g187497-d651381-Reviews-NH_Collection_Constanza-Barcelona_Catalonia.html,Barcelona,2475,,10/1/2019,10/5/2019,,NH Hotels,13,"Located in the heart of Barcelona's business district, Les Corts, and next to the lovely shopping mall L'Illa Diagonal, NH Collection Constanza features a lean, brightly-lit atmosphere with an outstanding commitment to customer service."
34
+ 28,Hotel Praktik Bakery,http://www.tripadvisor.com/Hotel_Review-g187497-d5790522-Reviews-Hotel_Praktik_Bakery-Barcelona_Catalonia.html,Barcelona,2567,,10/1/2019,10/5/2019,,Booking.com,0,"Praktik Bakery (Barcelona) incorporates a bakery inside the hotel. What could be better than waking up to the smell of freshly baked bread? This is a distinctive hotel, offering something as �homely� as fresh bread to make our guests feel absolutely at home while sampling the delicious baking of Baluard, a traditional bakery owned by Anna Bellsola. Guests can enjoy our bakery products at breakfast, over the counter, or while they relax in our charming cafeteria. Praktik Bakery is located inside an elegant building in classic Barcelona style, right in the heart of the famous Eixample area, bursting with modernist buildings of rich architectural value. The hotel is just 100m away from Paseo de Gracia and its emblematic buildings, luxury stores, and the famous La Pedrera Gaudi monument."
35
+ 29,AC Hotel Victoria Suites,http://www.tripadvisor.com/Hotel_Review-g187497-d228461-Reviews-AC_Hotel_Victoria_Suites-Barcelona_Catalonia.html,Barcelona,397,,10/1/2019,10/5/2019,,Expedia.com,11,"A nice hotel away from the busy streets of Barcelona! We have parking,fitness center,bar, free WIFI. Grat for people who want to stay away from annoying American tourists"
36
+ 30,Yeah Barcelona Hostel,http://www.tripadvisor.com/Hotel_Review-g187497-d9808248-Reviews-Yeah_Barcelona_Hostel-Barcelona_Catalonia.html,Barcelona,531,,10/1/2019,10/5/2019,,TripAdvisor,11,"We are a modern hotel that will be great for families and tourists.We have evening entertainment and a rooftop terrace.Even if you don't want to visit the many attractions of Barcelona, many of which are within walking distance of the hotel, you won't be bored"
[uma_namboothiripad]assignment_2.py ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """[Uma Namboothiripad]Assignment_2.ipynb
3
+
4
+ Automatically generated by Colaboratory.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1_sofOjXRDnId49NOup4sdiVS1E_51T-b
8
+
9
+ Load the dataset below
10
+ """
11
+
12
+ !pip install -U spacy
13
+ #first install the library that would help us use BERT in an easy to use interface
14
+ #https://github.com/UKPLab/sentence-transformers/tree/master/sentence_transformers
15
+ !pip install -U sentence-transformers
16
+
17
+ """I was having issues connecting my csv file to the colab notebook, so I ended up connecting this to my drive"""
18
+
19
+ import spacy
20
+ from spacy.lang.en.stop_words import STOP_WORDS
21
+ from string import punctuation
22
+ from collections import Counter
23
+ from heapq import nlargest
24
+ from google.colab import drive
25
+ drive.mount('/content/drive')
26
+
27
+ import pandas as pd
28
+ from tqdm import tqdm
29
+ from sentence_transformers import SentenceTransformer, util
30
+
31
+ ! pip install -q kaggle
32
+
33
+ ! pip install lightgbm
34
+
35
+ """Setup Kaggle json credentials"""
36
+
37
+ from google.colab import files
38
+ files.upload()
39
+
40
+ !mkdir ~/.kaggle/
41
+ !cp kaggle.json ~/.kaggle/
42
+
43
+ !chmod 600 ~/.kaggle/kaggle.json
44
+
45
+ !kaggle datasets list
46
+
47
+ !kaggle datasets download -d hamzafarooq50/hotel-listings-and-reviews/HotelListInBarcelona__en2019100120191005.csv
48
+
49
+ !ls
50
+
51
+ !python -m spacy download en_core_web_sm
52
+
53
+ !kaggle datasets download --force -d hamzafarooq50/hotel-listings-and-reviews/hotelReviewsInBarcelona__en2019100120191005.csv
54
+
55
+ !ls
56
+
57
+ nlp = spacy.load("en_core_web_sm")
58
+
59
+ import re
60
+
61
+ import nltk
62
+ nltk.download('punkt')
63
+
64
+ from nltk.tokenize import word_tokenize
65
+
66
+ nltk.download('stopwords')
67
+
68
+ from nltk.corpus import stopwords
69
+
70
+ nltk.download('wordnet')
71
+ nltk.download('omw-1.4')
72
+ from nltk.stem import WordNetLemmatizer
73
+ from nltk.stem import WordNetLemmatizer
74
+
75
+ import os
76
+ import spacy
77
+ nlp = spacy.load("en_core_web_sm")
78
+ from spacy import displacy
79
+
80
+ text = """Example text"""
81
+ #text = "I really hope that France does not win the World Cup and Morocco makes it to the finals"
82
+ doc = nlp(text)
83
+ sentence_spans = list(doc.sents)
84
+ displacy.render(doc, jupyter = True, style="ent")
85
+
86
+ stopwords = list(STOP_WORDS)
87
+ from string import punctuation
88
+ punctuation = punctuation+ '\n'
89
+
90
+ import pandas as pd
91
+
92
+ import scipy.spatial
93
+ import pickle as pkl
94
+
95
+ !pip install -U sentence-transformers
96
+
97
+ from sentence_transformers import SentenceTransformer
98
+ embedder = SentenceTransformer('all-MiniLM-L6-v2')
99
+ #embedder = SentenceTransformer('bert-base-nli-mean-tokens')
100
+
101
+ !pip install -U sentence-transformers
102
+
103
+ from sentence_transformers import SentenceTransformer
104
+
105
+ embedder = SentenceTransformer('all-MiniLM-L6-v2')
106
+ embedder = SentenceTransformer('bert-base-nli-mean-tokens')
107
+
108
+ df = pd.read_csv('/content/drive/My Drive/Colab Notebooks/Assignment#2/HotelListInBarcelona__en2019100120191005.csv',sep=",", encoding='cp1252')
109
+
110
+ !kaggle datasets download --force -d hamzafarooq50/hotel-listings-and-reviews
111
+
112
+ df.head()
113
+
114
+ df['hotel_name'].value_counts()
115
+
116
+ df['hotel_name'].drop_duplicates()
117
+
118
+ df_combined = df.sort_values(['hotel_name']).groupby('hotel_name', sort=False).hotel_features.apply(''.join).reset_index(name='hotel_features')
119
+
120
+ df_combined.head().T
121
+
122
+ import re
123
+
124
+ df_combined['hotel_features'] = df_combined['hotel_features'].apply(lambda x: re.sub('[^a-zA-z0-9\s]','',x))
125
+
126
+ def lower_case(input_str):
127
+ input_str = input_str.lower()
128
+ return input_str
129
+
130
+ df_combined['hotel_features']= df_combined['hotel_features'].apply(lambda x: lower_case(x))
131
+
132
+ df = df_combined
133
+
134
+ df_sentences = df_combined.set_index("hotel_features")
135
+ df_sentences = df_sentences["hotel_name"].to_dict()
136
+ df_sentences_list = list(df_sentences.keys())
137
+ len(df_sentences_list)
138
+
139
+ list(df_sentences.keys())[:5]
140
+
141
+ df_sentences_list = [str(d) for d in tqdm(df_sentences_list)]
142
+
143
+ # Corpus with example sentences
144
+ corpus = df_sentences_list
145
+ corpus_embeddings = embedder.encode(corpus,show_progress_bar=True)
146
+
147
+ corpus_embeddings[0]
148
+
149
+ queries = ['Hotel near tourist locations and with free WIFI',
150
+ ]
151
+ query_embeddings = embedder.encode(queries,show_progress_bar=True)
152
+
153
+ import torch
154
+ # Query sentences:
155
+ queries = ['Hotel at least 10 minutes away from sagrada familia'
156
+ ]
157
+
158
+
159
+ # Find the closest 3 sentences of the corpus for each query sentence based on cosine similarity
160
+ top_k = min(3, len(corpus))
161
+ for query in queries:
162
+ query_embedding = embedder.encode(query, convert_to_tensor=True)
163
+
164
+ # We use cosine-similarity and torch.topk to find the highest 5 scores
165
+ cos_scores = util.pytorch_cos_sim(query_embedding, corpus_embeddings)[0]
166
+ top_results = torch.topk(cos_scores, k=top_k)
167
+
168
+ print("\n\n======================\n\n")
169
+ print("Query:", query)
170
+ print("\nTop 3 most similar sentences in corpus:")
171
+
172
+ for score, idx in zip(top_results[0], top_results[1]):
173
+ print("(Score: {:.4f})".format(score))
174
+ print(corpus[idx], "(Score: {:.4f})".format(score))
175
+ row_dict = df.loc[df['hotel_features']== corpus[idx]]
176
+ print("paper_id: " , row_dict['hotel_name'] , "\n")
177
+ # for idx, distance in results[0:closest_n]:
178
+ # print("Score: ", "(Score: %.4f)" % (1-distance) , "\n" )
179
+ # print("Paragraph: ", corpus[idx].strip(), "\n" )
180
+ # row_dict = df.loc[df['all_review']== corpus[idx]]
181
+ # print("paper_id: " , row_dict['Hotel'] , "\n")
182
+
183
+ model = SentenceTransformer('sentence-transformers/paraphrase-xlm-r-multilingual-v1')
184
+ embeddings = model.encode(corpus)
185
+ #print(embeddings)
186
+
187
+ query_embedding.shape
188
+
189
+ # Query sentences:
190
+ queries = ['Hotel at least 10 minutes away from good food',
191
+ 'quiet'
192
+ ]
193
+
194
+
195
+ # Find the closest 5 sentences of the corpus for each query sentence based on cosine similarity
196
+ top_k = min(5, len(corpus))
197
+ for query in queries:
198
+
199
+ query_embedding = model.encode(query, convert_to_tensor=True)
200
+
201
+ # We use cosine-similarity and torch.topk to find the highest 5 scores
202
+ cos_scores = util.pytorch_cos_sim(query_embedding, embeddings)[0]
203
+ top_results = torch.topk(cos_scores, k=top_k)
204
+
205
+ print("\n\n======================\n\n")
206
+ print("Query:", query)
207
+ print("\nTop 5 most similar sentences in corpus:")
208
+
209
+ for score, idx in zip(top_results[0], top_results[1]):
210
+ print("(Score: {:.4f})".format(score))
211
+ print(corpus[idx], "(Score: {:.4f})".format(score))
212
+ row_dict = df.loc[df['hotel_features']== corpus[idx]]
213
+ print("paper_id: " , row_dict['hotel_name'] , "\n")
214
+
215
+ df
216
+
217
+ hits = util.semantic_search(query_embedding, embeddings, top_k=5)
218
+ hits = hits[0] #Get the hits for the first query
219
+ for hit in hits:
220
+ print (hit)
221
+ print("(Score: {:.4f})".format(hit['score']))
222
+ print(corpus[hit['corpus_id']])
223
+ row_dict = df.loc[df['hotel_features']== corpus[hit['corpus_id']]]
224
+ print("paper_id: " , row_dict['hotel_name'] , "\n")
225
+ !pip3 install pipreqs
226
+ !pip3 install pip-tools
app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """app.ipynb
3
+
4
+ Automatically generated by Colaboratory.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1bfEMI_uZXaosL5o-R1i1eTanG9-2hP7Y
8
+
9
+ *`Uma Namboothiripad Assignment #2`*
10
+ """
11
+
12
+ import streamlit as st
13
+ import pandas as pd
14
+ import plotly.express as px
15
+ import urllib
16
+
17
+ st.title("Plan ahead so you know where you are going once you land in Barcelona. Choose your hotel here!")
18
+
19
+ st.markdown("Barcelona has one of the highest pickpockets of any city in Europe. You better get a hotel before you go")
20
+
21
+ text = st.text_input('What attributes do you want in a hotel:')
22
+
23
+ n_results = st.slider('How many choices in hotels do you want?', 1,5,8)
24
+
25
+ dataurl = 'https://colab.research.google.com/drive/1_sofOjXRDnId49NOup4sdiVS1E_51T-b?usp=sharing'
26
+ @st.cache(persist=True)
27
+
28
+ def load_data():
29
+ data_url = urllib.request.urlopen('https://colab.research.google.com/drive/1_sofOjXRDnId49NOup4sdiVS1E_51T-b?usp=sharing')
30
+ df = pd.read_csv('HotelListInBarcelona__en2019100120191005.csv')
31
+ return(df)
32
+ if st.button('Show Hotels'):
33
+ if len(text) >50:
34
+ st.write('Okay boomer, try to limit your expectations and reduce the number of characters in your search')
35
+
36
+ def run():
37
+ st.subheader("Options for hotels in Barcelona")
38
+ df = load_data()
39
+ st.dataframe(df)
40
+
41
+ if __name__ == '__main__':
42
+ run()