Describing Toki Pona with the computer language Prolog and DCG

Discuss any other topic in here.
Diskutu ĉiujn aliajn temojn ĉi tie.
jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Wed Nov 04, 2015 7:01 am

jan Kipo, many thanks for your notes.
This project is just for fun and not completed. Maybe it will be never completed (Perfectionism is boring ;-)
At the moment I can't support Toki Pona dialects. First I try to apply the official grammar rules of jan Sonja and jan Pije. But the DCG rules are not set in stone. May these DCG rules can help to improve Toki Pona lessons.


> 2: 'mi moku li pakala li pakala' is OK

In the beginning I made a nice mistake and I didn't realize this until know. I 've fixed it.

?- check_grammar.
|: mi moku li pakala li pakala.
true .

> 3 'mi moku e moku mute mute mi' ? marginal, nice to have a hard datum

Do you mean the number of "mute"? I've limited it to 3.

?- check_grammar.
|: mi moku e moku mute mute mute.
true .

?- check_grammar.
|: mi moku e moku mute mute mute mute.
false.

The DCG rules for adjectives and adverbs are not optimal now. I think more than 4 adjectives or adverbs are not good to understand and no Toki Pona style.
Pronouns can be adjectives but on which position - only at the end of several adjectives?


> 4 ('mi kepeken e poki mi', 'mi kepeken e ilo') listed as OK but not: no 'e' with 'kepeken'

In the lessons of jan Pije is "kepeken" a transitive verb also.

http://tokipona.net/tp/janpije/okamasona6.php


> 6 'sina wile toki e tan tawa mi' grammatical but possibly inappropriate (“talk about”?) not sure how to sort these out

See http://tokipona.net/tp/janpije/okamasona8.php "Practice"

> All the rejects here are at most punctuation matters, questionable question marks and definitely wrong period.

Note: I 've created the most of the examples with wrong grammar to check the DCG rules.


> 7 'Linnula' is not proper spelling final /n/ can't be before initial /n/ or /m/.

There is no rule about this in the official Toki pona book. But here: http://tokipona.net/tp/janpije/okamasona2.php
I'll correct the Prolog-DCG-rules next.

> 'mi wile wile e ni: mi lon' is OK, the others just lack the 'e' (and even that may be permissible in some contexts)

At the moment my DCG rules do not allow to repeat the same verb several times. I think it makes no sense. You can use "mute" or "kin" instead. Maybe I'm wrong.


> 8 'ma Elopa/ma tomo Pelin lon seme' lack 'li' – not grammatical

Bugfix:

?- check_grammar.
|: ma Elopa lon seme?
false.

?- check_grammar.
|: ma tomo Pelin lon seme?
false.

> 'ni li lili li suli tawa sina?' is just questionable question mark.

Yes, it is.


> 9 Contentious issue: can unofficial words stand alone as predicate, e.g. 'nimi mi li Kipo' Reason and the general rules say “No”, pu says “Yes” and you follow pu, thus furthering the spread of nonsense (and bad rule use).

Yes, it is a contentious issue. jan Sonja and jan Pije say "Yes". I prefer "No", but I build DCG rules in accordance with the official Toki Pona.


> 10 about the limits of grammar: 'lipu ni li pilin lete' is wrong because 'pilin' (like 'olin', etc.) only takes sentient subjects, which 'lipu' probably is not. But is this grammatical or something else? (I suppose it intends 'lete pilin')

Not "lipu" has the feeling. Please see http://tokipona.net/tp/janpije/okamasona12.php

> settled but still disputed: 'mi kin' requires 'li' so 'mi kin olin e sina' is ungrammatical.

In the past "kin" was used as pre verb and it needs no "li" here. In jan Pijes lessons is "kin" an adjectiv now. I changed the DCG rules and the Toki Pona lessons on my website:

?- check_grammar.
|: mi kin olin e sina.
false.

?- check_grammar.
|: mi kin li olin e sina.
true .

?- check_grammar.
|: mi olin kin e sina.
true .

> I didn't see a case, but can a sentence contain 'anu' and not be a question?

mi kute e mije anu meli. (pu lession 7).


> 11 Yeah, titles are a problem. This seems to be going in the right way (I prefer all have quotes, like untpized foreign words).

