# Path: neleval/utils.py
# WIKI_PREFIX = re.compile('^http://[^.]+.wikipedia.org/wiki/')
# def normalise_link(l):
# def utf8_open(path, mode='r'):
# def json_dumps(obj, sort_keys=True, indent=4):
#     def default(o):


from collections import Sequence, defaultdict
from .utils import unicode
        from . import coref_metrics
import operator
import warnings
import json
    import itertools
class Annotation(object):
    """A name mention and its predicted candidates

    Parameters
    ----------

    Attributes
    ----------
    TODO
    is_first : bool or unset
        Indicates if this annotation is the first in the document for this
        eid.

    * :
        Other attributes are automatically adopted from the top candidate
    """

    __slots__ = ['docid', 'start', 'end', 'candidates', 'is_first']

    def __init__(self, docid, start, end, candidates=[]):
        self.docid = docid
        self.start = start
        self.end = end
        self.candidates = candidates

    def __unicode__(self):
        return u'{}\t{}\t{}\t{}'.format(
            self.docid,
            self.start,
            self.end,

# Path: neleval/utils.py
# WIKI_PREFIX = re.compile('^http://[^.]+.wikipedia.org/wiki/')
# def normalise_link(l):
# def utf8_open(path, mode='r'):
# def json_dumps(obj, sort_keys=True, indent=4):
#     def default(o):


# Path: neleval/annotation.py
from collections import Sequence, defaultdict
from .utils import unicode
        from . import coref_metrics
import operator
import warnings
import json
    import itertools

class Annotation(object):
    """A name mention and its predicted candidates

    Parameters
    ----------

    Attributes
    ----------
    TODO
    is_first : bool or unset
        Indicates if this annotation is the first in the document for this
        eid.

    * :
        Other attributes are automatically adopted from the top candidate
    """

    __slots__ = ['docid', 'start', 'end', 'candidates', 'is_first']

    def __init__(self, docid, start, end, candidates=[]):
        self.docid = docid
        self.start = start
        self.end = end
        self.candidates = candidates

    def __unicode__(self):
        return u'{}\t{}\t{}\t{}'.format(
            self.docid,
            self.start,
            self.end,

            u'\t'.join([unicode(c) for c in self.candidates])