Intro
 
Lession 1
 
Lession 2
 
Lession 3
 
Lession 4
 
Lession 5
 
Lession 6
 
Lession 7
 
Lession 8
 
Lession 9
 
Lession 10
 
Lession 11
 
Lession 12
 
Lession 13
 
Lession 14
 
Lession 15
 
Lession 16
 
Lession 17
 
Lession 18
 
Contact
 
 

 
Home | Text version
 

Learn Definite Clause Grammars (DCG) with Toki Pona

Lession 7

The additional Prolog- and DCG-rules for the Toki Pona lession Gender, Unofficial Words, Addressing People, Interjections, Commands are not a piece of cake.

The Main Programm

The hardest part are the rule for the unofficial words. A simple way is to put these in word lists (please see the include files below). But it is not possible to put all unofficial words in word lists. So we need rules to check the correct spelling of an unofficial word in the case it is not in one of the lists. Maybe you will ask: Why we need the word lists? One reason is the search in the word lists is faster. Another reason is a possible use of these rules for artificial intelligence later.

Unofficial words can only use together with some nouns and some adjectives. This code snippet show only the rules for unofficial geography terms. Geography names in Toki Pona need the word "ma" and optional the adjectives "suli" or "tomo" .

noun_compound           --> noun(_).
noun_compound           --> noun_compound_geography.
noun_compound_geography --> noun(ma),                     continent(_).
noun_compound_geography --> noun(ma),    adjectiv(suli),  continent(_).
noun_compound_geography --> noun(ma),                     country(_).
noun_compound_geography --> noun(ma),    adjectiv(tomo),  city(_).

Let's have a look at the rules for continents. The unofficial word for a continent can be in a word list "continent_catalog" (please see the include file at the end of this page). The "!" stop the search after find the word in the "continent_catalog". If the word not in the catalog check it spelling only with the rule "word_unofficial".

continent(X)            --> continent_catalog(X), !.  
:- ['unofficial_words_continent_catalog.pro'].   
continent(X)               --> word_unofficial(X).

Normally unofficial word need a noun before because there are adjectives. But in Toki Pona is no word for "be" and adjectives can be after "li".

sentence_declarative     --> designate. 

designate                --> noun(nimi),  pronoun(_), separator(li), female_prominent_personage(_).
designate                --> noun(nimi),  pronoun(_), separator(li), male_prominent_personage(_). 
designate                --> noun(nimi),  pronoun(_), separator(li), female_name(_).
designate                --> noun(nimi),  pronoun(_), separator(li), male_name(_).

To make it possible to use DCG rules for spell check we need first a pure Prolog rule (please remember the ":-"). The important part of "word_unofficial" is the build in Prolog rule "atom_chars". It convert an atom (Word) in a list of character codes (CL). We put the list of character codes in a different list "word_unofficial_list". Remember different lists are the basis for DCGs. We check the lenght of the word also. An unofficial word can have 2 to 15 characters. The cut operator (!) mean: Don't try more than one true solution. After this we can define DCG rules for the syllables of an unofficial word.

word_unofficial(Word,[Word|T],T) :-   
     atom_length(Word,L),  
     (L > 1, L =< 15), 
     atom_chars(Word,CL), 
     word_unofficial_list(CL,[]), !.

word_unofficial_list    --> syllable_first, syllables.

Furthermore we have new rules "salutation", "interjection", "vocativ_interjection", "imperativ", "vocativ_imperative", "vocativ_question". Please see the source code of toki-pona-07.pro for details.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Learn Definite Clause Grammars with Toki Pona
% Toki Pona - Lession 07 - Gender,Unofficial Words, Addressing People, Interjections, Commands
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
% ['toki-pona-07.pro'].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Grammar  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% sentence types:

sentence                 --> sentence_declarative,                                                       separator('.').   % A declarative sentence states a fact or an argument and ends with a full stop.
sentence                 --> sentence_exclamatory,                                                       separator('!').   % An exclamatory sentence makes also conveys excitement and ends with an exclamation mark.
sentence                 --> sentence_imperative,                                     (separator('!') ;  separator('.')).  % An imperative sentence (command) can ends with an exclamation mark or a full stop.
sentence                 --> sentence_interrogative,                                                     separator('?').   % An interrogative sentence (questions) always ends in a question mark.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% definitions of the sentence types:

sentence_declarative     -->             sentence_simple.                                                                  % A declarative sentence can be an simple sentence. 
sentence_declarative     -->             sentence_simple,   separator(':'),              sentence_simple.                  % A declarative sentence can build of two simple sentences separated by a colon (sentence_hint).
sentence_declarative     --> answer_yes.                                                                                   % A declarative sentence can be a yes answer.
sentence_declarative     --> answer_no.                                                                                    % A declarative sentence can be a no answer.
sentence_declarative     --> vocativ.                                                                                      % A declarative sentence can be a vocativ sentence (addressing people).
sentence_declarative     --> salutation.                                                                                   % A declarative sentence can be a salutation.
sentence_declarative     --> interjection.                                                                                 % A declarative sentence can be an interjection.
sentence_declarative     --> vocativ_interjection.                                                                         % A declarative sentence can be an interjection and vocativ sentence.
sentence_declarative     --> designate.                                                                                    % Special sentence for designate, for example: nimi mi li Lope.

sentence_exclamatory     --> sentence_declarative.                                                                         % A exclamatory sentence can has the same structure as an declarative sentence.

sentence_imperative      --> imperative.                                                                                   % An imperative sentence (command).
sentence_imperative      --> vocativ_imperative.                                                                           % An imperative sentence (command) can be a vocativ imperativ.

sentence_interrogative   --> question.                                                                                     % An interrogative sentence (question) can be a question.
sentence_interrogative   --> vocativ_question.                                                                             % An interrogative sentence (question) can be a vocativ question.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% special sentences:

sentence_simple          --> noun_phrase,          verb_phrases.                                                           % A simple sentence consist of a noun phrase and verb phrases. 

answer_yes               -->                       verb_transitive(_).
answer_yes               --> verb_pre(Vp),         verb_transitive(V), {V\=Vp}.
answer_yes               --> verb_pre(_).

answer_no                -->                                                 noun(ala).
answer_no                -->                       verb_transitive(_),       adverb(ala).
answer_no                --> verb_pre(Vp),                                   adverb(ala),  verb_transitive(V), {V\=Vp}.
answer_no                --> verb_pre(_),                                    adverb(ala).