I think you mean titles of movies ("sitelen tawa").
Btw: Titles of text sections are often no complete sentences. To recognize these kind of titles you have to check not only one sentence. This is a aim for later.


> 12 'akesi mu li tawa' is borderline. Those who use 'mu' and 'a' as verbs and nouns (and, hence, modifiers) say it is fine; otherwise not.

"mu" could be a verb or a noun? I've found no notes about this in jan Sonas and jan Pijes lessons.


> 14 As earlier 'jan mute mute mute li kama' is questionable on various grounds. Any sensible reading requires at least one 'pi', but ….

Where do you found this rule?

> 'ni li jan lili ona pi nanpa tu' is ungrammatical – no 'pi' with 'nanpa'

Please see http://tokipona.net/tp/janpije/okamasona16.php

> 'ni li jan tu tu tu tu' is clearly OK, since officially there are only 'wan' and 'tu' as numbers; the use of 'luka', etc. is officially optional (or even discouraged).

Please see pu page 46.


> 15 And, if you must use a comma with 'la', it goes after the 'la'.

Please see pu page 52.

> The multiple 'mute' problem again. No clear solution in sight, but the old rules would allow at most two 'mute' in a row without a 'pi' (one “very” and one “many”).

If I see clear rules for this I 'll adapt the DCG rules.

> 'ken la tenpo pimeja la ni li pona' is clearly grammatical,

Several "la" in one sentence are OK?

> I don't now understand your use of unofficial unofficial words, like 'X-Files' and 'MIRC' but not “Lisbon”.

This if only a software issue at the moment. My scripts are using include files ("unofficial_words_*_catalog.pro") with hard coded unoffical word like "X-Files". If Prolog can't find the word in these include files it check the spelling with DCG rules.
"Lisbon" is not in the include files and has the wrong spelling.

> I'm also wondering about rejecting a sentence because of a (moderately appropriate) comma.

I try to fit the DCG rules to the lessons of jan Sonja and jan Pije.
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.

janKipo
Posts: 2763
Joined: Fri Oct 09, 2009 2:20 pm

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby janKipo » Wed Nov 04, 2015 12:54 pm

jan_Lope wrote:
> 3 'mi moku e moku mute mute mi' ? marginal, nice to have a hard datum

Do you mean the number of "mute"? I've limited it to 3.

?- check_grammar.
|: mi moku e moku mute mute mute.
true .

?- check_grammar.
|: mi moku e moku mute mute mute mute.
false.

The DCG rules for adjectives and adverbs are not optimal now. I think more than 4 adjectives or adverbs are not good to understand and no Toki Pona style.
Pronouns can be adjectives but on which position - only at the end of several adjectives?


There is no reasonable rule for the mere number of adjectives or adverbs; it is the repetition that is at issue. IF (notice, a big "if") repetition can be used for emphasis/higher degrees, then we have to allow repetitions all at the same level (and consider whether they need 'pi'). The hard cases are usually 'mute' (and, I suppose, 'lili') which can legitimately occur in three repetitions without 'pi' even now 'jan pi pona pi mute mute mute', "many very very good people". There is also a problem with 'ala' (and maybe 'ali') popping up in these strings as well.
Pronouns and numbers both go to the end, with varying meanings with different final orders. Both can also go close to,the head for clarity if a long 'pi' string follows and sometimes just as part of the "specification" place right next to the head.


> 4 ('mi kepeken e poki mi', 'mi kepeken e ilo') listed as OK but not: no 'e' with 'kepeken'

In the lessons of jan Pije is "kepeken" a transitive verb also.

http://tokipona.net/tp/janpije/okamasona6.php


Yes, Pije persists, but the community and Sonja have moved on on this: 'kepeken' is a preposition, period.


> 6 'sina wile toki e tan tawa mi' grammatical but possibly inappropriate (“talk about”?) not sure how to sort these out

See http://tokipona.net/tp/janpije/okamasona8.php "Practice"


Sorry 'bout that. I was reading more into it than was there.

> All the rejects here are at most punctuation matters, questionable question marks and definitely wrong period.

Note: I 've created the most of the examples with wrong grammar to check the DCG rules.


Rules probably ought not at this time include punctuation, since so little of that is set in stone.


