olpa / gf-tokipona Goto Github PK
View Code? Open in Web Editor NEWDescribe Toki Pona using Grammatical Framework
License: Other
Describe Toki Pona using Grammatical Framework
License: Other
The list of nounts, adjectives and verbs is 99% the same. No need to multiply the definition with _A
, _N
or _V
suffix.
After
3098ebd
the list of nouns and adjectives (and partially also verbs) is very similar. Think if it still makes sense to differentiate them.
parse "lipu soweli li pona ." gives:
UseCl (PredAP (AdjNP (UseN Lipu_N) (UseA Soweli_A)) (UseA Pona_A))
UseCl (PredAP (AdjnpNP (UseN Lipu_N) (UseN Soweli_N)) (UseA Pona_A))
UseCl (PredNP (AdjNP (UseN Lipu_N) (UseA Soweli_A)) (UseN Pona_N))
UseCl (PredNP (AdjnpNP (UseN Lipu_N) (UseN Soweli_N)) (UseN Pona_N))
...
For many examples, only the third parse is required.
UseCl (PredNP (AdjNP (UseN Lipu_N) (UseA Soweli_A)) (UseN Pona_N))
...
So far only anu seme
is supported on sentence level. But a standalone anu
should work also for nouns:
mi kute e mije anu meli .
Adjectives: likely no. It means that "mi wile telo lete anu seli" parses as "mi wile (telo lete) anu (seli)" and translates "I want (cold water) or (fire)". If one wants anu
for adjectives, just repeat the noun: "mi wile telo lete anu telo seli" (I want cold water or warm water).
The official book says for "en" ("and"): between multiple subjects. So I think the same should be for "anu". TODO: fix the grammar, remove AndAP
.
Verbs: we have "and" for verbs, so it makes sense to allow "or" for verbs. Something like:
mije li sona anu li toki
(The man knows or talks).
UseCl (PredAP Mi_Pron (UseA Pona_A))
In a reworked state, it should be something like
UseCl Mi_Pron (PredAP (UseA Pona_A)))
A preposition (f.e. "tawa mi") can be a predicate alone
A proposition shoud be attached to a predicate, not to a sentence.
The only types of predicate are: NP, VP, Pred and And
forbid AP as a predicate. VP can be a predicate only if it has an object.
Update "and" definition (both for verbs and nouns) to produce unique parses
Among of the parses for "lipu soweli li pona ."" are:
UseCl (PredVP (AdjNP (UseN Lipu_N) (UseA Soweli_A)) (UseV Pona_V))
UseCl (PredVP (AdjnpNP (UseN Lipu_N) (UseN Soweli_N)) (UseV Pona_V))
Looks wrong for me.
The source of the rule comes from the chapter 5: You can omit the object of a verb or use "ijo" as a filler object: "mije li sona e ijo" or "mije li sona".
I think the verb without an object can be considered to be a noun.
All the parses for "sina mije sona .":
UseCl (Greeting (AdjNP Sina_Pron (AdjAP (UseA Mije_A) (UseA Sona_A))))
UseCl (Greeting (AdjNP (AdjNP Sina_Pron (UseA Mije_A)) (UseA Sona_A)))
UseCl (Greeting (AdjNP (AdjnpNP Sina_Pron (UseN Mije_N)) (UseA Sona_A)))
UseCl (Greeting (AdjnpNP Sina_Pron (AdjNP (UseN Mije_N) (UseA Sona_A))))
UseCl (Greeting (AdjnpNP Sina_Pron (AdjnpNP (UseN Mije_N) (UseN Sona_N))))
UseCl (Greeting (AdjnpNP (AdjNP Sina_Pron (UseA Mije_A)) (UseN Sona_N)))
UseCl (Greeting (AdjnpNP (AdjnpNP Sina_Pron (UseN Mije_N)) (UseN Sona_N)))
UseCl (PredAP Sina_Pron (AdjAP (UseA Mije_A) (UseA Sona_A)))
UseCl (PredNP Sina_Pron (AdjNP (UseN Mije_N) (UseA Sona_A)))
UseCl (PredNP Sina_Pron (AdjnpNP (UseN Mije_N) (UseN Sona_N)))
UseCl (PredVP Sina_Pron (AdjVP (UseV Mije_V) (UseA Sona_A)))
All are valid interpretations, but try to make this one come first:
UseCl (PredNP Sina_Pron (AdjNP (UseN Mije_N) (UseA Sona_A)))
mi toki e ni tawa ilo sina:
parse "kon li pona ."
ilo sina li toki e ni tawa mi:
The parser failed at token 1: "kon"
mi lukin e lipu pi ilo ni la, nimi "kon" li lon ala. ( https://github.com/olpa/gf-tokipona/blob/master/grammar/Tokipona.gf )
mi kama son a e ni tan seme? mi pu e ilo sina. ( https://gist.github.com/increpare/881d7f62a5f169014f09a6e9f110fe8a <- ni li toki ale tan lipu Sonja )
pona tawa sina, tawa pali sina :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.