def col_defs(self): from clld.web.datatables.contribution import ContributorsCol, CitationCol return [ Col(self, 'number', sTitle='number', model_col=Dictionary.number, input_size='mini'), LinkCol( self, 'dictionary', sTitle='dictionary'), ContributorsCol( self, name='author', sTitle='author'), Col(self, 'entries', sTitle='entries', sClass='right', model_col=Dictionary.count_words), YearCol( self, 'year', bSearchable=False, sTitle='year', model_col=Dictionary.published), CitationCol(self, 'cite', sTitle='cite'), ]
def col_defs(self): return [ IntegerIdCol(self, 'id'), LinkCol(self, 'name', sTitle='Language structure dataset'), ContributorsCol(self, 'contributors', bSearchable=False, bSortable=False, sTitle='Authors of dataset'), Col(self, 'lexifier', choices=get_distinct_values(Lect.lexifier, key=lambda v: 'z' + v if v == 'Other' else v), get_obj=lambda item: item.language, model_col=Lect.lexifier), Col(self, 'region', choices=get_distinct_values(Lect.region), get_obj=lambda item: item.language, model_col=Lect.region), CitationCol(self, 'cite', bSearchable=False, bSortable=False), IntegerIdCol(self, 'survey', get_object=lambda c: c.language.survey, bSearchable=False, bSortable=False, sTitle='Survey'), ]
def col_defs(self): return [ # ID, Vocabulary, Authors, Number of words, Percentage of loanwords, cite IntegerIdCol( self, 'id', sTitle="ID", sDescription=literal( "The vocabulary ID number corresponds to the ordering to the" " chapters on the book <em>Loanwords in the World's Languages</em>. " "Languages are listed in rough geographical order from west to east, " "from Africa via Europe to Asia and the Americas, so that " "geographically adjacent languages are next to each other." )), VocabularyCol( self, 'vocabulary', sDescription=literal( "<p>Each vocabulary of WOLD is a separate electronic " "publication with a separate author or team of authors. Each vocabulary " "has a characteristic colour in WOLD.</p><p>Click on a vocabulary to " "see the words (loanwords and nonloanwords) and their properties.</p>" )), ContributorsCol( self, 'contributor', sDescription= "The authors are experts of the language and its history. " "They also contributed a prose chapter on the borrowing situation in " "their language that was published in the book " "Loanwords in the World's Languages."), Col(self, 'n', sTitle='Number of words', model_col=Vocabulary.count_words, sDescription="There would be 1814 words in each vocabulary, " "corresponding to the 1814 Loanword Typology meanings, if each meaning " "had exactly one counterpart, and if all the counterparts were " "different words. But many (\"polysomous\") words are counterparts of " "several meanings, many meanings have several word counterparts " "(\"synonyms\", or \"subcounterparts\"), and many meanings have no " "counterparts at all, so the number of words in each database varies " "considerably."), PercentCol( self, 'p', sTitle='Percentage of loanwords', model_col=Vocabulary.borrowed_score, sDescription= "This gives the percentage of words in each language that " "are \"clearly borrowed\" or \"probably borrowed\"."), CitationCol(self, 'cite'), ]
def col_defs(self): return [ IntegerIdCol(self, 'id'), LinkCol(self, 'name', sTitle='Feature information'), ChapterCol(self, 'chapter', sTitle='Chapter'), Col(self, 'feature_type', model_col=Feature.feature_type, sFilter='primary', choices=['primary', 'segment', 'sociolinguistic']), AreaCol(self, 'area'), WalsCol(self, 'WALS feature', model_col=Feature.wals_id), CitationCol(self, 'cite'), ]
def col_defs(self): return [ NumberCol(self, 'number', model_col=models.CrossgramData.number), LinkCol(self, 'name'), ContributorsCol(self, 'contributor'), DateCol(self, 'published'), Col( self, 'data_source', bSearchable=False, bSortable=False, sTitle='Data source', format=lambda i: i.doi_link() or i.git_link()), CitationCol(self, 'cite'), ]
def col_defs(self): res = [ LinkCol(self, 'name', sTitle='Language (Contributor)'), Col(self, 'source_name', model_col=Inventory.description), CountCol(self, 'all', bSearchable=False, bSortable=False) ] for c in 'vowel consonant tone'.split(): res.append( Col(self, c, model_col=getattr(Inventory, 'count_' + c), sTitle='# %ss' % c)) res.extend([ PhoibleContributorsCol(self, 'contributor'), CitationCol(self, 'cite'), ]) return res