> 7 'Linnula' is not proper spelling final /n/ can't be before initial /n/ or /m/.

There is no rule about this in the official Toki pona book. But here: http://tokipona.net/tp/janpije/okamasona2.php
I'll correct the Prolog-DCG-rules next.


Not sure why Sonja missed this, except that she gives sort shrift to name construction altogether. In this case, Pije clearly has the principle right.

> 'mi wile wile e ni: mi lon' is OK, the others just lack the 'e' (and even that may be permissible in some contexts)

At the moment my DCG rules do not allow to repeat the same verb several times. I think it makes no sense. You can use "mute" or "kin" instead. Maybe I'm wrong.


This is not actually a repetition, since the second 'wile' is not on a par with the first but is the verb in the predicate which is complement of the first "I want to want that..." (cf. 'jan pi pona mute mute' "many very good people").


> 9 Contentious issue: can unofficial words stand alone as predicate, e.g. 'nimi mi li Kipo' Reason and the general rules say “No”, pu says “Yes” and you follow pu, thus furthering the spread of nonsense (and bad rule use).

Yes, it is a contentious issue. jan Sonja and jan Pije say "Yes". I prefer "No", but I build DCG rules in accordance with the official Toki Pona.


Well, "official" is not very official, since Sonja says that this is just how she uses tp. Personally, I go for consistency over whatever the Hell is going on here.


>10 about the limits of grammar: 'lipu ni li pilin lete' is wrong because 'pilin' (like 'olin', etc.) only takes sentient subjects, which 'lipu' probably is not. But is this grammatical or something else? (I suppose it intends 'lete pilin')

Not "lipu" has the feeling. Please see http://tokipona.net/tp/janpije/okamasona12.php


But that example has 'lete pilin' correctly.

> settled but still disputed: 'mi kin' requires 'li' so 'mi kin olin e sina' is ungrammatical.

In the past "kin" was used as pre verb and it needs no "li" here. In jan Pijes lessons is "kin" an adjectiv now. I changed the DCG rules and the Toki Pona lessons on my website:

?- check_grammar.
|: mi kin olin e sina.
false.

?- check_grammar.
|: mi kin li olin e sina.
true .

?- check_grammar.
|: mi olin kin e sina.
true .

When was 'kin' ever a verb? It seems always to have been a particle, free to drop in anywhere for rhetorical flourishes. But it is there and so block the 'li' dropping rule.

> I didn't see a case, but can a sentence contain 'anu' and not be a question?

mi kute e mije anu meli. (pu lession 7).


nice to know. We need more cases of 'anu' in other places.


> 11 Yeah, titles are a problem. This seems to be going in the right way (I prefer all have quotes, like untpized foreign words).

I think you mean titles of movies ("sitelen tawa").
Btw: Titles of text sections are often no complete sentences. To recognize these kind of titles you have to check not only one sentence. This is a aim for later.


Yes, and books and plays and , .... The whole problem of fragments is a pain for any kind of grammar, since there don't seem to be any limits on what can be extracted or left out. One is tempted to just allow anything inside title quotes.


> 12 'akesi mu li tawa' is borderline. Those who use 'mu' and 'a' as verbs and nouns (and, hence, modifiers) say it is fine; otherwise not.

"mu" could be a verb or a noun? I've found no notes about this in jan Sonas and jan Pijes lessons.

A few cases of each, accepted generally: 'soweli li mu', 'soweli li pana e mu' etc.

> 14 As earlier 'jan mute mute mute li kama' is questionable on various grounds. Any sensible reading requires at least one 'pi', but ….

Where do you found this rule?


In usage, I suppose. It isn't in any book except for the general principle(which is surely in the books, so poorly put) that if two or more words act as a unit to modify something, that unit is set off by 'pi'. If 'mute mute mute' is to be a single modifier "very very many" or so, then it has to be set off from 'jan' by 'pi'. If it is analyzable as 'mute' modified by 'mute mute' and this latter is also analyzable, then it has to be 'jan pi mute pi mute mute'.

> 'ni li jan lili ona pi nanpa tu' is ungrammatical – no 'pi' with 'nanpa'

Please see http://tokipona.net/tp/janpije/okamasona16.php


Yes, Pije clings to old ways often (see 'kepeken' above), but the rest of us have moved on, including Sonja (page 47).

> 'ni li jan tu tu tu tu' is clearly OK, since officially there are only 'wan' and 'tu' as numbers; the use of 'luka', etc. is officially optional (or even discouraged).

Please see pu page 46.

OK, but every once in a while Sonja goes back on here pitiful palliatives and insists that neither 'mute' nor 'ali' really count, nor even 'luka'. It seems that the second system (after she got rid of 3, 4, and 5) is still alive, if not in common use.

> 15 And, if you must use a comma with 'la', it goes after the 'la'.

Please see pu page 52.

Given that the comma isn't needed there at all, putting it in in the wrong place is just perverse. Sonja does that from time to time, alas. Note, she doesn't use it on page 52.

> The multiple 'mute' problem again. No clear solution in sight, but the old rules would allow at most two 'mute' in a row without a 'pi' (one “very” and one “many”).

If I see clear rules for this I 'll adapt the DCG rules.


Until repetition gets some definite status, the usual rules for 'pi' apply.

> 'ken la tenpo pimeja la ni li pona' is clearly grammatical,

Several "la" in one sentence are OK?

Always have been. It is sometimes hard to figure out what is the proper way to treat them, but that is just tp for you: 'tenpo kama la mi tawa tomo la mi moku'

> I don't now understand your use of unofficial unofficial words, like 'X-Files' and 'MIRC' but not “Lisbon”.

This if only a software issue at the moment. My scripts are using include files ("unofficial_words_*_catalog.pro") with hard coded unoffical word like "X-Files". If Prolog can't find the word in these include files it check the spelling with DCG rules.
"Lisbon" is not in the include files and has the wrong spelling.


Back to recommending foreign quotes for all these things.

> I'm also wondering about rejecting a sentence because of a (moderately appropriate) comma.

I try to fit the DCG rules to the lessons of jan Sonja and jan Pije.


But there are no lesson, or indeed, rules for commas and one can use them as one will -- with the possibility of getting nasty comments, of course. The ones with 'la' have three versions, none, before and after. some use then to separate the PP at the end from modifier strings on the DO to prevent the 'ona li pan e sitelen tawa mi' problem. Others use them in other ways to tidy up messy constructions. But no rules, so presumably they are ignored in your processing.
Last edited by janKipo on Tue Nov 10, 2015 6:15 pm, edited 1 time in total.

jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Tue Nov 10, 2015 4:46 pm

jan Kipo, many thanks for your notes.

First I've updated the lessons on my website:
http://rowa.giso.de/languages/toki-pona ... essons.php

Please write me if you find mistakes.

The update of my DCG rules will come next.

pona!
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.

jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Wed Nov 25, 2015 3:48 am

jan Kipo o, toki!

Many thanks for you comments.

There is no reasonable rule for the mere number of adjectives or adverbs; it is the repetition that is at issue.

Now in my lessons I advise only up to three adjectives or adverbs per noun without repetition of the same word. I refer to "kin". I've changed all examples accordingly.
I've change the DCG rules to max. three adjectives or adverbs also.

Pronouns and numbers both go to the end, with varying meanings with different final orders.

I've change the DCG rules accordingly.

Yes, Pije persists, but the community and Sonja have moved on on this: 'kepeken' is a preposition, period.

This is not exactly. "kepeken" is a intransitive verb also. But I agree after "kepeken" is no "e". I've changed the lessen and the DCG rules accordingly.

'Linnula' is not proper spelling final /n/ can't be before initial /n/ or /m/.

This is on my To Do list. I'll correct the Prolog-DCG-rules next.

> 'mi wile wile e ni: mi lon' is OK, the others just lack the 'e' (and even that may be permissible in some contexts)
This is not actually a repetition, since the second 'wile' is not on a par with the first but is the verb in the predicate which is complement of the first "I want to want that..." (cf. 'jan pi pona mute mute' "many very good people").

You are right. I've changed the DCG rules. The pre verb can be the same as the main verb.

