kantord / LibreLingo

🐢 🌎 📚 a community-owned language-learning platform
https://librelingo.app
GNU Affero General Public License v3.0
1.96k stars 214 forks source link

toki pona #1445

Open zmbc opened 3 years ago

zmbc commented 3 years ago

Hi!

I am part of a community of toki pona speakers who are looking for a new way to teach toki pona.

toki pona is a minimalist conlang (constructed language) with a small but vibrant community.

If we were to create a toki pona course, would you consider accepting it into LibreLingo?

If not, would it be alright for us to fork the project and create a separate toki pona platform (removing the name LibreLingo)?

Thanks!

kantord commented 3 years ago

of course, I would accept it into LibreLingo!

zmbc commented 3 years ago

@kantord Great! I will update you on progress

kantord commented 3 years ago

Amazing! Let me know if you need help. I'm also happy testing :smile_cat:

zmbc commented 3 years ago

@kantord I have a question about the mini-dictionary. As far as I can tell, it is used when the user hovers over an underlined word, which can occur in short-answer word questions or when translating a phrase. It's required for every word that appears in translations.

There are some situations where this feels awkward. Two come to mind:

What do you think about making mini-dictionary entries optional?

(Note: I am happy to do the implementation of any new features in LibreLingo required for toki pona. I just want to ask you this from a design perspective.)

kantord commented 3 years ago

If a Translation is more than one word, an entry is required for each component word. If a word means "post office," you need entries for "post" and "office" in the mini-dictionary, which probably don't have anything to do with the lesson.

This could be solved by adding an optional way to separate words. For example instead of of writing:

Marie is going to the post office

you'd write

Marie is going to the {post office}

and then "post office" would be handled as a single word, but the {} characters would be dropped in the final result

Can you please create a separate issue for it? :pray: If you create the issue, I'll try to put some hints there to make the implementation easier for you, or whoever will fix the issue in the end

kantord commented 3 years ago

If a word has no clear equivalent. For example, if the source language has articles (like English) and the target language has none (like Japanese, Korean, or toki pona), there is not going to be a target language definition/equivalent for them.

I guess in this case you can just put a - character. I think this should be relatively rare in most cases, as I think these words will be fairly common. (For example "the", "an" etc. are some of the most common words). The mini dictionary looks at translations from other skills as well, so once it's added in one skill, it won't annoy people in other skills :-)

zmbc commented 3 years ago

I guess in this case you can just put a - character. I think this should be relatively rare in most cases, as I think these words will be fairly common. (For example "the", "an" etc. are some of the most common words). The mini dictionary looks at translations from other skills as well, so once it's added in one skill, it won't annoy people in other skills :-)

Ah, did not realize they would be shared. That works!

zmbc commented 3 years ago

@kantord Another question (sorry for having so many):

Why does the Translation of a New words entry appear in the list on hover? The mini-dictionary entries allow you to list multiple possible translations, but the Translation requires capturing the whole meaning of the word. So putting them in the same list is strange to me. For example, a word meaning "cat" or "dog" would need "cat or dog" as its Translation, but then "cat" and "dog" separately in the mini-dictionary gives "cat or dog, cat, dog" on hover when I'd like just "cat, dog".

kantord commented 3 years ago

@kantord Another question (sorry for having so many):

Why does the Translation of a New words entry appear in the list on hover? The mini-dictionary entries allow you to list multiple possible translations, but the Translation requires capturing the whole meaning of the word. So putting them in the same list is strange to me. For example, a word meaning "cat" or "dog" would need "cat or dog" as its Translation, but then "cat" and "dog" separately in the mini-dictionary gives "cat or dog, cat, dog" on hover when I'd like just "cat, dog".

I am not certain that I understand why this is wrong.

The way I see the mini-dictionary is as hints for the learner to make it easier to solve a challenge if they feel stuck. Knowing how it was translated in a previous challenge (when it appeared as a new word) seems useful, no? 🤔

So, I'm thinking, if "cat" was a correct translation in a previous exercise then it should be also a nice hint later.

For example, a word meaning "cat" or "dog" would need "cat or dog" as its Translation, but then "cat" and "dog" separately in the mini-dictionary gives "cat or dog, cat, dog" on hover when I'd like just "cat, dog".

But is it wrong to just use cat and dog as 2 separate definitions in the mini-dictionary? Then it will show up as cat, dog

zmbc commented 3 years ago

But is it wrong to just use cat and dog as 2 separate definitions in the mini-dictionary? Then it will show up as cat, dog

That's exactly what I want to do. My issue is that when I define the word in the New words section, like this:

New words:
  - Word: soweli
    Translation: cat or dog
...

No matter what I do, the string "cat or dog" (literally, with the word "or" in it) will appear in the tooltip for "soweli". It adds itself to the mini-dictionary even when I don't want it to.

kantord commented 3 years ago

But is it wrong to just use cat and dog as 2 separate definitions in the mini-dictionary? Then it will show up as cat, dog

That's exactly what I want to do. My issue is that when I define the word in the New words section, like this:

