def __init__(self, papers=[], index_by=None,
                 index_fields=['authors', 'citations', 'ayjid', 'date'],
                 index_features=['authors', 'citations'], **kwargs):
        """
        Parameters
        ----------
        paper : list
        index_by : str
        index_fields : str or iterable of strs
        kwargs : kwargs

        """

        self.index_by = index_by
        self.slices = []
        self.indices = {}
        self.features = {}
        self.duplicate_papers = {}
        self.indices = defaultdict(dict)
        self.indices_lookup = defaultdict(dict)
        if index_by not in index_fields:
            index_fields.append(index_by)
        self.index_fields = index_fields
        self.index_features = index_features

        if self.index_class is dict:
            self.indexed_papers = {}
        else:
            self.indexed_papers = self.index_class(**self.index_kwargs)
        for field in self.index_features:
            if field not in self.features:
                self._init_featureset(field)

        for paper in papers:
            self._index_paper(paper)
def __init__ ( self , papers = [ ] , index_by = None , index_fields = [ 'authors' , 'citations' , 'ayjid' , 'date' ] , index_features = [ 'authors' , 'citations' ] , ** kwargs ) : self . index_by = index_by self . slices = [ ] self . indices = { } self . features = { } self . duplicate_papers = { } self . indices = defaultdict ( dict ) self . indices_lookup = defaultdict ( dict ) if index_by not in index_fields : index_fields . append ( index_by ) self . index_fields = index_fields self . index_features = index_features if self . index_class is dict : self . indexed_papers = { } else : self . indexed_papers = self . index_class ( ** self . index_kwargs ) for field in self . index_features : if field not in self . features : self . _init_featureset ( field ) for paper in papers : self . _index_paper ( paper )
Parameters
        ----------
        paper : list
        index_by : str
        index_fields : str or iterable of strs
        kwargs : kwargs