class_docstr: Data loader for the DKN model.
  DKN requires a special type of data format, where each instance contains a label, the candidate news article,
  and user's clicked news article. Articles are represented by title words and title entities. Words and entities
  are aligned.
  
  Iterator will not load the whole data into memory. Instead, it loads data into memory
  per mini-batch, so that large files can be used as input data.
class_docstr_tok: ["Data","loader","for","the","DKN","model",".","DKN","requires","a","special","type","of","data","format",",","where","each","instance","contains","a","label",",","the","candidate","news","article",",","and","user","'s","clicked","news","article",".","Articles","are","represented","by","title","words","and","title","entities",".","Words","and","entities","are","aligned",".","Iterator","will","not","load","the","whole","data","into","memory",".","Instead",",","it","loads","data","into","memory","per","mini-batch",",","so","that","large","files","can","be","used","as","input","data","."]
docstr: Parse one string line into feature values.
  
  Args:
      line (str): a string indicating one instance
  
  Returns:
      list: Parsed results including `label`, `candidate_news_index`, `click_news_index`,
      `candidate_news_entity_index`, `click_news_entity_index`, `impression_id`.
docstr_tok: ["Parse","one","string","line","into","feature","values",".","Args",":","line","(","str",")",":","a","string","indicating","one","instance","Returns",":","list",":","Parsed","results","including","`","label","`",",","`","candidate_news_index","`",",","`","click_news_index","`",",","`","candidate_news_entity_index","`",",","`","click_news_entity_index","`",",","`","impression_id","`","."]
code: def parser_one_line(self, line):
      """Parse one string line into feature values.
  
      Args:
          line (str): a string indicating one instance
  
      Returns:
          list: Parsed results including `label`, `candidate_news_index`, `click_news_index`,
          `candidate_news_entity_index`, `click_news_entity_index`, `impression_id`.
  
      """
      impression_id = 0
      words = line.strip().split(self.ID_spliter)
      if len(words) == 2:
          impression_id = words[1].strip()
  
      cols = words[0].strip().split(self.col_spliter)
      label = float(cols[0])
  
      userid = cols[1]
      candidate_news = cols[2]
  
      candidate_news_index = self.news_word_index[candidate_news]
      candidate_news_entity_index = self.news_entity_index[
          candidate_news
      ]
      click_news_index = self.user_history[userid][0]
      click_news_entity_index = self.user_history[userid][1]
  
      return (
          label,
          candidate_news_index,
          click_news_index,
          candidate_news_entity_index,
          click_news_entity_index,
          impression_id,
      )
  
file_path: recommenders/recommenders/models/deeprec/io/dkn_iterator.py
imports: import tensorflow
  import numpy
  from recommenders.models.deeprec.io.iterator import BaseIterator
label_desc: Use image node_id 2 for calling the DKNTextIterator obj's underlying member method code with example usage: obj.parser_one_line(line) and returns: label,  candidate_news_index,  click_news_index,  candidate_news_entity_index,  click_news_entity_index,  impression_id