[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 590: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 646: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 472: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5129: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5129: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5129: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3839)
Describing Toki Pona with the computer language Prolog and DCG - Page 2 - Toki Pona Forums

Describing Toki Pona with the computer language Prolog and DCG

Discuss any other topic in here.
Diskutu ĉiujn aliajn temojn ĉi tie.
User avatar
jan_Lope
Posts: 294
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
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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

janKipo
Posts: 3064
Joined: Fri Oct 09, 2009 2:20 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

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

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

Last edited by janKipo on Tue Nov 10, 2015 6:15 pm, edited 1 time in total.

User avatar
jan_Lope
Posts: 294
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
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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

User avatar
jan_Lope
Posts: 294
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

pona!
jan Lope
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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

janKipo
Posts: 3064
Joined: Fri Oct 09, 2009 2:20 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

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.

User avatar
jan_Lope
Posts: 294
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

pona!
jan Lope
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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

janKipo
Posts: 3064
Joined: Fri Oct 09, 2009 2:20 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

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).

User avatar
jan_Lope
Posts: 294
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

pona!
jan Lope
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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

User avatar
jan Alanto
Posts: 43
Joined: Tue Sep 01, 2015 12:18 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

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"...

User avatar
jan_Lope
Posts: 294
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

Last edited by jan_Lope on Mon Dec 28, 2015 2:30 am, edited 1 time in total.
pona!
jan Lope
https://jan-lope.github.io
(Lessons and the Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona)

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


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Return to “ijo ante | miscellaneous | diversaj”

Who is online

Users browsing this forum: No registered users and 0 guests