Skip to content

Combinator Documentation

Ant13731 edited this page May 19, 2021 · 25 revisions

Introduction

The purpose of this page is to help users and contributors easily see the combinators for English that currently exist in Drasil and are available for use. This will also help to keep all of the different combinators organized and to separate them by their English meanings. As brought up in issue #2399, we are trying to encapsulate the knowledge associated with common English combinators as a means to generalize Drasil's language while making readability of the code clearer. So far, we have separated these combinators into four levels:

  • Level 1: Sentence level. These combinators can only be used to join two Sentences, and they do not hold any semantic meaning usable by Drasil. In other words, they are only surface level combinators and are unable to produce a sophisticated idea from two simpler ideas. When joining concepts, these should only be used when the relationship between the phrases is unable to be expressed with any higher-level combinators.
  • Level 2: NounPhrase level. The combinators listed here are better than Sentence-level combinators as they can hold information about pluralization and capitalization rules. As a result, Drasil can utilize these combinators in more powerful ways because it can know the rules that govern how an applied Sentence should look. Because of the nature of the NP type (having the ability to hold knowledge of singular, plural, capital, and title cases), these combinators can easily replace many Sentence-level combinators and give Drasil more knowledge when recording information.
  • Level 3: NamedIdea or conceptual level. These combinators are similar to the NounPhrase combinators, except they are able to hold the semantic meaning of the combinator. These represent a new idea that is built upon multiple simpler ideas, allowing Drasil to grow its knowledge of such ideas. The combinators at this level are ideal and practical for use in Drasil, but they are more difficult to implement. One must be able to see the underlying patterns that are within English, and then apply them using these combinators. For example, something like the ofThe combinator will allow us to contain the knowledge that the first idea is a unique attribute of the second idea.
  • Level 4: Things above NamedIdeas that are amenable to joining. This is ideal and something to aim for, but a little too early to start incorporating consistently.
Clone this wiki locally