Package: pyconcepticon
pyconcepticonTooling to access and curateConcepticon data.Installationpyconcepticoncan be installed fromPyPIrunningpipinstallpyconcepticonNote thatpyconcepticonrequires a clone or export of theconcepticon data repository.UsageTo usepyconcepticonyou must have a local copy of the Concepticon data, i.e. eitherthe sources of areleased version, as provided in theDownloadssection of a release, ora clone of this repository (or your personal fork of it).or a released version of the data as archived onZENODO.Python APIAssuming you have downloaded release 1.2.0and unpacked the sources to a directoryclld-concepticon-data-41d2bf0, you can access
the data as follows:>>>frompyconcepticonimportConcepticon>>>api=Concepticon('clld-concepticon-data-41d2bf0')>>>conceptlist=list(api.conceptlists.values())[0]>>>conceptlist.author'Perrin, Loïc-Michel'>>>conceptlist.tags['annotated']>>>len(conceptlist.concepts)110>>>list(conceptlist.concepts.values())[0]Concept(id='Perrin-2010-110-1',number='1',concepticon_id='1906',concepticon_gloss='SOUR',gloss=None,english='ACID',attributes={'german':'sauer','french':'acide'},_list=Conceptlist(_api=<pyconcepticon.api.Concepticonobjectat0x7f31693be518>,id='Perrin-2010-110',author='Perrin, Loïc-Michel',year=2010,list_suffix='',items=110,tags=['annotated'],source_language=['english','french','german'],target_language='Global',url='https://journals.dartmouth.edu/cgi-bin/WebObjects/Journals.woa/xmlpage/1/article/353?htmlOnce=yes',refs=['Perrin2010'],pdf=['Perrin2010'],note='This list was used as an initial questionnaire for colexification studies on a world-wide sample of languages.',pages='276f',alias=[],local=False))Command line interfaceHaving installedpyconcepticon, you can also directly query concept lists via the terminal commandconcepticon. To learn about the functionality it provides run$concepticon-h
usage:concepticon[-h][--log-levelLOG_LEVEL][--reposREPOS][--repos-versionREPOS_VERSION]COMMAND...

optionalarguments:-h,--helpshowthishelpmessageandexit--log-levelLOG_LEVELloglevel[ERROR|WARN|INFO|DEBUG](default:20)--reposREPOScloneofconcepticon/concepticon-data--repos-versionREPOS_VERSIONversionofrepositorydata.Requiresagitclone!(default:None)availablecommands:Run"COMAMND -h"togethelpforaspecificcommand.COMMANDattributesPrintallcolumnsinconceptliststhatcontainsurplusinformation.
...To learn about individual subcommands runconcepticon COMMAND -h, e.g.$concepticonlookup-h
usage:concepticonlookup[-h][--format{fancy_grid,fancy_outline,github,grid,html,jira,latex,latex_booktabs,latex_longtable,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,pretty,psql,rst,simple,textile,tsv,unsafehtml,youtrack}][--similaritySIMILARITY][--full-search][--languageLANGUAGE]GLOSS[GLOSS...]LookupthespecifiedglossesinConcepticon.

positionalarguments:GLOSS

optionalarguments:-h,--helpshowthishelpmessageandexit--format{fancy_grid,fancy_outline,github,grid,html,jira,latex,latex_booktabs,latex_longtable,latex_raw,mediawiki,moinmoin,orgtbl,pipe,plain,presto,pretty,psql,rst,simple,textile,tsv,unsafehtml,youtrack}Formatoftabularoutput.(default:simple)--similaritySIMILARITYspecifylevelofsimilarityforconceptmapping(default:5)--full-searchselectbetweenapproximatesearch(default)andfullsearch(default:False)--languageLANGUAGEspecifyyourdesiredlanguageformapping(default:en)To create a user interface which allows you to explore concepticon concepts in the browser, run$concepticon--repos=clld-concepticon-data-41d2bf0appConfigurationThe Python API as well as the CLI can lookup the location of the data from acldfcatalogconfig file, under the keyconcepticon.Such a config file (and the repository clone) can be created automatically,
by installingcldfbenchand runningcldfbench config.