Version 8.8.0

All pages

Vocabulary

Solid Memo stores its data as linked data (RDF), where a web address names every kind of thing and every property. Where no standard has a term, as for a card's review schedule, Solid Memo defines its own. This page says where those terms are defined, how they're versioned, and how the app's constants are generated from them. The namespace is https://solid-memo.com/ns/vocab/v1.ttl#: the Turtle files declare it as solid-memo:, and these docs abbreviate it to sm:. No existing vocabulary covers spaced repetition.

Source of truth

The vocabulary lives in this repository's ns/vocab/ folder, and the site publishes it at https://solid-memo.com/ns/vocab/ (ns.ts, deployment.md). Its documents are v1.ttl (the ontology), topics.ttl (the topics scheme) and external.ttl (reference data). Each document's address is its IRI and its @base, every term IRI a fragment of it. Changes go through git and CI (ci.yml).

ns/vocab/v1.ttl is an RDFS/OWL ontology. Its owl:Ontology subject carries owl:versionInfo and a skos:changeNote per release. Every term is an owl:Class, owl:DatatypeProperty (literal-valued, with an xsd: range) or owl:ObjectProperty (IRI-valued), with rdfs:label, rdfs:comment, rdfs:domain where it has one class, rdfs:range, rdfs:isDefinedBy and a skos:historyNote saying when it arrived.

Where the vocabulary goes
The vocabulary's Turtle file generates the TypeScript constants and is published with the site, where it is read as reference data.
The diagram's source
flowchart LR
    accTitle: Where the vocabulary goes
    accDescr: The vocabulary's Turtle file generates the TypeScript constants and is published with the site, where it is read as reference data.
    ttl["ns/vocab/v1.ttl"] -->|npm run generate| ts["src/vocab.generated.ts<br/>SM constants"]
    ttl -->|npm run build| dist["dist/ns/vocab/v1.ttl"]
    ts --> app["mappers, tooling"]
    dist -->|read at runtime| refs["reference data<br/>(profile checks)"]

SM in vocab.ts re-exports the generated constants, each with its term's comment and history note as JSDoc, and SM_CONCEPT_PROPERTIES, the properties whose range is skos:Concept. The external vocabularies there (Solid terms, PIM space, Dublin Core terms, RDF, RDFS, FOAF) aren't Solid Memo's and stay hand-written. standards.md lists every vocabulary and specification Solid Memo uses, with its version and status.

Concept schemes

A value from a fixed set is a SKOS concept, not a string:

