lint for toki pona

Language learning: How to speak Toki Pona, translation problems, advice, memory aids, tools and methods to learn Toki Pona and other languages faster
Lingva lernado: Kiel paroli Tokiponon, tradukproblemoj, konsiloj, memoraj helpiloj, iloj kaj metodoj por pli rapide lerni Tokiponon kaj aliajn lingvojn
Post Reply
janMato
Posts: 1545
Joined: Wed Dec 02, 2009 12:21 pm
Location: Takoma Park, MD
Contact:

lint for toki pona

Post by janMato »

I got an idea and not sure what to do with it yet. Computer programming languages have lint or compiler warnings when some syntax is suspicious, but not flat out a violation of the syntax of the language. These warnings are usually produced after a piece of code is written as a separate document & often one will just fix all the warnings, needed or not, so they don't clutter up the compiler output. But to do that, sometimes you want to ignore a compiler warning so you have to annotate the source code to ignore certain statements, (sort of like putting quotes around "ain't" to let the reader know you are using ain't on purpose)

Anyhow, an example of some lint rules would be:

No sentences over 30 words. (Obviously sentences of 31 words can be grammatical, but lots of people like to complain about being prolix)
No pi chains with more than 3 pi's
Only use ona in a 2nd sentence of a paragraph or after the li. (Obviously "ona li pona" is valid, but in written text, who knows what ona refers to)

Another lint rule would be on borderline grammar issues that either a, people aren't following yet or b, people haven't agreed on yet, such as, should prepositions that modify a head noun (and not the whole sentence), should the be offset by a pi. But to detect that, we'd need an annotation for intentionally leaving out a pi, or intentionally modifying a head noun.

So a parser could run and then let the user know about a list of violations against different style guides.
janKipo
Posts: 3064
Joined: Fri Oct 09, 2009 2:20 pm

Re: lint for toki pona

Post by janKipo »

Well, we could argue about 'ona li pona' at the very beginning, but in this context -- of things that are just undesirable for most readers -- let it stand.
About PP's, strictly, of course, we only need 'pi' at the end of DO's and even there they are not necessary if we block off terminal PPs with commas or some such. Assuming, of course, that we know the damned thing is a PP and not just another verb modifier (say) -- for which there is no real cure: sitelen lon mi "my real picture" or "picture on me", sitelen pi lon mi "picture on me" or "picture of my reality" And so on. I stand by 'pi' for uniformity of the rules and because I can't think of a good reason to do otherwise (except L1 habits, of course, which don't count as good).
Post Reply