(self, file_name, set_type)
return examples
Creates examples for the training and dev sets.
Creates examples for the training and dev sets.
Creates examples for the training and dev sets .
def _create_examples_json(self, file_name, set_type):
    """Creates examples for the training and dev sets."""
    examples = []
    lines = tf.gfile.Open(file_name, "r")
    index = 0
    for line in lines:
      line_obj = json.loads(line)
      index = index + 1
      guid = "%s-%s" % (set_type, index)
      text_a = convert_to_unicode(line_obj["sentence1"])
      text_b = convert_to_unicode(line_obj["sentence2"])
      label = convert_to_unicode(line_obj["label"]) if set_type != 'test' else 'neutral'

      if label != "-":
        examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label))

    return examples
def _create_examples_json ( self , file_name , set_type ) : examples = [ ] lines = tf . gfile . Open ( file_name , "r" ) index = 0 for line in lines : line_obj = json . loads ( line ) index = index + 1 guid = "%s-%s" % ( set_type , index ) text_a = convert_to_unicode ( line_obj [ "sentence1" ] ) text_b = convert_to_unicode ( line_obj [ "sentence2" ] ) label = convert_to_unicode ( line_obj [ "label" ] ) if set_type != 'test' else 'neutral' if label != "-" : examples . append ( InputExample ( guid = guid , text_a = text_a , text_b = text_b , label = label ) ) return examples