New words:
  - Word: soweli
    Translation: cat or dog
...

No matter what I do, the string "cat or dog" (literally, with the word "or" in it) will appear in the tooltip for "soweli". It adds itself to the mini-dictionary even when I don't want it to.

ah ok now I understand! I would suggest to add it as 2 separate words then:

New words:
  - Word: soweli
    Translation: dog
  - Word: soweli
    Translation: cat

this way it will show up correctly. I think this should be ok, as there's no need to show all possible meanings of a word at all times

zmbc commented 3 years ago

Ah, I see. You're right -- I think showing one meaning at a time is fine, and perhaps even better from a learning perspective.

It's odd to me that that's not what "Alternative translations" does by default, but for now I am using the method you suggested.

kantord commented 3 years ago

The alternative translations are meant to list whatever will be accepted as a translation coming from the user, but that doesn't represent an intention to actively teach that translation by default.

Often a word can have many translations that can be accepted, but it won't be practical or necessary to teach all of them, much less at once.

zmbc commented 3 years ago

Okay, I think I understand now.

I'm not sure exactly why Alternative versions exists, given that the only time the user is translating, they are using chips. I guess if they randomly happen to receive all the chips necessary to create one of the alternative translations?

I think the LibreLingo documentation could really use an overview of a) what the meaning of each YAML property is from a pedagogical/teaching perspective and b) an overview of all the challenge types and where each YAML property is used in challenges.

Would you be open to a PR to add those things to the documentation? I think the former could be added to the existing Skill docs, and the latter could be a new Challenge Types document.

kantord commented 3 years ago

I guess if they randomly happen to receive all the chips necessary to create one of the alternative translations?

Yes, this scenario is very realistic. To begin with, in pro-drop languages you can drop pronouns and still get a valid sentence with the same meaning:

Yo como pan

is the same as

Como pan

Which is a scenario we absolutely need to support.

The next issue is languages where words can be ordered freely. This English sentence:

I'll eat pasta tomorrow

Can be translated to Hungarian with either of these translations:

Hence, even with just the same set of words, depending on the language, you can have several correct translations.

It is uncommon but not impossible that a synonym or otherwise valid word might end up in the word bank that would result in more alternative solutions that use a different set of words. I want to support this though, for the purpose of introducing a new challenge type where the user is allowed to freely type out whole sentences, hence they're able to use any synonym that they might know.

kantord commented 3 years ago

Would you be open to a PR to add those things to the documentation? I think the former could be added to the existing Skill docs, and the latter could be a new Challenge Types document.

Absolutely!

zmbc commented 3 years ago

Hence, even with just the same set of words, depending on the language, you can have several correct translations.

Thanks for explaining this, it makes sense. The one thing I will add is that not all of your examples would be permissible in the existing software because the solution has to match case-sensitively -- "como pan" is not the same as "Como pan". Perhaps that is just a bug.

kantord commented 3 years ago

because the solution has to match case-sensitively

if that's so, then it's a bug

kantord commented 3 years ago

btw, how is it going with the course @zmbc ? I'm happy to merge any partial progress, it's possible to release courses in a "hidden" way (only those with a link can see it)

zmbc commented 3 years ago

@kantord The course is still taking its "baby steps" but I am hoping to greatly expand on what's there in the near future. And I've currently got my own CD set up to test it as it goes along :)

zmbc commented 3 years ago

@kantord I'm running into another issue with the mini-dictionary. What if there's a word with multiple meanings, where one can be represented with a picture, and others can't? The translation in New words seems to be overwriting the mini dictionary completely.

I have (simplified slightly):

New words:
  - Word: toki!
    Translation: Hello!
    Images:
      - hello1
      - hello2
      - hello3
...
Phrases:
  - Phrase: toki
    Translation: communicate
...
Mini-dictionary:
  toki pona:
    - toki:
      - communicate
      - hello

But the resulting mini-dictionary entry is:

{
  "word": "toki",
  "definition": "Hello!"
}

I am not sure if this is technically a bug but I don't know what to do about it.

kantord commented 3 years ago

The translation in New words seems to be overwriting the mini dictionary completely. ... I am not sure if this is technically a bug but I don't know what to do about it.

This is definitely a bug, it should have the definitions both from the mini-dictionary and the new words section! :+1:

theotheroracle commented 3 years ago

anything i could contribute ?

kantord commented 3 years ago

anything i could contribute ?

@theotheroracle, probably @zmbc can help you when it comes to course content.

If you are interested in coding or tech stuff that will help the toki pona course, perhaps you can start by reviewing this proposal by @zmbc : https://github.com/kantord/LibreLingo/issues/1122#issuecomment-942817265

zmbc commented 3 years ago

@theotheroracle Yes, engineering work is the most needed right now. But especially once #1122 is resolved, there will be plenty of course content creation as well! There is already a (small) group of people who are interested in helping with content, and it would be great to get you plugged into that. We're coordinating in the #ilo-pi-pana-sona channel of ma pona pi toki pona, if you're on there.