vocativ                  --> noun_compound_person,                           separator(o), separator(','), noun_phrase, verb_phrases.
vocativ_interjection     --> noun_compound_person,                           separator(o), separator(','),              verb_phrases.

interjection             --> interjection_word(_).
interjection             --> interjection_word(a), interjection_word(a),     interjection_word(a).                                       % "a a a." laughing
interjection             --> noun_compound_person,                           separator(o), interjection_word(a).                         % Addressing people really emotional.
interjection             -->              sentence_simple,                                                   interjection_word(a).       % A interjection sentence can build of a simple sentence and an "a"..
interjection             -->              sentence_simple,   separator(':'),  sentence_simple,               interjection_word(a).       % A interjection sentence can build of two simple sentences separated by a colon and followed by an "a".

salutation               --> noun(suno),                    adjectiv(pona).                                                              % Salutation: Good day!
salutation               --> noun(lape),                    adjectiv(pona).                                                              % Salutation: Sleep well!
salutation               --> noun(moku),                    adjectiv(pona).                                                              % Salutation: Enjoy your meal!
salutation               --> noun(tawa),                    adjectiv(pona).                                                              % Salutation: Good bye!
salutation               --> noun(kama),                    adjectiv(pona).                                                              % Salutation: Welcome!
salutation               --> noun(musi),                    adjectiv(pona).                                                              % Salutation: Have fun!
salutation               --> pronoun(mi),                   adjectiv(tawa).                                                              % Salutation: Good bye! (I go)   
salutation               --> pronoun(mi), adjectiv(mute),   adjectiv(tawa).                                                              % Salutation: Good bye! (we go) 

imperative               -->                                                 separator(o),                   verb_phrases.               % An imperative starts with an "o" as a noun phrase.
vocativ_imperative       --> pronoun_compound,                               separator(o),                   verb_phrases.               % An vocative imperative sentence has an "o" instead of a "li".
vocativ_imperative       --> noun_compound,                                  separator(o),                   verb_phrases.

designate                --> noun(nimi),                                                pronoun(_), separator(li), female_prominent_personage(_).  % Normally unofficial word need a noun before because there are adjectives.
designate                --> noun(nimi),                                                pronoun(_), separator(li), male_prominent_personage(_).    % But in Toki Pona is no word for "be" and adjectives can be after "li".
designate                --> noun(nimi),                                                pronoun(_), separator(li), female_name(_).
designate                --> noun(nimi),                                                pronoun(_), separator(li), male_name(_).

vocativ_question         --> noun_compound,                              separator(o), separator(','), question.                         % Addressing and asking.    

question                 --> question_yes_no.                                                                                            % A question can be a yes/no question.

question_yes_no          --> noun_phrase, question_yn_verb_phrase.                                                                       % A Yes/No questions consist of a noun phrase and a special verb phrase.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  phrases:

noun_phrase              --> pronoun_no_li.
noun_phrase              --> pronoun_with_li,                                  separator(li).
noun_phrase              --> noun_compound,                                    separator(li).

verb_phrases             --> verb_phrase,         verb_phrase_add.
verb_phrase              --> verb_transitive_compound,                                       direct_objects,   prepositional_objects.
verb_phrase              --> verb_intransitive_compound,                                     intrans_objects,  prepositional_objects.
verb_phrase              --> adjectiv(_),               adjectives.                                                                     % In toki pona is no verb "to be". 
verb_phrase              --> pronoun_compound.                                                                                          % In toki pona is no verb "to be".
verb_phrase              --> noun_compound.                                                                                             % In toki pona is no verb "to be". 
verb_phrase_add          --> [].
verb_phrase_add          --> separator(li),       verb_phrase,          verb_phrase_add.

question_yn_verb_phrase  -->                                                      verb_transitive(Verb),   adverb(ala), verb_transitive(Verb),   direct_objects,  prepositional_objects.
question_yn_verb_phrase  --> verb_pre(Verb_pre), adverb(ala), verb_pre(Verb_pre), verb_transitive(Verb), { Verb \= Verb_pre },                   direct_objects,  prepositional_objects.
question_yn_verb_phrase  --> verb_pre(Verb_pre), adverb(ala), verb_pre(Verb_pre),                                                                direct_objects,  prepositional_objects.
question_yn_verb_phrase  -->                                                      verb_intransitive(Verb), adverb(ala), verb_intransitive(Verb), intrans_objects, prepositional_objects.
question_yn_verb_phrase  --> verb_pre(Verb_pre), adverb(ala), verb_pre(Verb_pre), verb_intransitive(Verb), { Verb \= Verb_pre },                 intrans_objects, prepositional_objects.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% objects:

direct_objects           --> [].                                                                                                        % no direct object
direct_objects           --> direct_object,       direct_objects.   
direct_object            --> separator(e),        noun_compound.
direct_object            --> separator(e),        pronoun_compound.

intrans_objects         --> [].      
intrans_objects         --> intrans_object.
intrans_object          --> noun_compound.                  
intrans_object          --> pronoun_compound.                  

prepositional_objects   --> [].                       
prepositional_objects   --> prepositional_object, prepositional_objects.
prepositional_object    --> preposition(_),       noun_compound.
prepositional_object    --> preposition(_),       pronoun_compound. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pronouns:

pronoun_optional        --> [].
pronoun_optional        --> pronoun(_).

pronoun_no_li           --> pronoun(mi).                                                                                             % "mi" or "sina" need no "li".
pronoun_no_li           --> pronoun(sina).                                                                                           % "mi" or "sina" need no "li".
pronoun_with_li         --> pronoun(P), {P\=mi,P\=sina}.                                                                             % These pronouns need a "li".
pronoun_with_li         --> pronoun(_),                               adjectiv(mute).                                                % These compund pronouns need a "li".
pronoun_compound        --> pronoun(_),                               adjectives.                                                    % All (compound) pronouns.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% nouns:

noun_compound           --> noun_compound_geography.                                                                                    % The special rules have to be before the general rules.
noun_compound           --> noun_compound_language.
noun_compound           --> noun_compound_ideology.
noun_compound           --> noun_compound_person.
noun_compound           --> noun(_),                      adjectives.                                                                   % A compound noun can be build with a noun and optional adjectives.