SchemeWhereConceptsUsed by
sm:StudyDirectionsv1.ttlsm:frontToBack, sm:backToFront, sm:bidirectionalsm:studyDirection on a deck
sm:InvalidDataPoliciesv1.ttlsm:blockInstance, sm:blockSubject (default), sm:warnOnlysm:invalidDataPolicy in preferences
sm:Themesv1.ttlsm:systemTheme (default), sm:lightTheme, sm:darkThemesm:theme in preferences (theme.md)
sm:Palettesv1.ttlsm:standardPalette (default), sm:highContrastPalette, sm:colorVisionPalette, sm:parchmentPalettesm:palette in preferences (theme.md)
sm:TextSizesv1.ttlsm:defaultTextSize (default), sm:largeTextSize, sm:largerTextSize, sm:largestTextSizesm:textSize in preferences (theme.md)
sm:AnswerModesv1.ttlsm:recall (absent means this), sm:multipleChoicesm:answerMode on an answer in the answer log
sm:TextFormatsv1.ttlsm:plainText (absent means this), sm:markdownsm:textFormat on a card, a course step or a chapter (Text formats)
sm:Schedulersv1.ttlsm:sm2 (absent means this), sm:fsrs6sm:scheduler on a review state (Review states); sm:studyScheduler in preferences and sm:scheduledWith on a deck schedule (FSRS-6)
Topics (https://solid-memo.com/ns/vocab/topics.ttl)topics.ttllanguages (swedish), geography, computing (linked-data), science (chemistry), art, labour-marketdcat:theme on a deck, next to the EU data theme EDUC

Versioning policy

Courses

Version 1.14 added the terms of a course: a library release that's also a schema:Course, with chapters of steps whose questions are its cards.

TermKindDomain → rangeAlignment
sm:Chapterclasssubclass of schema:Syllabus
sm:Stepclasssubclass of schema:LearningResource
sm:Distractorclasssubclass of schema:Answer
sm:theorydatatype propertyStep → language-tagged textsubproperty of schema:text
sm:checkedByobject propertyStep → Card
sm:reviewQuestionobject propertyChapter → Card
sm:distractorobject propertyCard → Distractorrdfs:seeAlso schema:suggestedAnswer
sm:distractorTextdatatype propertyDistractor → text, untagged or tagged as sm:back issubproperty of schema:text
sm:distractorNotedatatype propertyDistractor → language-tagged textrdfs:seeAlso schema:answerExplanation
sm:completedChapterobject propertyDeck → Chapter
sm:answerModeobject propertyAnswer → a concept of sm:AnswerModes
sm:chosenDistractorobject propertyAnswer → Distractor

Text formats

Version 1.15 added how a text is written: sm:textFormat, a concept of sm:TextFormats, on the subject that holds the text.

ConceptNotationMeaning
sm:plainTextplainShown as written, as with no text format; written where a person chose it, to tell a choice from a marker an older app lost.
sm:markdownmarkdownCommonMark 0.31.2, with GitHub Flavored Markdown pipe tables as its one extension (skos:broadMatch IANA text/markdown).

Review states

Version 1.16 added what a review state is of: an app can join a state to its card without Solid Memo's naming rule, and keep states of another algorithm beside Solid Memo's.

TermKindDomain → rangeAbsent means
sm:reviewOfobject propertyReviewState → Cardthe card the subject is named after: #<cardId> or #<cardId>@back-to-front
sm:reviewDirectionobject propertyReviewState → sm:frontToBack or sm:backToFrontback to front when the subject ends in @back-to-front, else front to back
sm:schedulerobject propertyReviewState → a concept of sm:Schedulerssm:sm2, as every state was before 1.16

The library index

Two terms appear only in the deck library's index, outside their subjects' shapes. sm:cardCount is the number of cards in use of a listed release. Since 1.17, sm:newcomerCourse (dcat:Catalog → dcat:DatasetSeries) names the course the app offers to someone with no decks yet (courses.md); without it, the app offers none. A pod's catalog.ttl never has sm:newcomerCourse.

A card's release

Since 1.27, sm:fromRelease (sm:Card → dcat:Dataset) names the library release a card of a learner's deck was taken from: written as the deck is added, as an upgrade writes the card, and as a course's question joins the deck. A card moved or copied in, or one the learner wrote, names none. In a deck added from a link, an upgrade changes, retires or removes only cards that name a release (migrations.md). It belongs to no shape, like sm:deckCardLanguage, so CardV7 keeps it untouched; a library release never carries it.

Drafts and releases

Three terms of 1.18 let anyone write and publish a release in their own pod (the Studio, studio.md):

TermFrom → toWhat
sm:releaseDraftdcat:Catalog → sm:DeckA release the catalog's owner is drafting in the instance: the draft's release document, its subject the draft deck, as a release is its document.
sm:publishedReleasedcat:Catalog → dcat:DatasetA release the owner published from the instance, frozen once published; a reader of the catalog finds the author's releases there.
sm:releasedAssm:Deck → dcat:DatasetOn a draft: the release it was published as, and no longer edited; absent, the draft is still being written.

The two catalog links, like sm:newcomerCourse, belong to no shape. sm:releasedAs belongs to draft deck format 1 (shapes.md), a link rather than a flag.

The answer log

Four terms of 1.19 say how an answer in the answer log was given:

TermKindDomain → rangeAlignment
sm:recallMillisdatatype propertyAnswer → xsd:integer (milliseconds)
sm:gradeMillisdatatype propertyAnswer → xsd:integer (milliseconds)
sm:priorDuedatatype propertyAnswer → xsd:string (YYYY-MM-DD, as sm:due)
sm:utcOffsetMinutesdatatype propertyAnswer → xsd:integer (minutes east of UTC)

1.25 added a summary of one study month of the log, derived data in the instance's digest like 1.9's receipts and schedules, so the today strip reads only months that changed (statistics.md):

TermKindDomain → range
sm:MonthSummaryclass
sm:summaryOfobject propertyMonthSummary → the month's history/<YYYY-MM>.ttl
sm:summarizedVersiondatatype propertyMonthSummary → xsd:string (the document's ETag)
sm:studyDayCountsdatatype propertyMonthSummary → xsd:string, YYYY-MM-DD answers introduced reviews lapses
sm:youngReviewCount, sm:youngRecalledCountdatatype propertyMonthSummary → xsd:integer
sm:recallSecondsCountdatatype propertyMonthSummary → xsd:string, seconds count, 0 to 60 seconds

A summary keeps recall times as counts by the second, which add up into a year's, as medians don't.

Card labels

1.20 gave the front a label, as 1.8 gave the back:

TermKindDomain → rangeAlignment
sm:frontLabeldatatype propertyCard → xsd:string (language-tagged)

A label is a short caption above a side's text that says what kind of thing that side is ("Country" above "Croatia", "Capital" above "Zagreb"). It shows whenever its side does, as the question or the answer, so a card studied both ways says what's asked. The side's text stays the prompt or the answer. Card format 6 owns it (shapes.md).

FSRS-6

1.21 added a second scheduler, FSRS-6, whose states are kept beside the SM-2 ones (#191):

TermKindDomain → range
sm:fsrs6concept of sm:Schedulers (notation fsrs6)
sm:stabilitydatatype propertyReviewState → xsd:decimal (days, > 0)
sm:difficultydatatype propertyReviewState → xsd:decimal (1–10)
sm:previousStabilitydatatype propertyReviewState → xsd:decimal
sm:previousDifficultydatatype propertyReviewState → xsd:decimal
sm:studySchedulerobject propertyPreferences → a concept of sm:Schedulers
sm:desiredRetentiondatatype propertyPreferences → xsd:decimal (a share: 0.9 is 90%)
sm:schedulerInvitationDismisseddatatype propertyPreferences → xsd:boolean (the learner answered "Not now" to the invitation to switch to FSRS-6)
sm:connectedScreenSkippeddatatype propertyPreferences → xsd:boolean, outside the shape (whether logging in skips the Connected screen; 1.26)
sm:scheduledWithobject propertyDeckSchedule → a concept of sm:Schedulers

Palettes of one's own

1.23 added the terms of a palette the user designs, kept in the instance's palettes.ttl (theme.md):

TermKindDomain → range
sm:Paletteclass, a subclass of skos:Concept
sm:ColorSetclass
sm:basedOnobject propertyPalette → a concept of sm:Palettes
sm:lightColors, sm:darkColorsobject propertyPalette → ColorSet
sm:backgroundColor, sm:surfaceColor, sm:sunkenSurfaceColor, sm:textColor, sm:mutedTextColor, sm:borderColor, sm:fieldEdgeColor, sm:primaryColor, sm:primaryFillColor, sm:onPrimaryColor, sm:linkColor, sm:dangerColor, sm:warningColor, sm:grade0Color … sm:grade5Colordatatype propertyColorSet → xsd:string, #rrggbb

The language of text

Solid Memo's text properties say their language with the literal's language tag ("Huvudstäder"@sv), one value per language, not with an sm: term. They're sm:front, sm:back, sm:frontNote, sm:frontLabel, sm:backLabel, sm:backNote, sm:frontImageDescription, sm:backImageDescription, sm:theory, sm:distractorText, sm:distractorNote, and dcterms:title and dcterms:description on a deck or chapter. A deck's keywords (dcat:keyword) are tagged the same way, the one text with several values per language ("capitals"@en, "countries"@en, "huvudstäder"@sv). Tags are BCP 47, stored in lower case. Text in no language — codes, numbers, symbols ("404", "Fe") — is tagged zxx, BCP 47's "no linguistic content", and shown with no lang. A card side saved untagged (xsd:string), or a keyword saved before deck format 6, has an unknown language, not none. The shapes say which formats require which tags.

No term names the languages a deck is in: the app offers languages from the tags the deck's text uses (i18n.md). sm:deckCardLanguage (1.24), one lower-case BCP 47 tag as a plain string on the deck's catalog entry, is the language the learner wants the deck's card text shown in first, ahead of the app's. On a course it covers the course's text too (i18n.md says which text). Its definition took in a course's text after 1.25 without a version bump. A reader keeps it only when it names a language other than zxx. dcterms:language isn't used for it: that term appears only on library releases, for DCAT-AP, naming EU authority-table languages (IRIs, not tags), and can't tell a card's front from its back or a learner's preference.

sm:deckPictureHost (1.28), one host per value as a plain string on the deck's catalog entry, is a host whose pictures the learner chose to show on a deck copied from a release outside the library's index (privacy.md). A reader keeps only a value written as a URL's host is, at most 100 of them, and a catalog outside the learner's own pod isn't believed.

sm:deckPausedAt and sm:deckResumesOn (1.29), on the deck's catalog entry, are a deck the learner paused: when, as an xsd:dateTime, and until which study day. The day is a plain "YYYY-MM-DD" string as sm:due is, since a study day is a calendar label, not an instant. A resumed deck keeps them, the resume day then the day it resumed (srs.md).

License

Everything in ns/ is MIT-licensed, like the rest of the repository (README). The topics scheme states it in its data, dcterms:license <https://spdx.org/licenses/MIT> (since 1.11). v1.ttl, the shapes' versions and external.ttl don't state it in their RDF: REUSE.toml states it for every file in ns/, without editing them (style.md). A future version of the ontology or of a shape may state it as the topics scheme does.

What dereferences

IRIWhat is served
https://solid-memo.com/ns/vocab/v1.ttl#Deck (any term)The ontology, …/ns/vocab/v1.ttl, as Turtle: the term is a subject of it.
https://solid-memo.com/ns/vocab/topics.ttl#geography (any topic)The topics scheme, …/ns/vocab/topics.ttl.
https://solid-memo.com/ns/vocab/external.ttlReference data, not Solid Memo's terms: the external terms (EU authority-table entries, media types) Solid Memo data points at, typed so profile validation can check them.

GitHub Pages serves each as text/turtle with Access-Control-Allow-Origin: *, so any application reads it directly. There's no content negotiation, so the namespace keeps the .ttl (an IRI without it is a 404). The turtleDirectoryPlugin in packages/build-tools/src/publishTurtle.ts emits them into the build and serves them in dev.

Adding a term

  1. Add it to ns/vocab/v1.ttl with every annotation; bump the version and the change note.
  2. Run npm run generate. CI runs npm run generate:check and fails on drift, as does the drift test in packages/lib/vocab/tooling/generate.test.ts.
  3. Use it in a shape: the fixture test checks that every sm: predicate a shape uses is declared here. Only a new class's shape takes a term: a published shape is never edited and gets no next version, so a term for a class that has one is written outside its shape (Versioning policy).