In [ ]:


In [1]:
#These are functions that should take a column vector and return another column vector that we can concatenate with our main array

#the percentage of query tokens that appear in product title
def percentage_query_title(query_vector, title_vector):
    
#the percentage of query tokens that appear in product description
def percentage_query_description(query_vector, description_vector):

#The 1st token of query tokens matched with any tokens in product title
def first_token_query_title(query_vector, title_vector):

#The 2nd token of query tokens matched with any tokens in product title
def second_token_query_title(query_vector, title_vector):

#Any of the middle tokens of query tokens matched with any tokens in product title
def middle_token_query_title(query_vector, title_vector):

#The last token of query tokens matched with any tokens in product title
def last_token_query_title(query_vector, title_vector):

#word count of query tokens
def query_token_count(query_vector):

#word count of title tokens
def title_token_count(title_vector):

#word count of description tokens
def description_token_count(description_vector):

#the ratio of query tokens matched in title tokens (titleMatched / titleTokens.size())
def ratio_query_title(query_vector, title_vector):


  File "<ipython-input-1-f4f9ee513eb1>", line 7
    def percentage_query_description(description_vector):
      ^
IndentationError: expected an indented block