noun_compound_geography --> noun(ma),                     continent(_),                     adjectives.
noun_compound_geography --> noun(ma),    adjectiv(suli),  continent(_),                     adjectives.
noun_compound_geography --> noun(ma),                     country(_),                       adjectives.
noun_compound_geography --> noun(ma),    adjectiv(tomo),  city(_),                          adjectives.
noun_compound_language  --> noun(toki),                   language(_),                      adjectives.
noun_compound_language  --> noun(toki),  adjectiv(luka),  sign_language(_),                 adjectives.                                 % sign language (luka = hand)
noun_compound_ideology  --> noun(nasin), adjectiv(sewi),  ideology(_),                      adjectives.
noun_compound_ideology  --> noun(nasin), adjectiv(pona),  ideology(_),                      adjectives.

noun_compound_person    --> noun(jan),                    resident(_),                      adjectives.
noun_compound_person    --> noun(jan),                    female_prominent_personage(_),    adjectives.
noun_compound_person    --> noun(jan),                    male_prominent_personage(_),      adjectives.
noun_compound_person    --> noun(jan),                    female_name(_),                   adjectives.
noun_compound_person    --> noun(jan),                    male_name(_),                     adjectives.
noun_compound_person    --> noun(meli),                   resident(_),                      adjectives.
noun_compound_person    --> noun(meli),                   female_prominent_personage(_),    adjectives.
noun_compound_person    --> noun(meli),                   female_name(_),                   adjectives.
noun_compound_person    --> noun(mije),                   resident(_),                      adjectives.
noun_compound_person    --> noun(mije),                   male_prominent_personage(_),      adjectives.
noun_compound_person    --> noun(mije),                   male_name(_),                     adjectives.
noun_compound_person    --> noun(jan),                                                      adjectives.
noun_compound_person    --> noun(meli),                                                     adjectives.
noun_compound_person    --> noun(mije),                                                     adjectives.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% verbs:

verb_transitive_compound   --> verb_pre_optional,   adverbs,   verb_transitive(_),      adverbs.

verb_intransitive_compound --> verb_pre_optional,   adverbs,   verb_intransitive(_),    adverbs.

verb_pre_optional          --> [].
verb_pre_optional          --> verb_pre(_).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% adjectives:

adjectives              --> adjectives_pure,     pronoun_optional.

adjectives_pure         --> [].                                                                                                        % no adjectiv
adjectives_pure         --> adjectiv(_).                                                                                               % only one adjectiv
adjectives_pure         --> adjectiv(A), adjectiv(B),                           {A\=B}.                                                % two adjectives
adjectives_pure         --> adjectiv(A), adjectiv(B), adjectiv(C),              {A\=B,A\=C,B\=C}.              


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% adverbs:

adverbs                  --> [].                                                                                                         % no adverb
adverbs                  --> adverb(_).                                                                                                  % only one adverb
adverbs                  --> adverb(A),    adverb(B),                { A\=B } .                                                          % several adverbs
adverbs                  --> adverb(A),    adverb(B),   adverb(C),   { A\=B, A\=C , B\=C} .                                              % max. 3 different adverbs


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Words 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

adjectiv(Adjectiv) --> [Adjectiv], { member(Adjectiv, [     
     ala,          % no, not, none, un- 
     ale,          % all, every, complete, whole  (ale = ali)
     ali,          % all, every, complete, whole  (ale = ali)
     awen,         % remaining, stationary, permanent, sedentary
     anpa,         % low, lower, bottom, down
     ijo,          % of something
     ike,          % bad, negative, wrong, evil, overly complex, (figuratively) unhealthy
     insa,         % inner, internal
     jaki,         % dirty, gross, filthy
     jan,          % human, somebody's, personal, of people
     jo,           % private, personal
     kama,         % coming, future
     kili,         % fruity
     kiwen,        % hard, solid, stone-like, made of stone or metal
     kon,          % air-like, ethereal, gaseous
     lape,         % sleeping, of sleep, dormant
     lawa,         % main, leading, in charge
     len,          % dressed, clothed, costumed, dressed up 
     lili,         % small, little, young, a bit, short, few, less
     lukin,        % visual(ly)
     mama,         % of the parent, parental, maternal, fatherly
     meli,         % female, feminine, womanly
     mije,         % male, masculine, manly
     moku,         % eating
     monsi,        % back, rear
     musi,         % artful, fun, recreational
     mute,         % many, very, much, several, a lot, abundant, numerous, more
     nasa,         % silly, crazy, foolish, drunk, strange, stupid, weird
     pakala,       % destroyed, ruined, demolished, shattered, wrecked
     pali,         % active, work-related, operating, working
     pana,         % generous
     poka,         % neighbouring
     pona,         % good, simple, positive, nice, correct, right
     sama,         % same, similar, equal, of equal status or position
     seli,         % hot, warm, cooked
     sewi,         % superior, elevated, religious, formal
     suli,         % big, tall, long, adult, important
     sona,         % knowing, cognizant, shrewd
     suno,         % sunny, sunnily
     tan,          % causal, 
     tawa,         % moving, mobile
     telo,         % wett, slobbery, moist, damp, humid, sticky, sweaty, dewy, drizzly
     toki,         % speaking, eloquent, linguistic, verbal, grammatical
     tomo,         % urban, domestic, household
     unpa,         % erotic, sexual
     utala,        % fighting
     wawa         % energetic, strong, fierce, intense, sure, confident
%     wile          % necessary
 ])
}.

adverb(Adverb) --> [Adverb], { member(Adverb, [
     ala,           % don't
     ale,           % always, forever, evermore, eternally (ale = ali)
     ali,           % always, forever, evermore, eternally (ale = ali)
     awen,          % still, yet
     ijo,           % of something
     ike,           % bad, negative, wrong, evil, overly complex, (figuratively) unhealthy
     jaki,          % dirty, gross, filthy
     jan,           % human, somebody's, personal, of people
     kama,          % coming, future
     kili,          % fruity
     kiwen,         % hard, solid, stone-like, made of stone or metal
     kon,           % air-like, ethereal, gaseous
     lape,          % asleep
     lawa,          % main, leading, in charge
     lili,          % small, little, young, a bit, short, few, less
     lukin,         % visual(ly)
     moku,          % eating
     musi,          % cheerfully
     mute,          % many, very, much, several, a lot, abundant, numerous, more
     nasa,          % silly, crazy, foolish, drunk, strange, stupid, weird
     pakala,        % destroyed, ruined, demolished, shattered, wrecked
     pali,          % actively, briskly
     pona,          % good, simple, positive, nice, correct, right
     sama,          % just as, equally, exactly the same, just the same, similarly
     seli,          % hot, warm, cooked
     sewi,          % superior, elevated, religious, formal
     suli,          % big, tall, long, adult, important
     sona,          % knowingly, deliberately, intentionally
     suno,          % sunny, sunnily
     tawa,          % moving, mobile
     telo,          % wett, slobbery, moist, damp, humid, sticky, sweaty, dewy, drizzly
     toki,          % speaking, eloquent, linguistic, verbal, grammatical
     tomo,          % urban, domestic, household
     unpa,          % erotic, sexual
     utala,         % fighting
     wawa          % strongly, powerfully
%     wile           % necessary
 ])
}.

