def format(self, kind='string', n=100, window=35, print_it=True, columns='all', metadata=True, **kwargs): """ Print concordance lines nicely, to string, LaTeX or CSV :param kind: output format: `string`/`latex`/`csv` :type kind: `str` :param n: Print first `n` lines only :type n: `int`/`'all'` :param window: how many characters to show to left and right :type window: `int` :param columns: which columns to show :type columns: `list` :Example: >>> lines = corpus.concordance({T: r'/NN.?/ >># NP'}, show=L) ### show 25 characters either side, 4 lines, just text columns >>> lines.format(window=25, n=4, columns=[L,M,R]) 0 we 're in tucson , then up north to flagst 1 e 're in tucson , then up north to flagstaff , then we we 2 tucson , then up north to flagstaff , then we went through th 3 through the grand canyon area and then phoenix and i sp :returns: None """ from corpkit.other import concprinter if print_it: print(concprinter(self, kind=kind, n=n, window=window, columns=columns, return_it=True, metadata=metadata, **kwargs)) else: return concprinter(self, kind=kind, n=n, window=window, columns=columns, return_it=True, metadata=metadata, **kwargs)
def format(self, kind='string', n=100, window=35, columns='all', **kwargs): """ Print concordance lines nicely, to string, LaTeX or CSV :param kind: output format: `string`/`latex`/`csv` :type kind: `str` :param n: Print first `n` lines only :type n: `int`/`'all'` :param window: how many characters to show to left and right :type window: `int` :param columns: which columns to show :type columns: `list` :Example: >>> lines = corpus.concordance({T: r'/NN.?/ >># NP'}, show=L) ### show 25 characters either side, 4 lines, just text columns >>> lines.format(window=25, n=4, columns=[L,M,R]) 0 we 're in tucson , then up north to flagst 1 e 're in tucson , then up north to flagstaff , then we we 2 tucson , then up north to flagstaff , then we went through th 3 through the grand canyon area and then phoenix and i sp :returns: None """ from corpkit.other import concprinter return concprinter(self, kind=kind, n=n, window=window, columns=columns, **kwargs)
def format(self, kind = 'string', n = 100, window = 35, columns = 'all', **kwargs): """ Print conc lines nicely, to string, LaTeX or CSV >>> lines.format(window = 25, n = 10, columns = ['l', 'm', 'r']) :param kind: output format :type kind: str (``'string'``/``'latex'``/``'csv'``) :param n: Print first ``n`` lines only :type n: int/'all' :param window: how many characters to show to left and right :type window: int :param columns: which columns to show :type columns: list :returns: None """ from corpkit.other import concprinter concprinter(self, kind = kind, n = n, window = window, columns = columns, **kwargs)
def _format(self, *args, **kwargs): from corpkit.other import concprinter concprinter(self, *args, **kwargs)
def formatfunc(self, *args, **kwargs): from corpkit.other import concprinter concprinter(self, *args, **kwargs)