Monday, August 12, 2024

Mapping out Tetrachromat Color Categories

tetrachromacy is kind of convenient because you still have only 2 dimensions of hue, so you can actually diagram out what the color regions are, and just tell people "y'all already know how brightness and saturation work, so I don't need to put those on the chart".

    But I didn't actually try to make such a diagram. However, the last two episodes of George Corley's Tongues and Runes stream on Draconic gave me a solid motivation to figure out how to do it.

    Any such diagram will have to use some kind of false-color convention. We could try subdividing the spectrum to treat, e.g., yellow or cyan like a 4th physical primary for producing color combinations, and that might be the most accurate if you're trying to represent the color space of a tetrachromat whose total visual spectrum lies within ours, just divided up more finely--but the resulting diagrams are really hard to interpret. It's even worse if you try to stretch the human visible spectrum into the infrared or ultraviolet, 'cause you end up shifting colors around so that, e.g., what you would actually perceive as magenta ends up represented as green on the chart. The best option I could come up with was to map the "extra" spectral color--the color you can't see if it happens to be ultraviolet or infrared--to black, and use luminance to represent varying contributions of that cone to composite colors. Critically, if you don't want to work out the exact spectral response curves for a theoretical tetrachromatic creature to calculate their neurological opponent channels, you can map out the color space in purely physical terms, like we do with RGB color as opposed to, e.g., YCrCb or HSV color spaces. That doesn't require any ahead-of-time knowledge of which color combinations are psychologically salient.

    My first intuition on how to map out the 2D hue space was to arrange the axes along spectral hue--exactly parallel to the human sense of hue--and non-spectral hue, which essentially measures the distance between two simultaneous spectral stimuli. As the non-spectral hue gets larger, the space that you have to wiggle an interval back and forth before one end runs off the edge of the visible spectrum shrinks, so the space ends up looking like a triangle:

    This particular diagram was intended for describing the vision of RGBU tetrachromats, with black representing UV off the blue end of the spectrum; you could put black representing IR at the other end, but ultimately the perceivable spectrum ends up being cyclic so it doesn't really matter. If you want the extra cone to be yellow or cyan-receptive, though.. eh, that gets complicated, and any false-color representation will be bad. But, that highlights a general deficiency of this representation: it does a really bad job of showing which colors are adjacent at the boundaries. The top-edges spectrum is properly cyclic, but otherwise the edges don't match up, so you can't just roll this into a cone.

    Another possible representation is based on the triangle diagram of trichromat color space:

    Each physical primary goes at the corner of a simplex, and each point within the simplex is colored based on the relative distance from each corner. This shows you both hue, with the spectrum running along the exterior edges, and saturation, with minimal saturation (equal amount of all primaries) in the center. We can easily extend this idea to tetrachromacy, where the 4-point simplex is a tetrahedron:

    The two-dimensional hue space exists on the exterior surface and edges of the tetrahedron, with either saturation or luma mapped to the interior space. Note that one triangular face of the tetrahedron is the trichromat color triangle, but the center of that face no longer represents white.If we call the extra primary Q (so as not to bias the interpretation towards UV, IR, or anything else), the the center of the RGB face represents not white, but anti-Q, which we percieve as white, but which is distinct from white to a tetrachromat. This is precisely analogous to how the center of the dichromat spectrum is "white", but what a dichromat (whose spectral range is identical as hours) sees as white could be any of white, green, or magenta to us. Similarly, what we see as white could be actual 4-white, or anti-Q.

    Since the surface of a tetrahedron is still 2D, we can unfold the tetrahedron into another flat triangle:

    Here, in is unfolded around the RGB face, but that is arbitrary--it could equally well be unfolded around any other face, with a tertiary anti-color in the center, and that would make no difference to a tetrachromat, you as spinning a color wheel makes no difference to you. Note that, after unfolding, the Q vertex is represented three times, and every edge color is represented twice--mirrored along the unfolded edges. This becomes slightly more obvious if we discretize the diagram:

    Primary colors at the vertices, secondary colors along the edges, tertiary colors (which don't exist in trichromat vision) on the faces. This arrangement, despite the duplications, makes it very easy to to put specific labels on distinct regions of the space--although the particular manner in which the color space is divided up is somewhat artificial. And the duplications actually help to show what's going on with the unfolded faces--yes, the Q vertex shows up three times, but note that the total area of the discretized region around the Q vertex is exactly the same size as the area around the R, G, and B vertices.

    If we return to the trichromat triangle, note that you can obtain a color wheel simply be warping it into a circle; the spectrum of fully-saturated hues runs along the outside edge either way. Similarly, we can "inflate" the tetrahedron to get a color ball.

    If we want it flattened out again, any old map projection will do, but we have to keep in mind that the choice of poles is arbitrary; here's the cylindrical projection along the Q-anti-Q axis:

    And here's a polar projection centered on anti-Q:

    This ends up looking quite a lot like a standard color wheel, just extended past full saturation to show darkening as well as lightening; note the fully saturated ring at half the radius. However, the interpretation is quite different; remember, that center color isn't actually white. True tetrachromat white exists at the center of the ball, and doesn't show up on this diagram. And the false-color black around the edge isn't just background, it's the Q pole. If you need extra help to get your brain out of the rut of looking at this as a trichromat wheel, we can look at 7 other equally-valid polar projections that show exactly the same tetrachromatic hue information:

The Q pole.
The B pole
The anti-B pole.
The R pole
The anti-R pole
The G pole
The anti-G pole
(I probably should've done some scaling for equal area on these; the opposite poles end up looking like they take up way more of the color gamut than they actually do, and the false-color-black Q pole ends up getting washed out as a result. But I don't really expect anybody to use these alternate projections for labelling regions of hue--they're just to help you understand that the space really is a sphere, not a wheel!)

    And we could produce alternately-oriented cylindrical projections as well, if we wanted to.

    Of course, the full tetrachromat color space still contains two more whole dimensions--saturation and luminosity. But those work exactly the same way as they do for trichromats. Thus, if you want to create separate named color categories for tetrachromatic equivalents of, say, brown (dark orange) or pink (light red), you can still place them on the map by identifying the relevant range of hues and then just adding a note to say, e.g., "this region is called X when saturated, but Y when desaturated".

    Now, go forth and create language for non-human speakers with appropriate lexical structure in color terms!

Friday, August 9, 2024

Some More Thoughts on Toki Pona

What the heck is Toki Pona?

After publishing my last short article, several people expressed interest in a deeper analysis of various aspects of toki pona--among them, Sai forwarding me a request from jan Sonja for one conlanger's opinion about how to categorize toki pona. So, I shall attempt to give that opinion here.

The Gnoli Triangle, devised by Claudio Gnoli in 1997, remains the most common way to classify conlangs into broad categories.


Within each of these three categories are numerous more specific classifications, but broadly speaking we can define each one as follows based on the goals behind a conlang's construction:

Artlang: A language devised for personal pleasure or to fulfill an aesthetic effect.

Engelang: A language devised according to meet specific objective design criteria, often in order to test some hypothesis about how language does or can work.

Auxlang: A language devised to facilitate communication between people who otherwise do not share a common natural language. Distinct from a "lingua franca", a language which actually does function to facilitate communication between large groups of people without a native language in common.

Any given language can have aspects of all three of these potential categorizations. But, to figure out where in the triangle toki pona should fit, we need to know the motivations behind its creation.

To that end, I quote from the preface of Toki Pona: The Language of Good:

Toki Pona was my philosophical attempt to understand the meaning of life in 120 words. 

Through a process of soul-searching, comparative linguistics, and playfulness, I designed a simple communication system to simplify my thoughts.

I first published [Toki Pona] on the web in 2001. A small community of Toki Pona fans emerged.

In relation to the third point, in private communication jan Sonja confirmed that she never actively tried to get other people to use it. The community just grew organically. Even though the phonology was intentionally designed to be "easy for everyone", that tells me that the defining motivation behind toki pona was not that of an auxlang. In practice, it does sometimes serve as a lingua franca, but it wasn't designed with the intention of filling that role. It was designed to help simplify thoughts for the individual. Therefore, we can conclude that toki pona does not belong in the auxlang corner, or somewhere in the middle. A proper classification will be somewhere along the engelang-artlang edge--what I am inclined to call an "architected language" or "archlang" (although that particular term has been slow to catch on in anyone's usage but my own!)

So, what are the design criteria behind toki pona? Referring again to The Language of Good, toki pona was intended to be minimalist, using the "simplest and fewest parts to create the maximum effect". Additionally, "training your mind to think in Toki Pona" is supposed to promote mindfulness and lead to deeper insights about life and existence.

Toki Pona is also described as a "philosophical attempt"; can it then be classed as a "philosophical language"? I referred to it as such in my last post, and I think yes; it is, after all, the go-to example of a philophical language on the Philosophical language Wikipedia page! The term "philosophical language" is sometimes used interchangeably with "taxonomic language", where the vocabulary encodes some classification scheme for the world, as in John Wilkins's Real Character, but more broadly a philosophical language is a type of engineered language designed from a limited set of first principles, typically employing a limited set of elemental morphemes (or "semantic primes"). Toki Pona absolutely fits that mold--which means it can be legitimately classed as an engelang as well.

However, Toki Pona was clearly not constructed entirely mechanistically. It came from a process of soul-searching and playfulness, and encodes something of Sonja's own sense of aesthetics in the phonology. Ergo, it is clearly also an artlang. Exactly where along that edge it belongs--what percentage of engelang vs. artlang it is--is really something that only jan Sonja can know, given these categorial definitions which depend primarily on motivations. But I for one am quite happy to bring it in to the "archlang" family.

To cement the artlang classification, I'll return to the "minor complexities" I mentioned in the last article. To start with, what's up with "li"? It is supposed to be the predicate marker, but you don't use it if the subject is "mi" or "sina"... yet you do for "ona", so it's clearly not a simple matter of "pronoun subjects don't need 'li'". But, if we imagine a fictional history history for toki pona, it makes perfect sense. There is, after all, a fairly common historical process by which third person pronouns or demonstrative transform into copulas in languages that previously had a null copula. (This process is currently underway in modern Russian, for example.) So, suppose we had "mi, sina, li" as the "original" pronouns; "li", in addition to its normal referential function, ends up getting used in cleft constructions with 3rd person subjects to clarify the boundary between subject and predicate in null-copula constructions. Eventually, it gets re-analyzed as the copula, except when "mi" and "sina" are used because they never required cleft-clarification anyway (and couldn't have used it if they did, because of person disagreement), and a new third-person pronoun is innovated to replace it--which, being new, doesn't inherit the historical patterning of  "mi" and "sina", so you get a naturalistic-looking irregularity.

Or, take the case of "en". It seems fairly transparently derived from "and", and that is one of its glosses in The Toki Pona Dictionary, based on actual community usage, but according the The Language of Good it does not mean "and"--it just means "this is an additional subject of the same clause". Toki Pona doesn't really need a word for "and"; clauses can just be juxtaposed. and the particle "e" makes it clear where an object phrase starts so you can just chain as many of those together as you want with no explicit conjunction. So, we just need a way to indicate the boundary between multiple different subject phrases. You could interpret that as just as kind of marked nominative case--except you don't use it when there's only one subject. It's this weird extra thing that solves a niche edge case in the basic grammar. A strictly engineering-focused language might've just gone with an unambiguous marked nominative, or an explicit conjunction, but Toki Pona doesn't. It's more complicated, in terms of how the grammatical rules are specified, than it strictly needs to be.

And then, we've got the issue of numerals. All numerals follow the nouns which they apply to, whatever their function--but that means an extra particle must be introduced into the lexicon to distinguish cardinal numerals (how many?) from ordinal numerals (which one?). That is an unnecessary addition which makes the lexicon not-strictly-minimalist. The existing semantics of noun juxtaposition within a phrase make it possible to borrow the kind of construction we see in, e.g., Hawai'ian, where using a numeral as the head of a noun phrase forces a cardinal interpretation (something like "a unit of banana", "a pair of shoes", "a trio of people", etc.), while postposing a numeral in attributive position forces an ordinal interpretation ("banana first", "shoe second", "person third"). But Toki Pona doesn't do that!

Finally, as discussed previously, the lexicon is not optimized. These are all expressions of unforced character--i.e., artistic choice.

But what if Toki Pona were an auxlang? How would it be different?

Well, first off, we'd fix those previous complexities. At minimum, introduce an unambiguous marked nominative (which also helps with identifying clause boundaries), unify the behavior of pronouns and the copula / predicate marker, and get rid of the unnecessary ordinal particle. Then, we look at re-structuring the vocabulary. I collected a corpus of Toki Pona texts, removed all punctuation, filtered for only the 137 "essential words", and ended up with set of 585,888 tokens from which to derive frequency data. Based on this data set, 7 of the "essential words" appear zero times... which really makes them seem not that essential, and argues for cutting down the word list to an even 130. (Congratulations to jan Sonja for getting so close to the mark with the earlier choice of 120!) There are 72 two-syllable words that occur "too infrequently"--in the sense that there are three-syllable words that occur more frequently, and so should've been assigned shorter forms first. And similarly, there are 23 one-syllable words which are too infrequent compared to the two-syllable words. Honestly, predicting what these frequency distributions ought to be is really freakin' hard, so jan Sonja can't be blamed for these word-length incongruities even if she had been trying to construct a phonologically-optimized auxlang, but now we have the data from Toki Pona itself, so we could do better! Design a phonology, enumerate all of the possible word forms in order of increasing complexity, and then assign them to meanings according to the empirical frequency list!

For that, of course, we need to define a new phonology. It needs to produce at least 129 (remember, we're dropping the ordinal particle) words of three syllables or less, but no more than that. Based on picking the most cross-linguistically common segments according to Phoible data, we can go with the following inventory:

i,a,u
n (/m), p, k, w (/v)

With a strict syllable structure of CV, that produces 12 monosyllables and 144 disyllables.
Cutting out w/v gives us 9 monosyllables and 81 disyllables--not enough to squish everything into two syllables or less. But there are 729 trisyllables--way more than we need! So, we could cut it down even more... But, that gets at a hard-to-quantify issue: usability. Aesthetics, it turns out, can be an engineering concern when engineering for maximal cross-cultural auxlang usability! Too few phonemes, and the language gets samey and hard to parse. Toki Pona as it is seems to hit a sweet spot in having some less-common phonemes, but sounding pretty good--good enough to naturally attract a speaker community. If I were doing this for real, I'd probably not just look at individual segments, but instead comb through Phoible for the features that are most cross-linguistically common, and try to design a  maximnally-large universally-pronounceable inventory of allophone sets based on that to give variety to the minimal set of words. But if we accept the numbers of phonemes, and accept their actual values as provisional, what happens if we enumerate words while also aliminating minimal pairs?

Well, then we get a maximum of 3 monosyllables (re-using any vowel would produce a minimal pair) well under a hundred disyllables, but plenty of trisyllables. It would be nice to not do worse than Toki Pona in the average word length, though, which means we probably need 118 monosyllables + disyllables--we can get that pretty easily by relaxing the word-difference constraints such that we can have minimal pairs between, e.g., /n/ and /k/, which are extremely unlikely to be confused. Or, we just go up to 5 consonants instead of four, probably adding in something like j (/l).

I'm still not super inclined to add the mountain of failed auxlangs or tokiponidos in the world... but, that's the process I would use to properly engineer an optimal auxlang-alternate to Toki Pona.

Some Thoughts... Index

Friday, August 2, 2024

Some Thoughts on Toki Pona

Toki Pona is a minimalist philosophical artistic language, not an auxlang. Nevertheless, it has attracted a fairly large and international community of users--enough so that it was possible for Sonja Lang to publish a descriptive book on natural usage of Toki Pona (The Toki Pona Dictionary)! Thus, while this should in no way be seen as a criticism in the negative sense of Sonja's creation, it seems fair to critique Toki Pona on how optimized its design is as an auxlang.

Toki Pona has 92 valid syllables, composed of 9 consonants and 5 vowels. Accounting for disallowed clusters at syllable boundaries, this results in 7519 possible 2-syllable words--far, far more than any accounting of the size of Toki Pona's non-proper-noun vocabulary, which does not surpass 200 words. In developing the toki suli whistle register, I discovered that some phonemes can be merged without any loss of lexical fidelity--so even if we wanted to additional restrictions like spreading out words in phonological space to eliminate minimal pairs, or ensuring that the language was uniquely segmentable, the phonetic inventory and phonotactic rules are clearly larger and more permissive than they strictly need to be. And a smaller phonemic inventory and stricter phonotactics would theoretically make it trivially pronounceable by a larger number of people. For example, we could reduce it to a 3-vowel system (/a i u/), eliminate /t/ (merging with either /k/ or /s/) and merge /l/ and /j/. More careful consideration in building a system from scratch rather than trying to pair away at Toki Pona's existing system could minimize things even further, but if we start there, and require that all syllables be strictly CV, then 7x3=21 valid syllables and 441 valid 2-syllable words. We could rebuild a lexicon on top of that with no minimal pairs and unique segmentation just fine, or choose to make the phonemic inventory even smaller--all while still reducing the average Toki Pona word length, since the current vocabulary does include a few trisyllabic words!

The grammar, on the other hand, I really have no complaints about. It is not quite as simple as it could be (e.g., li could be made always obligatory, rather than onligatory-unless-the-subject-is-mi-or-sina), but it's really quite good--and the minor complexities actually help add to its charm as an artlang.

I am not much inclined to actually construct a phonologically-optimized relex of Toki Pona, as what would be the use? But it is fun to imagine an alternate history in which Toki Pona was designed from the outset with usage as an auxlang in mind. Would it actually have become as successful as it is, had Sonja taken that route? Perhaps we need to consider another contributor to Toki Pona's popularity--Sonja's specific phonological aesthetic. As mathematically sub-optimal as it is, Toki Pona sounds nice. Would it still have become popular if its sounds were instead fully min-maxed for optimal intercultural pronoucneability, length, and distinctiveness? Maybe I'll build a Toki Pona relex after all, just to see if it can be made to sound pretty....

Some Thoughts... Index