Reboot: Le P'tit Aurèle (lexicon of the French-Acadian language)

Now working on “Sens du Mot / Meaning(s) of The Word”.

A word in a particular context (as a noun for example, when the word could also be an adjective) might have more than one meaning.

So I have the very early setup working to enter one or two meanings along with a field to enter Acadian French examples (with Standard French and English translations.)

A “Sens du Mot / Meaning(s) of The Word” section when in edit mode:

Nothing exciting to report as I’ve mostly done some light tweaking.

For anybody interested in this kind of stuff, I did get distracted a little bit by the “te” expletion, so my tweaks were mostly focused on look/feel related to documenting that little language nugget that I’ve used for as long as I can remember:

image

Here’s the beauty of setting up the definition of a word as a "word ensemble definition.

Using " t’ " (t apostrophe) as an example.

" t’ " is the elided form of both words “te” (an “expletion”) and “tu” (a pronoun).

When defining “te”, we include " t’ " in the word ensemble definition. When defining “tu”, we include " t’ " in the word definition ensemble.

When viewing each of “te” and “tu”, we see them defined in their own respects, and " t’ " is there in information about each of “te” and “tu”.

When viewing " t’ " independently, we see the definitions of both word ensembles “right there” as the information about " t’ ". Yup, I totally geek out on this kind of stuff (componentization and Transclusion)

Loads of work left to be done, but this is floating my boat so far.

Six images:

image

image

When a word has multiple word types (each type being a “word ensemble” which involves any number of words that together share the definition for that type), I wanted something obvious yet subtle to distinguish the types and see the related words in each type.

So I added a comma-separated list (in parentheses formatted with italics) of the words in the word type description:

Filter by type of words now working:

1 Like

So many interesting things to tackle, all of them wonderfully interesting shiny objects …

Although I should be doing house chores, the desire to tackle the basic infrastructure for entering and displaying the Pronominal attributes of a verb? I just couldn’t ignore it.

Using the verb “abîmer”

1 Like

Even if I generally have nothing to add, I want you to know that I for one am very much enjoying this series.

1 Like

Hey, thanks!

I, for about a New York minute, worried about clogging up the “most recent” list of posts by constantly updating this thread, then it dawned on me: bah, easy for folk to mute this thread.

Maybe, if anything, folk can see that TiddlyWiki can easily handle complex structured data. without being prescriptive about how to go about it.

TiddlyWiki is an awesome Rapid Application Development tool.

1 Like

On the menu before hitting the pillow: setup ability to enter alternative spellings for a word.

Many (if not most, or maybe all) of the words in my French-Acadian dictionary will have the simplest (often phonetic) spellings. I do, though, want to make any longer/alternative spellings (a simple comma-separated list) clearly visible.

