# Path: dsenser/constants.py
# POS = "PartOfSpeech"
# 
# SNT_ID = 3
# 
# TOK_IDX = 0
# 
# TOK_ID = 4
# 
# TOK_LIST = "TokenList"
# 
# WORDS = "words"
# 
# Path: dsenser/resources.py
# CHM = ConnHeadMapper()
# 
# Path: dsenser/utils.py
# def is_explicit(a_rel):
#     """Check whether given relation is explicit.
# 
#     Args:
#       a_rel (dict):
#        discourse relation to classify
# 
#     Returns:
#       bool:
#         ``True`` if the relation is explicit, ``False`` otherwise
# 
#     """
#     return bool(a_rel[CONNECTIVE][TOK_LIST])


from dsenser.constants import POS, SNT_ID, TOK_IDX, TOK_ID, TOK_LIST, WORDS
from dsenser.scorer.conn_head_mapper import ConnHeadMapper
from dsenser.resources import CHM
from dsenser.utils import is_explicit
from collections import defaultdict
        Returns:
          void:

        Note:
          modifies ``a_ret`` in place

        """
        for i, irel in enumerate(a_rels):
            self.predict(irel, a_data, a_ret, i)

    def predict(self, a_rel, a_data, a_ret, a_i):
        """Method for predicting sense of single relation.

        Args:
          a_rel (dict):
            discourse relation whose sense should be predicted
          a_data (2-tuple(dict, dict)):
            list of input JSON data
          a_ret (np.array):
            output prediction vector
          a_i (int):
            row index in the output vector

        Returns:
          void:

        Note:
          modifies ``a_ret[a_i]`` in place

        """

# Path: dsenser/constants.py
# POS = "PartOfSpeech"
# 
# SNT_ID = 3
# 
# TOK_IDX = 0
# 
# TOK_ID = 4
# 
# TOK_LIST = "TokenList"
# 
# WORDS = "words"
# 
# Path: dsenser/resources.py
# CHM = ConnHeadMapper()
# 
# Path: dsenser/utils.py
# def is_explicit(a_rel):
#     """Check whether given relation is explicit.
# 
#     Args:
#       a_rel (dict):
#        discourse relation to classify
# 
#     Returns:
#       bool:
#         ``True`` if the relation is explicit, ``False`` otherwise
# 
#     """
#     return bool(a_rel[CONNECTIVE][TOK_LIST])


# Path: dsenser/base.py
from dsenser.constants import POS, SNT_ID, TOK_IDX, TOK_ID, TOK_LIST, WORDS
from dsenser.scorer.conn_head_mapper import ConnHeadMapper
from dsenser.resources import CHM
from dsenser.utils import is_explicit
from collections import defaultdict

        Returns:
          void:

        Note:
          modifies ``a_ret`` in place

        """
        for i, irel in enumerate(a_rels):
            self.predict(irel, a_data, a_ret, i)

    def predict(self, a_rel, a_data, a_ret, a_i):
        """Method for predicting sense of single relation.

        Args:
          a_rel (dict):
            discourse relation whose sense should be predicted
          a_data (2-tuple(dict, dict)):
            list of input JSON data
          a_ret (np.array):
            output prediction vector
          a_i (int):
            row index in the output vector

        Returns:
          void:

        Note:
          modifies ``a_ret[a_i]`` in place

        """

        if is_explicit(a_rel):