Lexical database (source code)

= Lexical database

A <lexical database> organizes information about the <lexemes> of a <language>. It can record forms, <part of speech>, definitions, <word senses>, examples and relationships among entries. A <database> representation makes these items separately identifiable and queryable rather than treating an entire entry as one unstructured string.<Lexical Database in the SIL Glossary of Linguistic Terms>[Definition and Discussion, entry contents and sense-specific information]{ref}

For a toy design, an entry for `bank` can link to distinct <word sense> records for a financial institution and a river margin, each with an example sentence. A form record for `banks` can refer to the relevant entry without requiring duplicated definitions. Spelling is consequently an inadequate unique identifier: different lexical analyses can involve the same written form.

A <lexical database> can also connect entries to attested uses in a <text corpus>, as in <FieldWorks Language Explorer>. The stored relations support searches and revision, but the <linguistic annotation> still represents an analysis whose evidence must be retained.