Using the verb “abrier” (aka "abriller) as the case study, two screenshots: VIEW mode and EDIT mode …

image

I altered the implementation for “Other Spelling” (same end-user look, very different data-entry, show’n tell of that some other time), piggy-backed on that setup to also have “Synonyms” (for synonymous words that are more so French-Acadian and not so much standard French), and I’ve started adding words to the dictionary.

Example of spelling variant:

Example of synonym:

As of my last post, everything done to that point was much like piling on clay to get a general idea of what all I need.

I’ve been refining this hunk of clay, focusing first on these fundamental things:

  • editing and viewing the type(s) for the word (noun, verb, etc.), keeping in mind that a word could have more than one type (for example: a word could be both a noun and an adjective)
  • editing and viewing the gender and number of a word (Todo: hide these when gender and number do not apply)

Words that are masculine and have no feminine form, the TW has the basic underpinnings to auto-generate the pluralized version of the word. Same for words that are feminine and have to masculine form.

Words that are masculine and have a feminine form, the TW has the basic underpinnings to auto-generate the feminine-singular version of the word, and the smarts to pluralize both the masculine and auto-generated feminine-singular version of the word.

Some masculine words that have a feminine form, the feminine form is not easily auto-generated and/or needs to independently exist as a tiddler for some very specific information for the feminine word (like phonetic attributes, or other uniquely important info). In this case, the masculine and feminine words are linked via a word ensemble (or word “casting” … I’m on the fence.) In this situation, the masculine and feminine words are known, and those existing words are each pluralized.

Here are some examples:

A masculine word that has no feminine form:

A word that is both masculine and feminine:

A feminine word that has no masculine form:

Here’s a masculine word that has been marked as having a feminine form, and that feminine form is auto-generated. Eventually, I will be setting up the feminine word as a dedicated tiddler because I want to add some details specific to that feminine word:

And finally a masculine word that has a feminine form, and the feminine form of the word exists as a tiddler. The masculine and feminine versions of the word are linked via an ensemble/casting.

Here’s what that last one looks like when in “EDIT” mode:
(ignore the stuff in the top-left block under the word “darnier” and above the “Visualiser” button … that’s stuff I need to refactor.)

In case you like to dissect code, here’s how the “Word Types” the “Gender and Number” sections are put together:

<table>
<tr><td class="tdh right" style="white-space:nowrap;">Type(s) de mot / Word Type(s):</td><td class="left" style="width:100%;">{{{ [<wordTiddler>] || tWT }}}</td></tr>
<tr><td class="tdh right">Genre et nombre / Gender and Number:</td><td class="left" style="width:auto;">{{{ [<wordTiddler>] || tMGN }}}</td></tr>
</table>

So both sections are put together by transcluding the word “darnier” with Transclusion templates. tWT is a tiddler that has all of the goods for the “Word Type” info. tMGN is a tiddler that has all of the goods for the “Gender and Number” info.

The tWT tiddler:

<$list filter="[{!!title}tags[]tag[WT]sort[]]">
<span style="white-space:nowrap;">{{{ [{!!df}] [{!!de}] +[join[ / ]] +[addprefix[✔ ]] || txt }}}&nbsp;&nbsp;&nbsp;</span>
</$list>
<$list filter="[{!!title}tags[]tag[WT]else[NONE]match[NONE]]">
//Aucun choisi / None selected//
</$list>

<$list variable="c" filter="[<formMode>match[EDIT]]">
<details open><summary>EDIT {{!!title}}</summary>
<<colList "wt" "[tag[WT]]" 25 "<$checkbox tag=<<wt>>> {{{ [<wt>get[df]] || txt }}} / {{{ [<wt>get[de]] || txt }}}</$checkbox>">>
</details>
</$list>

The tMGN tiddler:

\define ms2fs() {{!!title || tMS2FS }}
\define ms2fp() <$wikify name="mot" text=<<ms2fs>>>{{{ [<mot>split[]butlast[]join[]] || tS2P }}}</$wikify>
\define gFilter(g) [{!!title}get[g]match[$g$]]
\define gLine(t,s,p)
    <tr><td class="tdh right">$t$:</td> <td>$s$</td> <td>$p$</td></tr>
\end

<$let we={{{ [{!!title}tagging[]tag[gn]nth[1]] }}}>

<!-- 🟠🟠🟠 VIEW mode --> 
<table>
    <tr><td class="tdtl"></td><td class="tdh">__Singulier / Singular__</td><td class="tdh">__Pluriel / Plural__</td></tr>
    <$list variable="g" filter={{{ [<gFilter mf>] }}}>
      <<gLine "Masculin et féminin / Masculine and Feminine" "{{!!title}}" "{{!!title || tS2P }}" >>
    </$list>
    <$list variable="g" filter={{{ [<we>is[blank]then<gFilter f>] }}}>
      <<gLine "Féminin / Feminine" "{{!!title}}" "{{!!title || tS2P }}" >>
    </$list>
    <$list variable="g" filter={{{ [<we>is[blank]then<gFilter m>] }}}>
      <<gLine "Masculin / Masculine" "{{!!title}}" "{{!!title || tS2P }}" >>
      <$list variable="c" filter="[{!!title}get[tf]match[y]]">
      <<gLine "Féminin / Feminine" "<<ms2fs>>" "<<ms2fp>>" >>
      </$list>
    </$list>
    <$list variable="g" filter={{{ [<we>!is[blank]] }}}>
      <<gLine "Masculin / Masculine" "{{{ [<we>tags[]tag[mot]g[m]] || txt }}}" "{{{ [<we>tags[]tag[mot]g[m]] || tS2P }}}" >>
      <<gLine "Féminin / Feminine" "{{{ [<we>tags[]tag[mot]g[f]] || txt }}}" "{{{ [<we>tags[]tag[mot]g[f]] || tS2P }}}" >>
    </$list>

</table>

<!-- 🟠🟠🟠 EDIT mode --> 
<$list variable="check" filter="[<formMode>match[EDIT]]">
<details open><summary> EDIT {{!!title}} </summary>
<!-- 🟠 --> ''genre / gender'':
<$select tiddler=<<currentTiddler>> field="g">
<option value="m">Masculin / Masculine</option>
<option value="f">Féminin / Feminine</option>
<option value="mf">Les deux / Both</option>
<option value="">Aucun / None</option>
</$select><br>
<$list variable="c" filter="[<wordTiddler>get[g]match[m]]"><$checkbox tiddler=<<wordTiddler>> field="tf" checked="y" unchecked=""> Se transforme à une variante féminine /  Transforms itself to a feminine variant</$checkbox><br></$list>
<!-- 🟠 --> ''nombre / number'':
<$select tiddler=<<currentTiddler>> field="sp">
<option value="s">Singulier / Singular</option>
<option value="p">Pluriel / Plural</option>
<option value="sp">Les deux / Both</option>
<option value="">Aucun / None</option>
</$select>
<!-- 🟠 word ensemble --> 
<details open><summary>Casting</summary>
<<weCreate gn>>
<<weAddWord gn>>
</details>
</details>
</$list>

<!-- ⚫ -->

</$let>

The latest thing from my to-do list: setup the phonetic aspects for a word, the “VIEW” mode to start with, and “EDIT” mode is next.

This involved largely cut and paste of previously working code into a new template tiddler, so that I can present the phonetic info as a Transclusion of the current word, with code that looks like this: {{{ [<the word>] || tPHO }}}

The nice thing with this setup: if a word is part of a “Gender and Number” ensemble, then one little filter for a list widget, and I can display the phonetic attributes for all of the words in the ensemble.

And it will be the same thing for EDIT mode, so that the window for the current window can be used to update info for any word that is in the ensemble. Nice because it reduces the number of back and forth between tiddlers in a particular ensemble.

The code that renders that phonetic aspects section:

<tr><td class="tdh right">Aspects phonétiques / Phonetic Aspects:</td><td class="left" style="width:auto;">
         {{{ [<wordTiddler>] || tPHO }}}</td></tr>

And the code for the tPHO template tiddler for phonetic attributes:

<table>
<$list filter="[{!!title}] [tag{!!title}tag[we]tag[gn]tags[]tag[mot]sort[]]">
<tr><td colspan="2">''{{!!mf}}''  ▶ <$text text={{{ [{!!title}tags[]tag[ap]sort[]join[ ➕ ]] }}}/> ▶  ''{{!!title}}''</td></tr>
<tr><td>[img[f.p]]</td><td>[img[e.p]]</td></tr>
<tr>
<td> __"<<currentTiddler>>"__ est la prononciation franco-acadienne du mot français __"{{!!mf}}"__ </td>
<td> __"<<currentTiddler>>"__ is the French Acadian pronunciation of the French word __"{{!!mf}}"__ </td>
</tr>
</$list>
</table>

An interesting tidbit about “architecture”. The simulation of relationship between rows of different database tables is entirely tags-based. (so links between tiddlers are always done via tags)

To select all of the “ensembles”: [tag[we]]

To select all of the “gender and number” “ensembles” : [tag[we]tag[gn]

Etc. etc.

So there are never any tiddler titles in any of the other tiddler fields. Some examples:

The “gender and number” ensemble tiddler for “léjert” and “léjarte”:

image

The “léjert” and “léjarte” tiddlers:
image

Okay, editing of phonetic aspects of the current word (or all words in a “gender and number” ensemble) setup:

Code for the related template tiddler (visit the TW instance for more detailed inspection of the code):

\define editPho()
<details open><summary> EDIT {{!!title}} </summary>
<$edit-text field="mf"/>
<<colList "pt" "[tag[ap]sort[]]" 10 "<$checkbox tag=<<pt>>> <<pt>></$checkbox>">>
</details>
\end

<table>
<$list filter="[{!!title}] [tag{!!title}tag[we]tag[gn]tags[]tag[mot]] :sort:string:reverse[get[g]]">
<tr><td colspan="2" style="border-top:3px solid black;">''{{!!mf}}''  ▶ <$text text={{{ [{!!title}tags[]tag[ap]sort[]join[ ➕ ]] }}}/> ▶  ''{{!!title}}''</td></tr>
<$list variable="check" filter="[<formMode>match[EDIT]]">
<tr><td colspan="2" class="left"><<editPho>></td></tr>
</$list>
<tr><td>[img[f.p]]</td><td>[img[e.p]]</td></tr>
<tr>
<td> __"{{!!title}}"__ est une prononciation franco-acadienne du mot français __"{{!!mf}}"__ </td>
<td> __"{{!!title}}"__ is a French-Acadian pronunciation of the French word __"{{!!mf}}"__ </td>
</tr>
</$list>
</table>
1 Like

Now have “Variant ensemble management” setup.

Variants of a word are spelling and/or pronunciation alternatives.

Here’s what the section looks like in VIEW mode for the word “abriller”:

Here’s what the same looks like in EDIT mode:

Because the dictionary will eventually have a ton of words, the filter will help reduce the size of the list. The nice thing about the filter: selected words (words part of the ensemble) will never get filtered out:

When the details of a word are displayed in VIEW mode, sections with no info will not be displayed. However, in EDIT mode, the sections do need to be displayed.

The toggling code generally looks like this (using the “g” field for gender of the word to decide whether or not to display the gender and number info:

<$list variable="check" filter="[{!!title}get[g]!is[blank]then[yup]] [<formMode>match[EDIT]then[yup]]" >
<tr><td class="tdh right">Genre et nombre / Gender and Number:</td><td class="left" style="width:auto;">{{{ [<wordTiddler>] || tMGN }}}</td></tr>
</$list>

So if g has a value, then show the section. Otherwise, do not show the section unless we happen to be in EDIT mode.

The “à” word for which I have not entered any information, in VIEW mode:

In EDIT mode:

1 Like

Ah.

Most of the time, it makes sense to have a bunch of info (like gender and number, and phonetic attributes, etc.) linked directly to a word, and that info will apply to all ensembles for that word, like this for “darnier” (the same info applies to “darnier” in the adjective ensemble and “darnier” in the noun ensemble):

However, there are occasions in which it does not make sense to have that info directly linked to the word. It makes more sense for that info to apply to individual ensembles.

TODO: setup the ability to show and edit those things in the individual ensembles. I’ll be using “té” as my target to get this working:

After chewing on it for a bit, I figured much easier, architecturally, to have all word details managed/stored in word ensembles.

So I’m readjusting accordingly and, since I’m refactoring anyway, I’m also condensing and improving code, and making light cosmetic improvements.

1 Like

I’ve updated my “design” document to reflect the current state of refactoring:

When a word ensemble involves more than one word, then show a banner with the list of words in the ensemble. Otherwise, do not show a banner.

When any word in the ensemble does not have any phonetic aspects info, then don’t show that word’s table of phonetic aspects info.

Some screenshots:

“léjert” in EDIT mode (being in EDIT mode all content no matter what):

My focus tonight, distracted by the hockey game: gender and number.

Gender and number used to be fields in word tiddlers. Now, gender-number combinations are tags applied to “Words Ensemble Word” tiddlers.

For any words ensemble that only has one word and that word is feminine, too easy.

For any words ensemble that has both a feminine word and a masculine word, too easy.

For any words ensemble that only has a masculine word, that word may have a feminine counterpart that is so straight-forward (easy to derive the feminine word from the masculine one) and so phonetically unremarkable that it is not worth creating a dedicated tiddler for that feminine word. In that scenario, click a checkbox to set the “auto-f” (for “automatically generate the feminine word”) = “y”, and the word gets automatically generated.

The pluralized version of male and female words are auto-generated.

TODO: setup all of this so that pluralized words added to a words ensemble get used instead of auto-generated pluralized words.

TODO: setup “override” edit text fields for when anything auto-generated does not work (because of an exception to the normal rules). for the female counterpart of a male word, and for the pluralized male and female words. The values in these fields are only used if there isn’t such a word added to the words ensemble.

Some screenshots:

A masculine words (âbre). in VIEW and then in EDIT mode:

A word that is spelled the same way for both the masculine and feminine, in VIEW and EDIT mode:

image

A words ensemble with a masculine words and auto-generated feminine counterpart, VIEW and EDIT mode:

A words ensemble with both genders for a word, VIEW and EDIT mode: