Class: Sense

.models. Sense

A class representing a Sense within a Lexeme

new Sense( [data])

Create a new Sense object
Parameters:
Name Type Argument Description
data Object <optional>
The raw data to create this sense from. Should be formatted as a Sense object.
Properties
Name Type Argument Description
argumentStructure String <optional>
An abstract representation of the argument structure of this sense, as a string.
category Object <optional>
The lexical category, part of speech, or morphosyntactic class for this Lexeme. If the current lexeme is an affix or other grammatical morpheme morpheme, this field should be used to describe the category that the morpheme attaches to. For example, the English verb suffix `‑s` would have this this property set to `verb`, and the English derivational suffix `‑ize` would have this property set to `noun`. Must be formatted as a MultiLangString.
definition Object <optional>
The definition for this particular sense, optionally in multiple languages. Must be formatted as a MultiLangString.
derives Object <optional>
If this lexeme is a derivational morpheme, this field indicates the type of lexical category, part of speech, or morphosyntactic class that is derived when this morpheme is applied. For example, the English derivational suffix ‑er would have this property set to noun. Must be formatted as a MultiLangString.
examples Array <optional>
A collection of examples of this sense in use. Each example must be formatted as a Phrase.
gloss Object A Leipzig-style gloss for this sense, formatted as a MultiLangString.
inflectionClass Object <optional>
If this lexeme is a root or stem, this field indicates the inflectional class that the sense takes. If this lexeme is an inflectional morpheme, this field indicates the inflectional class that the morpheme belongs to. If this lexeme is a derivational morpheme, this field indicates the inflectional class of the derived form. Must be formatted as a MultiLangString.
lexicalRelations Array <optional>
A collection of lexical relations between this sense and other senses in this lexicon or other lexicons. Each item must be formatted as a LexemeReference.
notes Array <optional>
A collection of notes about this sense. Each item must be formatted as a Note.
references Array <optional>
A collection of bibliographic references about this particular sense. Each item must be formatted as a Reference object.
scientificName String <optional>
The scientific name for this item.
sources Array <optional>
An array of attested sources for this sense, as strings. This will often be the initials of a speaker, but could also be the abbreviation of the story the lexeme was found it, or other types of sources.
tags Object <optional>
An object containing tags and their values. May also be an iterable object, whose items are arrays of tags and their values (in other words, the standard method for instantiating a new Map object; see MDN's Map documentation for more details).
usages Array <optional>
An array of appropriate usages for this sense. Examples include `formal`, `medicinal`, `informal`, etc. Each item should be formatted as a MultiLangString.
variantOf Object <optional>
If this sense is a variant of another sense, a reference to the other sense should go here. For example, sometimes two speakers may use the same word with a slightly different set of senses. In American English, for instance, Coke is a specific brand of soda for most speakers, but a generic term for soda for other speakers. The generic sense would therefore be listed as a dialectal variant of the specific sense. Must be formatted as a LexemeReference.
variants Array <optional>
An array of variants of this sense. Each item must be formatted as a LexemeReference.
variantType Object <optional>
If this reference is to a variant of a lexeme or sense, this field can be used to specify the type of variant. Possible values might be a person's name (representing an idiolectal variant), or simply `idiolectal`, or `dialectal` (or the name of the dialect), or `rapid speech`, etc. Must be formatted as a MultiLangString.
Properties:
Name Type Description
argumentStructure String An abstract representation of the argument structure of this sense, as a string.
category Object The lexical category, part of speech, or morphosyntactic class for this Lexeme. If the current lexeme is an affix or other grammatical morpheme morpheme, this field should be used to describe the category that the morpheme attaches to. MultiLangString.
cat String A shorthand for accessing the default orthography of the `category` object, if one is set
definition Object The definition for this particular sense, optionally in multiple languages. MultiLangString.
def String A shorthand for accessing the default orthography of the `definition` object, if one is set
derives Object If this lexeme is a derivational morpheme, this field indicates the type of lexical category, part of speech, or morphosyntactic class that is derived when this morpheme is applied. For example, the English derivational suffix ‑er would have this property set to noun. MultiLangString.
der String A shorthand for accessing the default orthography of the `derives` object, if one is set
examples Array A collection of examples of this sense in use. Each example is a Phrase.
gloss Object A Leipzig-style gloss for this sense. MultiLangString.
gl String A shorthand for accessing the default orthography of the `gloss` object, if one is set
inflectionClass Object If this lexeme is a root or stem, this field indicates the inflectional class that the sense takes. If this lexeme is an inflectional morpheme, this field indicates the inflectional class that the morpheme belongs to. If this lexeme is a derivational morpheme, this field indicates the inflectional class of the derived form. MultiLangString.
inflection String A shorthand for accessing the default orthography of the `inflectionClass` object, if one is set
lexicalRelations Array An array of lexical relations between this sense and other senses in this lexicon or other lexicons. Each item is a LexemeReference.
notes Array An array of notes about this sense. Each item is a Note.
references Array An array of bibliographic references about this particular sense. Each item is a Reference object.
scientificName String The scientific name for this item.
sources Array An array of attested sources for this sense, as strings.
tags Object A Map object containing tags for this Lexeme, as a Tags object.
usages Array An array of appropriate usages for this sense. Examples include `formal`, `medicinal`, `informal`, etc. Each item is a MultiLangString.
variantOf Object A reference to another sense, that this sense is a variant of. LexemeReference.
variants Array An array of variants of this sense. Each item is a LexemeReference.
variantType Object If this reference is to a variant of a lexeme or sense, this field can be used to specify the type of variant. Possible values might be a person's name (representing an idiolectal variant), or simply `idiolectal`, or `dialectal` (or the name of the dialect), or `rapid speech`, etc. MultiLangString.
varType String A shorthand for accessing the default orthography of the `variantType` object, if one is set
Example
const sense = new Sense({
  category:   { eng: 'noun', spa: 'nomino' },
  definition: { eng: 'hello (a greeting)', spa: 'hola (un saludo)' },
  gloss:      { eng: 'hello', spa: 'hola' },
});

console.log(sense.category.eng); // 'noun'