# Path: third_party/processors/utils.py
# class InputExample(object):
#   """
#   A single training/test example for simple sequence classification.
#   Args:
#     guid: Unique id for the example.
#     text_a: string. The untokenized text of the first sequence. For single
#     sequence tasks, only this sequence must be specified.
#     text_b: (Optional) string. The untokenized text of the second sequence.
#     Only must be specified for sequence pair tasks.
#     label: (Optional) string. The label of the example. This should be
#     specified for train and dev examples, but not for test examples.
#   """
# 
#   def __init__(self, guid, text_a, text_b=None, label=None, language=None):
#     self.guid = guid
#     self.text_a = text_a
#     self.text_b = text_b
#     self.label = label
#     self.language = language
# 
#   def __repr__(self):
#     return str(self.to_json_string())
# 
#   def to_dict(self):
#     """Serializes this instance to a Python dictionary."""
#     output = copy.deepcopy(self.__dict__)
#     return output
# 
#   def to_json_string(self):
#     """Serializes this instance to a JSON string."""
#     return json.dumps(self.to_dict(), indent=2, sort_keys=True) + "\n"


import logging
import os
from transformers import DataProcessor
from .utils import InputExample
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" XNLI utils (dataset loading and evaluation) """




logger = logging.getLogger(__name__)


class XnliProcessor(DataProcessor):
    """Processor for the XNLI dataset.
    Adapted from https://github.com/google-research/bert/blob/f39e881b169b9d53bea03d2d341b31707a6c052b/run_classifier.py#L207"""

    def __init__(self):
        pass


# Path: third_party/processors/utils.py
# class InputExample(object):
#   """
#   A single training/test example for simple sequence classification.
#   Args:
#     guid: Unique id for the example.
#     text_a: string. The untokenized text of the first sequence. For single
#     sequence tasks, only this sequence must be specified.
#     text_b: (Optional) string. The untokenized text of the second sequence.
#     Only must be specified for sequence pair tasks.
#     label: (Optional) string. The label of the example. This should be
#     specified for train and dev examples, but not for test examples.
#   """
# 
#   def __init__(self, guid, text_a, text_b=None, label=None, language=None):
#     self.guid = guid
#     self.text_a = text_a
#     self.text_b = text_b
#     self.label = label
#     self.language = language
# 
#   def __repr__(self):
#     return str(self.to_json_string())
# 
#   def to_dict(self):
#     """Serializes this instance to a Python dictionary."""
#     output = copy.deepcopy(self.__dict__)
#     return output
# 
#   def to_json_string(self):
#     """Serializes this instance to a JSON string."""
#     return json.dumps(self.to_dict(), indent=2, sort_keys=True) + "\n"


# Path: third_party/processors/xnli.py
import logging
import os
from transformers import DataProcessor
from .utils import InputExample

# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" XNLI utils (dataset loading and evaluation) """




logger = logging.getLogger(__name__)


class XnliProcessor(DataProcessor):
    """Processor for the XNLI dataset.
    Adapted from https://github.com/google-research/bert/blob/f39e881b169b9d53bea03d2d341b31707a6c052b/run_classifier.py#L207"""

    def __init__(self):
        pass


    def get_examples(self, data_dir, language='en', split='train'):