Contentious issue: can unofficial words stand alone as predicate, e.g. 'nimi mi li Kipo' Reason and the general rules say “No”, pu says “Yes” and you follow pu, thus furthering the spread of nonsense (and bad rule use).
> Yes, it is a contentious issue. jan Sonja and jan Pije say "Yes". I prefer "No", but I build DCG rules in accordance with the official Toki Pona.
Well, "official" is not very official, since Sonja says that this is just how she uses tp. Personally, I go for consistency over whatever the Hell is going on here.

I agree with you. I've changed my lessons accordingly. But at the moment I keep the DCG rules for this. Maybe I put these rules in an include file for an archive.

about the limits of grammar: 'lipu ni li pilin lete' is wrong because 'pilin' (like 'olin', etc.) only takes sentient subjects, which 'lipu' probably is not. But is this grammatical or something else? (I suppose it intends 'lete pilin')
..
But that example has 'lete pilin' correctly.

I've changed my lessons and the accordingly. I hope I didn't forget something.

A few cases of each, accepted generally: 'soweli li mu', 'soweli li pana e mu' etc.

This is on my to do list: "mu" as an verb, noun and adjectiv.

'ni li jan lili ona pi nanpa tu' is ungrammatical – no 'pi' with 'nanpa'

I've changed my lessons and the accordingly.

'ni li jan tu tu tu tu' is clearly OK, since officially there are only 'wan' and 'tu' as numbers; the use of 'luka', etc. is officially optional (or even discouraged).

Yes, it si right. Toki Pona has four different "count" systems:
- ala, wan, tu (the old one)
- ala, wan, tu, luka
- ala, wan, tu, luka, mute ale (pu)
- ala, mute, lili (vague)
My DCG rules support all of them. In my lessons I prefer ala, wan, tu, luka. I know your meaning about this ;-)

> Several "la" in one sentence are OK?
Always have been. It is sometimes hard to figure out what is the proper way to treat them, but that is just tp for you: 'tenpo kama la mi tawa tomo la mi moku'

OK, I've changed my lessons and the accordingly.

But there are no lesson, or indeed, rules for commas and one can use them as one will -- with the possibility of getting nasty comments, of course. The ones with 'la' have three versions, none, before and after. some use then to separate the PP at the end from modifier strings on the DO to prevent the 'ona li pan e sitelen tawa mi' problem. Others use them in other ways to tidy up messy constructions. But no rules, so presumably they are ignored in your processing.

You forgot the version "... , la, ..." (comma before and after "la"). ;-)
In my lessons I make clear that commas are not nessesary - except after "o". In my DCG rules I try to be more tolerant. I think about rules for correcting these soft mistakes.
[/quote]

Thanks
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.

janKipo
Posts: 2763
Joined: Fri Oct 09, 2009 2:20 pm

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby janKipo » Thu Nov 26, 2015 7:11 pm

I still find it hard to imagine a rule that maximizes the number of modifiers, though there are stylistic reasons to keep the number small. Still, jan lili li wile e tomo tawa seli loje suno suli "The child wanted a big shiny red fire truck" seems perfectly reasonable.
'kepeken' is a preposition. Prepositions can be used as intransitive (and, indeed, transitive) verbs" 'mi tawa tomo' or even just 'mi tawa', for examples.
I keep hoping that eventually we will get a sensible number system for tp, but don't hold your breath.
Eek! does someone actually use commas before AND after 'la'? I hope this was a joke.

jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Fri Nov 27, 2015 8:41 am

I still find it hard to imagine a rule that maximizes the number of modifiers, though there are stylistic reasons to keep the number small. Still, jan lili li wile e tomo tawa seli loje suno suli "The child wanted a big shiny red fire truck" seems perfectly reasonable.

Your sentence is right but I is not a good Toki Pona style. I think it is possible to avoid tapeworms like this.
I advice in my lesson up to three adjectives or adverbs only. My DCG rules allow up to three adjectives or adverbs at the moment. Next I'll check several Toki Pona texts with my DCGs and we will see. Maybe I' ll change the rules.

Eek! does someone actually use commas before AND after 'la'? I hope this was a joke.

A comma or two commas together with la - what is the difference? ;-)
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.

janKipo
Posts: 2763
Joined: Fri Oct 09, 2009 2:20 pm

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby janKipo » Fri Nov 27, 2015 3:09 pm

Well, I can't see any reason for any commas with 'la' except to tidy up the grouping of several 'la' phrases -- and then I don't know how to do that. If one comma is superfluous, how do you say supersuperfluous?

On strings of adjectives, I think there is a maximum at around nine or so, with all the potential slots filled (I think I had a case once), but short of that there are no grammatical reasons to set limits, only stylistic ones. It may be possible to avoid things like my truck example; indeed, it always is, because we can go back to the source and just do the basic sentences: 'jan lili li wile e tomo tawa seli ni. ona li suno li loje li suli' (okay. so I collapsed a little). This isn't quite the same, but is close enough for most purposes (this isn't Lojban, after all).

jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Wed Dec 16, 2015 6:53 am

toki!

Parse Trees

In the past my DCG rules can only check the grammar of a sentence. The answer is only "true" or "false". I've started to add code which support parse trees. Keep in mind that most sentences in Toki Pona could have several pars trees, because of multiple meanings. The sentence "suno li suli." have two meanings here.

Code: Select all

?- check_grammar(Parse_tree).
|: suno li suli.

Parse_tree = sentence(sentence_declarative(noun_phrase(noun(suno), separator(li)), verb_phrase(verb_transitive(suli))), separator('.')) ;

Parse_tree = sentence(sentence_declarative(noun_phrase(noun(suno), separator(li)), verb_phrase(verb_be(''), noun(suli))), separator('.')) ;


But I changed the DCG rules for the scripts of my first DCG lesson only. The rest is a sisyphean task. It will be takes some time.

http://rowa.giso.de/languages/toki-pona ... sson17.php
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.

User avatar
jan Alanto
Posts: 27
Joined: Tue Sep 01, 2015 12:18 pm

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan Alanto » Wed Dec 16, 2015 11:42 am

Couldn't 'suli' be also a modifier (or at least adjective, in this case), which is its original class?
It seems that the only case where the word after 'li' can't be modifier is when it's originally a noun. But I'd like to see a sentence like "ni li mi" for "this is mine"...

jan_Lope
Posts: 147
Joined: Sat Apr 06, 2013 1:30 pm
Location: mi lon ma tomo Pelin.
Contact:

Re: Describing Toki Pona with the computer language Prolog and DCG

Postby jan_Lope » Thu Dec 17, 2015 3:53 am

jan Alanto wrote:Couldn't 'suli' be also a modifier (or at least adjective, in this case), which is its original class?
It seems that the only case where the word after 'li' can't be modifier is when it's originally a noun. But I'd like to see a sentence like "ni li mi" for "this is mine"...


jan Alanto o, toki!

You are right. "suli" can be an adjective, adverb, noun and transitive verb. But this is my first example script with parse trees and I changed my first DCG scripts. These support the first lesson of the Toki Pona lessons of my website. In this lesson are no adjectives and adverbs. These are subjects of the later lessons. Now I'm changing the source code of lesson 16 ( http://rowa.giso.de/languages/toki-pona ... sson16.php ). This will take some days because I have to change every DCG and Prolog rule (nearly every line).

After "li" can be a verb but also a noun, a adjective or a adverb because there is no "be" in Toki Pona. For example "mi moku." has several grammar possibilities: pronoun verb, pronoun (be) noun, pronoun (be) adjective and pronoun (be) adverb.

"ni li mi." = "This is me." pronoun_determiner, (be), pronoun.
"ni li mi." = "This is my." pronoun_determiner, (be), pronoun_as_adjective.

BTW "modifier" is not an exact grammar term. I don't use it. It is better to use exact grammar terms like "adjective" and "adverbs". The meaning of the same word is different if you use it as an adverb or adjective. Remember unofficial words and numbers are only adjectives and not adverbs.

pona!
Last edited by jan_Lope on Mon Dec 28, 2015 2:30 am, edited 1 time in total.
pona!
jan Lope
http://rowa.giso.de/languages/toki-pona/ (Lessons)
http://rowa.giso.de/languages/toki-pona/dcg/ (Prolog and DCG)

On my foe list are the sockpuppets janKipo and janSilipu because of spamming.


Return to “ijo ante | miscellaneous | diversaj”

Who is online

Users browsing this forum: No registered users and 2 guests

cron