Skip to content

comparative-concepts/cc-database

Repository files navigation

Database of Comparative Concepts

Cross-linked database of Comparative Concepts, extracted from "Morphosyntax: constructions of the world's languages", by William Croft (2022)

Usage

You can use this database in the following ways:

  • You can explore the interactive glossary, where you can read definitions and see how different CCs relate to each other.
  • You can play with our interactive visualization, which shows the relations between CCs as self-organizing graphs. You can filter these graphs to focus on just some CCs if you want.
  • You can use the raw database in your own applications. It is stored in YAML, and its structure is described below.

Organisation of the YAML database

The CC database is stored in a YAML file. Here is an example of a CC entry:

cc-database/cc-database.yaml

Lines 5675 to 5686 in 7d4b779

- Id: sem:less-affected-p
Type: sem
Name: less affected P
Alias:
- LAP
SubtypeOf:
- sem:p-role
Definition: >-
a <a>function</a> related to the function of the <a>antipassive construction</a>, in which the <a>P</a> <a>participant</a> is less <a>affected</a> than it is in the equivalent event expressed by <a>transitive construction</a>. <i>Example</i>: in <i>The coyote chewed on the deer bone</i>, the deer bone is a less affected P participant than in the transitive <i>The coyote chewed the deer bone</i>. (Section 8.4)
Examples:
- The coyote chewed on the deer bone
- The coyote chewed the deer bone

This says the the unique id is sem:less-affected-p, it has the name "less affected P" and the type "sem". It also has an alternative name, "LAP", and is a subtype of sem:p-role. The definition is written in a pseudo-html format which can be parsed into correct HTML by the parsing script. Finally there are two example sentences that are extracted from the definition.

YAML type definition

The YAML database consists of a list of entries of the following form:

- Id: cc-id (a string)
  Name: str
  Alias: list of strings (possibly empty)
  Type: one of sem/cxn/inf/str/def
  Definition: pseudo-html string
  Examples: list of examples, either as plain strings or with information about language, gloss, translation, etc.

  SubtypeOf, ConstituentOf, HeadOf,
  AttributeOf, RoleOf,
  ExpressionOf, ModeledOn, RecruitedFrom: these are the different relations, stored as lists of cc-ids

The database parsing script

The script ccdb_parser.py parses (and validates) the YAML database and outputs it in different formats. Currently only HTML output is supported.

usage: ccdb_parser.py [-h] [--quiet] [--format {html,karp,fnbr,graph}] [--keep-deleted] cc_database

Parse the comparative concepts database and export it in different formats.

positional arguments:
  cc_database           YAML database of comparative concepts

options:
  -h, --help            show this help message and exit
  --quiet, -q           suppress warnings
  --format FMT, -f FMT  export format (FMT = html, karp, fnbr, graph)
  --keep-deleted, -d    keep deleted terms

There's a Makefile that reads the database and creates the files docs/index.html and docs/cc-graph-data.js. They are used in the interactive glossary and the interactive visualization.

About

Cross-linked database of Comparative Concepts, extracted from "Morphosyntax: constructions of the world's languages", by William Croft (2022)

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors