coordle/backend/coordle_backend.py
def add(self, uid: str, title: str, text: Union[str, Iterable]):
        '''
        Adds document to index

        Parameters:
        -------------
        uid: unique identification string

        title: title of document

        text: text of document
        '''
        # Make wordfreqs
        doc = CordDoc(uid=uid, title=title)
        doc, unique_tokens = doc.fit(text)

        self.len += 1

        # Add document to hashmap where keys are unique tokens, and values
        # are sets
        for token in unique_tokens:
            if token not in self.docmap:
                self.docmap[token]=set()
            self.docmap[token].add(doc)

        Adds document to index

        Parameters:
        -------------
        uid: unique identification string

        title: title of document

        text: text of document
        
Adds document to index
Parameters.

unique identification string

title of document

text of document
Adds document to index Parameters . unique identification string title of document text of document
def add(self, uid: str, title: str, text: Union[str, Iterable]):
        doc = CordDoc(uid=uid, title=title)
        doc, unique_tokens = doc.fit(text)
        self.len += 1
        for token in unique_tokens:
            if token not in self.docmap:
                self.docmap[token]=set()
            self.docmap[token].add(doc)
def add ( self , uid : str , title : str , text : Union [ str , Iterable ] ) : doc = CordDoc ( uid = uid , title = title ) doc , unique_tokens = doc . fit ( text ) self . len += 1 for token in unique_tokens : if token not in self . docmap : self . docmap [ token ] = set ( ) self . docmap [ token ] . add ( doc )
Adds document to index
Parameters:
Adds document to index Parameters :
'''
        Adds document to index

        Parameters:
        -------------
        uid: unique identification string

        title: title of document

        text: text of document
        ''' # Make wordfreqs # Add document to hashmap where keys are unique tokens, and values # are sets
self
uid
str
title
str
text
Union[str, Iterable]