This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from recommender_engine import RecommenderEngine | |
import json | |
culture_keywords = "history historical art architecture city culture" | |
beach_n_sun_keywords = "beach beaches park nature holiday sea seaside sand sunshine sun sunny" | |
nightlife_keywords = "nightclub nightclubs nightlife bar bars pub pubs party beer" | |
def get_recommendations(keywords): | |
result = RecommenderEngine.get_recommendations(keywords) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from cosine_similarity import CosineSimilarity | |
from rating_extractor import RatingExtractor | |
import operator | |
import json | |
class RecommenderEngine: | |
def __init__(self): | |
print("engine initialized") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import e | |
class RatingExtractor: | |
def __init__(self): | |
print("rating initialized") | |
# Version-4 | |
#Returns overall rating score | |
#Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from recommender_engine import RecommenderEngine | |
import json | |
culture_keywords = "history historical art architecture city culture" | |
beach_n_sun_keywords = "beach beaches park nature holiday sea seaside sand sunshine sun sunny" | |
nightlife_keywords = "nightclub nightclubs nightlife bar bars pub pubs party beer" | |
def get_recommendations(keywords): | |
result = RecommenderEngine.get_recommendations(keywords) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from cosine_similarity import CosineSimilarity | |
from rating_extractor import RatingExtractor | |
import operator | |
import json | |
class RecommenderEngine: | |
def __init__(self): | |
print("engine initialized") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from recommender_engine import RecommenderEngine | |
import json | |
culture_keywords = "history historical art architecture city culture" | |
beach_n_sun_keywords = "beach beaches park nature holiday sea seaside sand sunshine sun sunny" | |
nightlife_keywords = "nightclub nightclubs nightlife bar bars pub pubs party beer" | |
def get_recommendations(keywords): | |
result = RecommenderEngine.get_recommendations(keywords) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from cosine_similarity import CosineSimilarity | |
from rating_extractor import RatingExtractor | |
import operator | |
import json | |
class RecommenderEngine: | |
def __init__(self): | |
print("engine initialized") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from recommender_engine import RecommenderEngine | |
import json | |
culture_keywords = "history historical art architecture city culture" | |
beach_n_sun_keywords = "beach beaches park nature holiday sea seaside sand sunshine sun sunny" | |
nightlife_keywords = "nightclub nightclubs nightlife bar bars pub pubs party beer" | |
def get_recommendations(keywords): | |
result = RecommenderEngine.get_recommendations(keywords) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from cosine_similarity import CosineSimilarity | |
import operator | |
import json | |
class RecommenderEngine: | |
def __init__(self): | |
print("engine initialized") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, math | |
from collections import Counter | |
class CosineSimilarity: | |
def __init__(self): | |
print("Cosine Similarity initialized") | |
@staticmethod | |
def cosine_similarity_of(text1, text2): | |
#get words first |