interjection_word(Interjection_word) --> [Interjection_word], { member(Interjection_word, [
     a,            % ah, ha, uh, oh, ooh, aw, well (emotion word)
     ala,          % no!
     ike,          % oh dear! woe! alas!
     jaki,         % ew! yuck!
     mu,           % woof! meow! moo! etc. (cute animal noise)
     o,            % hey! (calling somebody's attention)
     pakala,       % damn! fuck!
     pona,         % great! good! thanks! OK! cool! yay!
     toki          % hello, hi, good morning,
 ])
}.

noun(Noun) --> [Noun], { member(Noun, [   
     ala,          % nothing, negation, zero
     ale,          % everything, anything, life, the universe
     ali,          % everything, anything, life, the universe
     anpa,         % bottom, lower part, under, below, floor, beneath
     awen,         % inertia, continuity, continuum, stay
     ijo,          % thing, something, stuff, anything, object
     ike,          % negativity, badness, evil
     ilo,          % tool, device, machine, thing used for a specific purpose
     insa,         % inside, inner world, centre, stomach
     jaki,         % dirt, pollution, garbage, filth
     jan,          % person, people, human, being, somebody, anybody
     jo,           % having
     kama,         % event, happening, chance, arrival, beginning
     ken,          % possibility, ability, power to do things, permission
     kili,         % fruit, pulpy vegetable, mushroom
     kiwen,        % hard thing, rock, stone, metal, mineral, clay
     kon,          % air, wind, smell, soul
     lape,         % sleep, rest
     lawa,         % head, mind
     len,          % clothing, cloth, fabric
     lili,         % smallness, youth, immaturity
     lukin,        % view, look, glance, sight, gaze, glimpse, seeing, vision, sight 
     ma,           % land, earth, country, (outdoor) area
     mama,         % parent, mother, father
     meli,         % woman, female, girl, wife, girlfriend
     mije,         % man, male, husband, boyfriend
     moku,         % food, meal
     monsi,        % back, rear end, butt, behind
     musi,         % fun, playing, game, recreation, art, entertainment
     mute,         % amount, quantity
     nasa,         % stupidity, foolishness, silliness, nonsense, idiocy, inanity, obtuseness, ninny, muddler
     nimi,         % word, name
     pakala,       % blunder, accident, mistake, destruction, damage, breaking
     pali,         % activity, work, deed, project
     pana,         % giving, transfer, exchange
     pipi,         % bug, insect, spider
     poka,         % side, hip, next to
     poki,         % container, box, bowl, cup, glass
     pona,         % good, simplicity, positivity
     sama,         % equality, parity, equity, identity, par, sameness
     seli,         % fire, warmth, heat
     sewi,         % high, up, above, top, over, on
     sona,         % knowledge, wisdom, intelligence, understanding
     suli,         % size
     suno,         % sun, light
     tan,          % origin, cause
     tawa,         % movement, transportation
     telo,         % water, liquid, juice, sauce
     toki,         % language, speech, tongue, lingo, jargon, 
     tomo,         % indoor constructed space, e.g. house, home, room, building
     unpa,         % sex, sexuality
     utala,        % conflict, disharmony, competition, fight, war, battle, attack, blow, argument, physical or verbal violence
     wawa          % energy, strength, power
%     wile          % desire, need, will
 ])
}.

preposition(Preposition) --> [Preposition], { member(Preposition, [
     kepeken,     % with
     lon,         % be (located) in/at/on
     poka,        % in the accompaniment of, with
     sama,        % like, as, seem
     tan,         % from, by, because of, since
     tawa         % to, in order to, towards, for, until
 ])
}.

pronoun(Pronoun) --> [Pronoun], { member(Pronoun, [
     mi,          % I, we (pronoun 1. person)
     sina,        % you (pronoun 2. person)
     ona,         % she, he, it, they (pronoun 3. person)
     ni           % this, that (pronoun determiner)
 ])
}.

separator(Separator) --> [Separator], { member(Separator, [
     e,             % introduces a direct object
     li,            % between any subject except mi and sina and its verb
     o,             % O (vocative or imperative)
     '.',           % At the end of a sentence.
     '!',           % At the end of an interjection.
     '?',           % At the end of a question.
     ':',           % Between an hint sentences and a sentences.
     ','            % comma
 ])
}.

verb_intransitive(Verb_intransitive) --> [Verb_intransitive], { member(Verb_intransitive, [
     awen,          % stay, wait,remain
     ike,           % to be bad, to suck
     kama,          % come, become, arrive, happen, pursue actions to arrive to (a certain state), manage to, start to
     ken,           % can, is able to, is allowed to, may, is possible
     kepeken,       % use
     lape,          % to sleep, to rest
     lon,           % be there, be present, be real/true, exist, be awake
     lukin,         % look, watch out, pay attention
     musi,          % play, have fun
     pakala,        % screw up, fall apart, break
     pali,          % act, work, function
     sewi,         % to get up 
     sona,          % know, understand
     tawa,          % go to, walk, travel, move, leave
     toki,          % talk, chat, communicate
     unpa           % have sex
 ])
}.

verb_transitive(Verb_transitive) --> [Verb_transitive], { member(Verb_transitive, [
     anpa,          % defeat, beat, vanquish, conquer
     awen,          % keep
     ijo,           % objectify
     ike,           % to make bad, to worsen, to have a negative effect upon
     jaki,          % pollute, dirty
     jan,           % personify, humanize, personalize
     jo,            % have, contain
     kama,          % bring about, summon
     ken,           % make possible, enable, allow, permit
     kiwen,         % to solidify, to harden, to petrify, to fossilize
%     lape,          % to sleep, to rest
     lawa,          % lead, control, rule, steer
     len,           % to wear, to be dressed, to dress
     lili,          % reduce, shorten, shrink, lessen
     lukin,         % see, look at, watch, read
     moku,          % eat, drink, swallow, ingest, consume
     musi,          % amuse, entertain
     mute,          % make many or much
     nasa,          % drive crazy, make weird
     nimi,          % to name
     pakala,        % screw up, fuck up, botch, ruin, break, hurt, injure, damage, spoil, ruin
     pali,          % do, make, build, create
     pana,          % give, put, send, place, release, emit, cause
     pona,          % improve, fix, repair, make good
     seli,          % heat, warm up, cook
     sewi,          % to lift
     sona,          % know, understand, know how to
     suli,          % enlarge, lengthen
     suno,          % to light, to illumine
     tawa,          % move, displace
     telo,          % water, wash with water
     toki,          % speak, talk, say, pronounce, discourse
     unpa,          % have sex with, sleep with, fuck
     utala,         % hit, strike, attack, compete against
     wawa,          % strengthen, energize, empower
     wile           % (verb transitive) to want, need, wish, have to, must, will, should
 ])
}.

verb_pre(Verb_pre) --> [Verb_pre], { member(Verb_pre, [
     kama,          % to become, to mange to
     ken,           % can, may
     lukin,         % to seek to, try to
     sona,          % to know how to
     wile           % to want, need, wish, have to, must, will, should
 ])
}.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial Words
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

continent(X)            --> continent_catalog(X), !.                                                                                    % The "!" stop the search after find something in *_catalog.
:- ['unofficial_words_continent_catalog.pro'].                                                                                          % Load the file with the *_catalog of unofficial words
continent(X)               --> word_unofficial(X).                                                                                      % If the word not in the catalog check it spelling only.

country(X)              --> country_catalog(X), !. 
:- ['unofficial_words_country_catalog.pro'].
country(X)              --> word_unofficial(X). 

city(X)                 --> city_catalog(X), !.
:- ['unofficial_words_city_catalog.pro'].
city(X)                    --> word_unofficial(X).

language(X)             --> language_catalog(X), !.
:- ['unofficial_words_language_catalog.pro'].
language(X)                 --> word_unofficial(X) .

sign_language(X)        --> language(X).                                                                                                % sign_language = language

ideology(X)             --> ideology_catalog(X), !.
:- ['unofficial_words_ideology_catalog.pro'].
ideology(X)                 --> word_unofficial(X) .

% community(X)            --> community_catalog(X), !.                                                                                  % In later lessions.
% :- ['unofficial_words_community_catalog.pro'].
% community(X)             --> word_unofficial(X).

resident(X)             --> country(X).                                                                                                 % resident = country

female_prominent_personage(X)  --> female_prominent_personage_catalog(X), !.
:- ['unofficial_words_female_prominent_personage_catalog.pro'].

male_prominent_personage(X)    --> male_prominent_personage_catalog(X), !.
:- ['unofficial_words_male_prominent_personage_catalog.pro'].

female_name(X)          --> female_name_catalog(X), !.
:- ['unofficial_words_female_name_catalog.pro'].
female_name(X)              --> word_unofficial(X) .

male_name(X)            --> male_name_catalog(X), !.
:- ['unofficial_words_male_name_catalog.pro'].
male_name(X)              --> word_unofficial(X) .


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial Words - check spelling

word_unofficial(Word,[Word|T],T) :-                                                                % This pure prolog rule make it possible to use DCG for spell check.    
     atom_length(Word,L),                                                                          % Get the lenght of the unofficial word.
     (L > 1, L =< 15),                                                                             % An unofficial word can have 2 to 15 characters. 
     atom_chars(Word,CL),                                                                          % atom_chars() convert an Atom (Word) in a list of character codes (CL). 
     word_unofficial_list(CL,[]), !.                                                               % The cut operator (!) mean: Don't try more than one true solution. 

word_unofficial_list    --> syllable_first, syllables.

syllables               --> [].                                                                    % No syllable.
syllables               --> syllable, syllables.                                                   % One or more syllabes.

syllable                --> consonant_small(Cs),                                                   % Each syllable consists of a consonant plus a vowel, plus an optional "n".
                            vowel_small(Vs),    
                            { not(invalid_letter_combination(Cs,Vs)) },                            % pure prolog rule to check valid letter combinations.
                            optional_n.
                                 
syllable_first          --> consonant_capital(Cs),                                                 % The first syllable of a word does not need to beginn with a consonant.
                            vowel_small(Vs),    
                            { not(invalid_letter_combination(Cs,Vs)) }, 
                            optional_n.

syllable_first          --> vowel_capital(_),  consonant_small(_).                                 % The first syllable of a word does not need to beginn with a consonant.
syllable_first          --> vowel_capital(_),  consonant_small(_),  vowel_small(_), optional_n.

optional_n              --> [].
optional_n              --> consonant_small('n').



invalid_letter_combination('T','i').                                                               % The syllables ti and tin become "si" and "sin".
invalid_letter_combination('t','i').
invalid_letter_combination('W','o').                                                               % The consonant "w" cannot appear before "o" or "u".
invalid_letter_combination('w','o').
invalid_letter_combination('W','u').
invalid_letter_combination('w','u').
invalid_letter_combination('J','i').                                                               % The consonant "j" cannot appear before "i".
invalid_letter_combination('j','i').


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Letters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Possible letters for unofficial words. The most frequently used letter is on the first position. 

consonant_capital(Consonant_capital) --> [Consonant_capital], { member(Consonant_capital, [ 'P', 'S', 'K', 'L', 'M', 'T', 'N', 'W', 'J' ])}.
consonant_small(Consonant_small)     --> [Consonant_small],   { member(Consonant_small,   [ 'p', 's', 'k', 'l', 'm', 't', 'n', 'w', 'j' ])}.
vowel_capital(Vowel_capital)         --> [Vowel_capital],     { member(Vowel_capital,     [ 'A', 'E', 'I', 'U', 'O' ])}.
vowel_small(Vowel_small)             --> [Vowel_small],       { member(Vowel_small,       [ 'a', 'e', 'i', 'u', 'o' ])}.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For a user friendly input:
:- ['check_grammar.pro']. 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Possible queries
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% letters:
?- consonant_capital(X,_,_).
?- consonant_small(X,_,_).
?- vowel_capital(X,_,_).
?- vowel_small(X,_,_).
?- invalid_letter_combination(X,Y). 
    
% catalogs with unofficial words:
?- continent_catalog(X,_,_).
?- country_catalog(X,_,_).
?- city_catalog(X,_,_).
?- ideology_catalog(X,_,_).
?- language_catalog(X,_,_).
?- female_name_catalog(X,_,_).
?- male_name_catalog(X,_,_).

% spell checks of unofficial words:
?- word_unofficial('Ontula',_,_).
?- word_unofficial('Anku',_,_).
?- word_unofficial('Papuwanijukini',_,_).
?- word_unofficial('Wuala',_,_).              % Wrong unoffical word.
?- word_unofficial('Eloti',_,_).              % Wrong unoffical word.


% Sentences with right grammar:

ma suli Elopa li pona.                                % "Elopa" is in the catalog.
ma Elopa li pona.
ma suli Wawawa li ike.                                % "Wawawa" is not in catalog but it has the right spelling.
ma Kanata li pona.                                    % "Kanata" is in the catalog.
ma Lanlan li nasa.                                    % "Lanlan" is not in catalog but it has the right spelling.
ma Italija li pona lukin.
mi wile tawa ma Tosi.
ma tomo Lantan li suli.                               % "Lantan" is in the catalog.
ma tomo Pelin li pona.                          
ma tomo Alenta li pona.
ma tomo Loma li pona.
mi kama tan ma tomo Pelin.
toki Inli li pona.                                    % "Inli" is in the catalog.
toki Epelanto li pona.
toki Insisi li nasa.                                  % "Insisi" is not in catalog but it has the right spelling.
jan Kanata li pona.                                   % "Kanata" is in the catalog.
jan Mesiko li pona.
jan Sinsin li nasa.
jan Lisa li pona.
jan Pentan li pana e sona tawa mi.
jan Mewi li toki tawa mi.
jan Mawija li pona.                                 % "Maria Magdalena" in unofficial_words_female_prominent_personage_catalog
meli Mawija li pona.
jan Santa li pona.                                  % "Santa Claus" in unofficial_words_male_prominent_personage_catalog
mije Santa li pona.
mije Tosi li pona.
jan Nesan li musi.
jan Eta li jan unpa.
jan Lopa li awen.
mi jan Pepe.
nimi mi li jan Pepe pona.
meli Italija li pona.
mije Epanja li pona.
jan Susan li nasa.
jan Ken o, pipi li lon len sina.
jan Keli o, sina pona lukin.
jan Mawen o, sina wile ala wile moku?
jan Tepani o, sina ike tawa mi.
jan Epi o a!
o pali!
o awen!
o lukin e ni!
o tawa ma tomo poka jan pona sina.
jan San o tawa tomo sina!
jan Ta o toki ala tawa mi!
jan Sesi o moku e kili ni!
mi mute o tawa.
mi mute o musi.
mama meli li meli.
mama mije li mije.
pona!
ike!
pakala!
mu.
a!
a a a!
a a a.
toki!
jan Lisa o toki.
suno pona!
lape pona!
moku pona!
mi tawa.
tawa pona!
kama pona!
musi pona!
o tawa!
o tawa.
mama meli o awen.
mi kama tan ma Elopa.
ni li musi.
jan Lisa o, toki.
pakala!
mi wile tawa ma Oselija.
mi tawa!
mu.
mi wile kama sona e toki Inli.
mi wile kama lon.
jan Ana o pana e moku tawa mi.
o tawa musi poka mi.
jan Mose o lawa e mi mute tawa ma.
pona.
tawa pona!
tawa pona.
mi wile wile e ni: mi lon.
nimi mi li Lope.                                                        % It is not really correct.
nimi mi li jan Ken.


% Sentences with wrong grammar:

?- check_grammar.
|: mi wile wile wile wile wile wile wile ni: mi lon.
false.

?- check_grammar.
|: mi wile wile wile ni.
false.


% To Do

ma tomo Linnula li pakala.    % 'Linnula' is not proper spelling final /n/ can't be before initial /n/ or /m/.
*/

To Do: Rules for unofficial words with two or more words.

Include Files for Unofficial Words

unofficial_words_continent_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Continents
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

continent_catalog(Continent_catalog) --> [Continent_catalog], { member(Continent_catalog, [
     'Amelika',       % Americas, North America: 'Amelika lete', South America: 'Amelika seli'
     'Antasika',      % Antarctica
     'Apika',         % Africa
     'Asija',         % Asia
     'Elopa',         % Europe
     'Osejanija'      % Oceania
 ])
}.

/*
?- continent_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_country_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Countries
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

country_catalog(Country_catalog) --> [Country_catalog], { member(Country_catalog, [  
     'Akanisan',    % Afghanistan
     'Alan',        % Ireland
     'Alensina',    % Argentina
     'Anku',        % Korea
     'Antola',      % Andorra
     'Awisi',       % Haiti
     'Ekato',       % Ecuador
     'Elena',       % Greece
     'Epanja',      % Spain
     'Esi',         % Estonia
     'Esuka',       % Basque Country
     'Ilakija',     % Iraq
     'Ilan',        % Iran
     'Inli',        % England
     'Intonesija',  % Indonesia
     'Isale',       % Israel
     'Isilan',      % Iceland
     'Italija',     % Italy
     'Jamanija',    % Yemen
     'Kalalinuna',  % Greenland
     'Kana',        % Ghana
     'Kanata',      % Canada
     'Kanse',       % France
     'Katala',      % Qatar
     'Katelo',      % Georgia
     'Katemala',    % Guatemala
     'Kenata',      % Grenada
     'Kepeka',      % Quebec
     'Keposi',      % Cyprus
     'Kilipasi',    % Kiribati
     'Kinla',       % Wales
     'Konko',       % Congo, Dem. Rep.  (pi ma tomo Kinsasa), Congo, P. Rep. (pi ma tomo Pasawi)
     'Kosalika',    % Costa Rica
     'Kosiwa',      % Côte d'Ivoire
     'Kupa',        % Cuba
     'Kusala',      % Gujarat
     'Kuwasi',      % Kuweit
     'Lanka',       % Sri Lanka
     'Lesi',        % Brittany
     'Lipija',      % Libya
     'Lisensan',    % Liechtenstein
     'Lomani',      % Romania
     'Losi',        % Russia
     'Lowasi',      % Croatia
     'Lowenki',     % Slovakia
     'Lowensina',   % Slovenia
     'Lunpan',      % Lebanon
     'Lusepu',      % Luxemburg
     'Luwanta',     % Rwanda
     'Maketonija',  % Macedonia
     'Malakasi',    % Madagascar
     'Malasija',    % Malaysia
     'Malawi',      % Malawi
     'Mali',        % Mali
     'Malipe',      % Morocco
     'Masija',      % Hungary
     'Masu',        % Egypt
     'Mesiko',      % Mexico
     'Mewika',      % USA, American
     'Mijama',      % Myanmar
     'Motowa',      % Moldova
     'Mulitanija',  % Mauritania
     'Namipija',    % Namibia
     'Naselija',    % Nigeria
     'Netelan',     % Netherlands
     'Nijon',       % Japan
     'Nise',        % Niger
     'Nosiki',      % Norway
     'Nusilan',     % New Zealand
     'Ontula',      % Honduras
     'Osalasi',     % Austria
     'Oselija',     % Australia
     'Pakisan',     % Pakistan
     'Palakawi',    % Paraguay
     'Palani',      % Bahrein
     'Palata',      % India
     'Panama',      % Panama
     'Panla',       % Bangladesh
     'Papeto',      % Barbados
     'Papuwanijukini',  % Papua New Guinea
     'Pasila',      % Brasil
     'Pawama',      % Bahamas
     'Pelalusi',    % Belarus
     'Pelu',        % Peru
     'Pemuta',      % Bermuda
     'Penesuwela',  % Venezuela
     'Penin',       % Benin
     'Pesije',      % Belgium
     'Pilipina',    % Philipines
     'Pilisin',     % Palestine
     'Pisi',        % Fiji
     'Piten',       % Britain, UK
     'Pokasi',      % Bulgaria
     'Posan',       % Bosnia and Herzegovina
     'Posuka',      % Poland
     'Potuke',      % Portugal
     'Samalino',    % San Marino
     'Sameka',      % Jamaica
     'Samowa',      % Samoa
     'Sasali',      % Algeria
     'Sawa',        % Java
     'Sawasi',      % Swaziland
     'Seki',        % Czech (Republic)
     'Seneka',      % Senegal
     'Setapika',    % South Africa
     'Sile',        % Chile
     'Sinita',      % Trinidad and Tobago
     'Sipusi',      % Djibouti
     'Sonko',       % China, Chinese
     'Sopisi',      % Serbia
     'Sukosi',      % Scotland
     'Sulija',      % Syria
     'Sumi',        % Finland
     'Sutan',       % Sudan
     'Suwasi',      % Switzerland
     'Tansi',       % Denmark
     'Tawi',        % Thailand
     'Toko',        % Togo
     'Tominika',    % Dominican Republic
     'Tona',        % Tonga
     'Tosi',        % Germany
     'Tuki',        % Turkey
     'Tunisi',      % Tunisia
     'Tuwalu',      % Tuvalu
     'Ukanta',      % Uganda
     'Ukawina',     % Ukraine
     'Ulukawi',     % Uruguay
     'Uman',        % Oman
     'Utun',        % Jordan
     'Wanuwatu',    % Vanuatu
     'Wasikano',    % Vatican
     'Wensa',       % Sweden
     'Wije'         % Vietnam
 ])
}.

/*
?- country_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_city_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Cities
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

city_catalog(City_catalog) --> [City_catalog], { member(City_catalog, [  
     'Akajela',      % Al-Qahirah, Kairo (Capital of Egypt) 
     'Alana',        % Atlanta (USA) 
     'Alawa',        % Ottawa (Capital of Canada) 
     'Alenta',       % Atlanta (USA) 
     'Alipasi',      % Halifax (Canada) 
     'Anpu',         % Hamburg (Germany) 
     'Ansetan',      % Amsterdam (Capital of Netherlands) 
     'Asina',        % Athen (Capital of Greece) 
     'Ele',          % Los Angeles (USA) 
     'Esupo',        % Espoo (Finland) 
     'Iwesun',       % Hilversum (Netherlands)  
     'Kakawi',       % Calgary (Canada) 
     'Kenpisi',      % Cambridge (USA, UK) 
     'Kunte',        % Krung Thep; Bangkok (Capital of Thailand) 
     'Lantan',       % London (Caiptal of UK)
     'Lesinki',      % Helsinki; Helsingfors (Capital of Finnland) 
     'Loma',         % Rome (Capital of Italy) 
     'Manten',       % Moncton (Canada) 
     'Mesiko',       % Mexiko-Stadt (Capital of Mexiko) 
     'Milano',       % Milan (Italy) 
     'Minsen',       % Munich (Germany) 
     'Monkela',      % Montreal (Canada) 
     'Napoli',       % Napoli, Neapel (Italy) 
     'Nujoka',       % New York City (USA) 
     'Osaka',        % Osaka (Japan)  
     'Paki',         % Paris (Capital of France) 
     'Pasen',        % Boston (USA) 
     'Pelin',        % Berlin (Capital of Germany) 
     'Peminan',      % Birmingham (England)  
     'Pesin',        % Beijing; Peking (Capital of China) 
     'Pilense',      % Florenz (Italy) 
     'Polan',        % Portland (USA) 
     'Putapesi',     % Budapest (Capital of Hungary) 
     'Sakata',       % Jakarta (Capital of Indonesia) 
     'Sanpansiko',   % San Francisco (USA) 
     'Sawi',         % Sackville (Canada) 
     'Sene',         % Genf (Switzerland) 
     'Sensan',       % St. John's (Canada) 
     'Sesija',       % Shediac (Canada) 
     'Sije',         % Dieppe (Canada) 
     'Solu',         % Seoul (Capital of South Korea) 
     'Tanpele',      % Tampere (Finland) 
     'Telawi',       % Tel Aviv (Israel) 
     'Tokijo',       % Tokyo; Tokio (Capital of Japan)  
     'Towano',       % Toronto (Canada) 
     'Tuku',         % Turku (Finland) 
     'Wankuwa',      % Vancouver (Canada) 
     'Wenesija'      % Venedig (Italy) 
 ])
}.

/*
city_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof


unofficial_words_community_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Communities
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

community_catalog(Community_catalog) --> [Community_catalog], { member(Community_catalog, [  
     'Neje'       % Nerds     
 ])
}.

/*
?- community_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_language_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Language
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

language_catalog(Language_catalog) --> [Language_catalog], { member(Language_catalog, [  
     'Alan',        % Irish Gaelic
     'Alapi',       % Arab; Arabic; Arabian 
     'Anku',        % Korean
     'Apikan',      % Afrikaans 
     'Awasa',       % Hausa 
     'Awisi',       % Haitian Creole
     'Elena',       % Greek
     'Epanja',      % Spanish
     'Epelanto',    % Esperanto (constructed language)
     'Esi',         % Estonian
     'Esuka',       % Basque
     'Ewantalu',    % Ewantal 
     'Ilan',        % Persian
     'Inli',        % English
     'Inli pona',   % Basic English (constructed language)
     'Insi',        % Hindi 
     'Intelinka',   % Interlingua (constructed language)
     'Intonesija',  % Indonesian
     'Inu',         % Inupiaq, Inuktitut, Eskimo 
     'Ipo',         % Igbo
     'Isilan',      % Icelandic
     'Italija',     % Italian
     'Ito',         % Ido (constructed language)
     'Iwisi',       % Hebrew
     'Jolupa',      % Yoruba 
     'Kalalinuna',  % Greenlandic
     'Kalike',      % Schottisches Gaelik 
     'Kanse',       % French
     'Kantun',      % Kantonesisch 
     'Katelo',      % Georgian
     'Kinla',       % Welsh
     'Kisawili',    % Suaheli, Swahili 
     'Kusala',      % Gujarati
     'Kuwenja',     % Quenya, Elvish 
     'Lesi',        % Breton
     'Lolan',       % Loglan (constructed language)     
     'Loma',        % Latin 
     'Lomani',      % Romanian
     'Losi',        % Russian
     'Losupan',     % Lojban (constructed language)
     'Lowasi',      % Croatian
     'Lowenki',     % Slovak
     'Lowensina',   % Slovenian
     'Lunasimi',    % Quechua 
     'Lusepu',      % Luxemburg
     'Maketonija',  % Macedonia
     'Malakasi',    % Malagasy
     'Malasija',    % Malay
     'Malasi',      % Marathi 
     'Masija',      % Hungarian
     'Netelan',     % Dutch
     'Nijon',       % Japanese
     'Nosiki',      % Norwegian Bokmål
     'Nosiki sin',  % Norwegian Nynorsk 
     'Olapu',       % Volapuek (constructed language) 
     'Panla',       % Bengali
     'Pansapi',     % Punjabi 
     'Pasiki',      % Fyksian 
     'Pasuto',      % Pashto 
     'Pelalusi',    % Belarussian
     'Pilipina',    % Tagalog
     'Pokasi',      % Bulgarian
     'Posan',       % Bosnian
     'Posuka',      % Polish
     'Potuke',      % Portugese
     'Sameka',      % Jamaican Patoi
     'Sami',        % Laplander 
     'Sankitu',     % Sanskrit 
     'Sawa',        % Javanese
     'Sawasi',      % Swaziland
     'Seki',        % Czech
     'Sinan',       % Klingonisch (constructed language) 
     'Sonko',       % Chinese
     'Sopisi',      % Serbian
     'Sukosi',      % Scots
     'Sumi',        % Finnish
     'Tamasiko',    % Berber, Tamazight 
     'Tami',        % Tamil 
     'Tansi',       % Danish
     'Tawi',        % Thai
     'Teluku',      % Telugu 
     'Tona',        % Tongan
     'Tosi',        % German
     'Tuki',        % Turkish
     'Ukawina',     % Ukrainian
     'Utu',         % Urdu 
     'Wensa'        % Swedish
 ])
}.

/*
?- language_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_ideology_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Ideologies, Religions
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ideology_catalog(Ideology_catalog) --> [Ideology_catalog], { member(Ideology_catalog, [  
     'Jawatu',      % Judaism
     'Juju',        % Universalism  
     'Kolisu',      % Christianity     
     'Latapali',    % Rastafarianism 
     'Patapali',    % Pastafarianism
     'Puta',        % Buddhism 
     'Silami'       % Islam 
 ])
}.

/*
?- ideology_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_female_prominent_personage_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Female Prominent Personage
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
% http://tokipona.net/tp/Transliterate.aspx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

female_prominent_personage_catalog(Female_prominent_personage_catalog) --> [Female_prominent_personage_catalog], { member(Female_prominent_personage_catalog, [  
     'Anela Melike',       % Angela Merkel
     'Mawija',             % Maria Magdalena
     'Mawija  Makalena'    % Maria Magdalena
 ])
}.

/*
?- female_prominent_personage_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_male_prominent_personage_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Male Prominent Personage
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
% http://tokipona.net/tp/Transliterate.aspx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

male_prominent_personage_catalog(Male_prominent_personage_catalog) --> [Male_prominent_personage_catalog], { member(Male_prominent_personage_catalog, [ 
     'Alipe Eintein',      % Albert Einstein
     'Kae Mae',            % Karl Marx
     'Mose',               % Moses 
     'Santa',              % Santa Claus 
     'Wasintan'            % Washington
 ])
}.

/*
?- male_prominent_personage_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_female_name_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Female Names
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
% http://tokipona.net/tp/Transliterate.aspx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

female_name_catalog(Female_name_catalog) --> [Female_name_catalog], { member(Female_name_catalog, [  
     'Ana',         % Ana, Anna
     'Epi',         % Abbie
     'Eta',         % Heather 
     'Keli',        % Kelly, Keli 
     'Lisa',        % Lisa
     'Mewi',        % Mary
     'Sesi',        % Jessie
     'Susan',       % Susan
     'Tepani'       % Stefanie, Steffany
 ])
}.

/*
?- female_name_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

unofficial_words_male_name_catalog.pro
Source code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Unofficial words - Male Names
% Include File
% by Robert Warnke http://rowa.giso.de
% released under the GNU General Public License 
%
% http://tokipona.net/tp/Transliterate.aspx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

male_name_catalog(Male_name__catalog) --> [Male_name__catalog], { member(Male_name__catalog, [  
     'Ken',         % Ken
     'Lopa',        % Robert
     'Lope',        % Robert 
     'Mawen',       % Marwin
     'Nesan',       % Nathan
     'Nikita';      % Nikita
     'Pawe',        % Paul
     'Pentan',      % Brandon
     'Pepe',        % Pepe
     'Ta',          % Todd
     'San'          % John
 ])
}.

/*
?- male_name_catalog(X,_,_).
*/

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eof

 


rowa.giso.de | contact | Berlin (Good Old Europe)
This unofficial fan site by Robert Warnke is based on the official Toki Pona book and website: tokipona.org