tosmabru: Difference between revisions

From Lojban
Jump to navigation Jump to search
No edit summary
 
Line 16: Line 16:
For example, consider '''tosymabru'''. That the fourth letter is a "Y" reveals that it passes the tosmabru test.
For example, consider '''tosymabru'''. That the fourth letter is a "Y" reveals that it passes the tosmabru test.


 
<pre>
<code>if is_initial_consonant_pair(word[:2]) == False or len(word) > 5 and (word[3] != "y" and len(word) % 3 == 2 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2]) for cluster in range(2, len(word), 3)]) or word[4] != "y" and len(word) % 3 == 0 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2]) for cluster in range(3, len(word), 3)])): return []
if is_initial_consonant_pair(word[:2]) == False \
</code>
  or len(word) > 5 and (word[3] != "y" and len(word) % 3 == 2 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2]) \
  or cluster in range(2, len(word), 3)]) \
  or word[4] != "y" and len(word) % 3 == 0 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2]) for cluster in range(3, len(word), 3)])):
  return []
</pre>


Full details are available in [http://www.lojban.org/files/reference-grammar/chap4.html#s11 CLL].
Full details are available in [http://www.lojban.org/files/reference-grammar/chap4.html#s11 CLL].

Latest revision as of 19:59, 5 October 2020

A class of illegal lujvo. *tosmabru looks like tos+mabru but in fact is to sma+bru. Lujvo of this form can be built as tosymabru.

tosmabru test

A test for correctness that all lujvo must pass. The word *tosmabru fails the test: it falls apart into to smabru. To fix this, a y hyphen is inserted, leading to the morphologically correct lujvo tosymabru.

Conditions for not being a tosmabru word:

  1. the fourth letter not being a y
  2. the word's length in letters being more than five,
  3. the word's length in letters being congruent to two modulo three (two plus a multiple of three)
  4. the entire portion of the word after the second letter consisting of consonant-consonant-vowel affixes (which consist of an initial consonant pair and a following vowel that is not a y).

However, it should check for the second condition and either the set of the remaining conditions or similar conditions, those being:

  1. the fifth letter not being a y
  2. the word's length in letters being divisible by three
  3. the entire portion of the word after the third letter consisting of consonant-consonant-vowel affixes.

For example, consider tosymabru. That the fourth letter is a "Y" reveals that it passes the tosmabru test.

if is_initial_consonant_pair(word[:2]) == False \
   or len(word) > 5 and (word[3] != "y" and len(word) % 3 == 2 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2])  \
   or cluster in range(2, len(word), 3)]) \
   or word[4] != "y" and len(word) % 3 == 0 and all([is_initial_consonant_pair(word[cluster:cluster + 2]) and is_regular_vowel(word[cluster + 2]) for cluster in range(3, len(word), 3)])):
  return []

Full details are available in CLL.