A conlanging DSL?

Conworlds and conlangs
Post Reply
User avatar
alice
Posts: 1399
Joined: Mon Jul 09, 2018 11:15 am
Location: 'twixt Survival and Guilt

A conlanging DSL?

Post by alice »

This came to me while lying awake in the small hours, so it may not be the sanest thing I've ever considered. But anyway; I've often thought about creating my own programming language (i.e. gathering together all the bits I like about other programming languages in one place with a few ideas of my own), and after getting a basic example with Python and LLVM working, my thoughts on this topic eventually strayed towards the concept of a conlang-oriented programming language, incorporating SCAs, inflection generators, and so on. A kind of DSL, if you will, or something like MATLAB but specialised for conlanging. Is this remotely viable?
"But he had reckoned without my narrative powers! With one bound I narrated myself up the wall and into the bathroom, where I transformed him into a freestanding sink unit.

We washed our hands of him, and lived happily ever after."
Lērisama
Posts: 749
Joined: Fri Oct 18, 2024 9:51 am
Location: Kernow Voy

Re: A conlanging DSL?

Post by Lērisama »

I don't have the computer knowledge to make, or even help make this – trying to learn Haskell¹ is already bending my brain quite enough. That said, both the things you mentioned have been implemented in Haskell as part of Bradrn's Brassica, and you can't import the underlying functions for Brassica into a Haskell program and play around with them², which is probably the closest you can get to what you want with already existing software. The amount that Haskell likes matching patterns and transforming data as a way of doing thing would probably work well too, although I don't really understand what's going on yet.

¹ Because it looks interesting / hopefully to be able to contribute to Brassica with it / I might as well learn a language that a weird amount of software I want to use is written in
² Which reminds me, I really should do that
LZ – Lēri Ziwi
PS – Proto Sāzlakuic (ancestor of LZ)
PRk – Proto Rākēwuic
XI – Xú Iạlan
VN – verbal noun
SUP – supine
DIRECT – verbal directional
My language stuff
User avatar
Neonnaut
Posts: 132
Joined: Wed Jun 02, 2021 4:23 am

Re: A conlanging DSL?

Post by Neonnaut »

I am working on something very related to this. A Word generator in the same realm as Lexifer and Awkwords, and a sound change applier. The word generator has many advanced features such as handling suprasegmentals like stress or pitch accent. Hopefully I can make a post of it here in a week. Message me if you would like to help test these tools.

Another tool I have recently decided on is a human-readable dictionary language, a response to William Annis's "The Ultimate Dictionary" blog post.

Here is how you would lay-out a typical dictionary's data structure:

Code: Select all

alphabet: a, b, c, c', d, ...
 
lexeme {
  type: ENTRY,
  fields {
    word {
      type: KEY,
      format: "[b]<key>[/b]",
    },
    ipa {
      type: SINGLE,
      format: "\[<ipa>\]"
    },
    pos {
      type: WORD-SENSE-BRANCHER
      format: "[superscript]{sense-incrementor-num}[/superscript] [i]<pos>[/i]."
    },
    meaning {
      type: MULTIPLE
      delimiter: "; "
    },
    note {
      type: MULTIPLE OPTIONAL,
      format: "Note: [i]<note>[/i]",
      delimeter: ";"
    }
  }
}

order-by: <word> descending
The dictionary itself would look like:

Code: Select all

right <ipa> rait <pos>
  n <meaning> a direction <note> An optional note here / an additional note here separated by a forward slash
  n <meaning> To be healthy / To be appropriate <note> an optional note belonging to this branch
  
foo <ipa> bar <pos> n <meaning> A placeholder word
For non-optional fields, you could swap the full name of the field in the tag for just a ">", meaning to move on to the next field in the stack. e.g: "foo > bar > n > A placeholder word"

You would then be able to generate a HTML file of the dictionary, or LaTeX code.
User avatar
Neonnaut
Posts: 132
Joined: Wed Jun 02, 2021 4:23 am

Re: A conlanging DSL?

Post by Neonnaut »

I can't decide on whether to name this tool "ADDM: Annotated Dictionary Database Manager" or "Dictionmancy" ...
User avatar
Man in Space
Posts: 2435
Joined: Sat Jul 21, 2018 1:05 am

Re: A conlanging DSL?

Post by Man in Space »

Neonnaut wrote: Sat Dec 20, 2025 12:43 pm I can't decide on whether to name this tool "ADDM: Annotated Dictionary Database Manager" or "Dictionmancy" ...
The former.
User avatar
Neonnaut
Posts: 132
Joined: Wed Jun 02, 2021 4:23 am

Re: A conlanging DSL?

Post by Neonnaut »

Man in Space wrote: Sat Dec 20, 2025 4:46 pm
Neonnaut wrote: Sat Dec 20, 2025 12:43 pm I can't decide on whether to name this tool "ADDM: Annotated Dictionary Database Manager" or "Dictionmancy" ...
The former.
I am thinking the same, except... I have been thinking a lot about this. What I need to do is to create a library / suite that these tools / applications are a part of. Each web-application and it's corresponding CLI has it's main function inside the suite -- these main functions would use some of the shared pool of 'directives' / modules to accomplish their tasks. For example, my word generator has 'stage' directives that apply sound changes to the created words. Now that I'm working on an SCA, I already have the sound changing directives from the word generator, I just need an interface to feed it input words instead of creating words.

Similarly, a dictionary tool is missing out on some powerful functionality if it is separate to this suite. For example, you could pass the dictionary through some sound changes and return them, create a romanisation from the IPA field, or do sound changes on a word only if they have a certain part-of-speech. Perhaps one could create declension tables for each word in the dictionary and add each table as a field of that word.

Other applications come to mind that could share modules: A phonology table generator that is created from sets of phonological features that the SCA uses. A tool that counts the frequency of phonemes in a corpus (dictionary).

The problem is, what to name this suite? 'The Conlanger's Program Suite' is perfectly descriptive, but would have the unfortunate abbreviation of CPS. 'The Conlangers Application Suite' is a bit too long. Still my mind lingers to more outlandish names like 'LinguaLibre' or Neonnautica'. Any ideas anyone?
Post Reply