From 22b78081bdbbc284c8234839ed48ffeecf444f04 Mon Sep 17 00:00:00 2001 From: tess Date: Mon, 2 May 2022 18:52:19 +0200 Subject: [PATCH] aaaa --- .gitignore | 1 + Cargo.lock | 302 ++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 10 ++ nimi | 273 +++++++++++++++++++++++++++++++++++++++++++ nimitu.txt | 105 +++++++++++++++++ src/main.rs | 17 +++ src/nimi_sin.rs | 48 ++++++++ src/toki.rs | 54 +++++++++ 8 files changed, 810 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 nimi create mode 100644 nimitu.txt create mode 100644 src/main.rs create mode 100644 src/nimi_sin.rs create mode 100644 src/toki.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..79e2f26 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,302 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "ilo_pali_pi_nimi_sin" +version = "0.1.0" +dependencies = [ + "markov", + "rand 0.8.5", +] + +[[package]] +name = "indexmap" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "libc" +version = "0.2.125" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" + +[[package]] +name = "linked-hash-map" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" + +[[package]] +name = "markov" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6ad68e26d51a9558f65e93b9795c9422630d0932717a3235668bb9ab71e3fd" +dependencies = [ + "getopts", + "itertools", + "petgraph", + "rand 0.7.3", + "serde", + "serde_derive", + "serde_yaml", +] + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" + +[[package]] +name = "proc-macro2" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.6", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "ryu" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + +[[package]] +name = "serde" +version = "1.0.137" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" + +[[package]] +name = "serde_derive" +version = "1.0.137" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_yaml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0" +dependencies = [ + "indexmap", + "ryu", + "serde", + "yaml-rust", +] + +[[package]] +name = "syn" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "unicode-width" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..5076a2b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "ilo_pali_pi_nimi_sin" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +rand = "0.8.5" +markov = "1.1.0" diff --git a/nimi b/nimi new file mode 100644 index 0000000..98c5a8a --- /dev/null +++ b/nimi @@ -0,0 +1,273 @@ +to analyze the arrangement and connection of words in a sentence or sentence part; +to understand or explain the sense or intention of usually in a particular way or with respect to a given set of circumstances; +to construe a sentence or sentence part especially in connection with translating; +an act or the result of construing especially by piecemeal translation; +the unified control of all aspects of production from raw materials through distribution of finished products; +control gained by enforcing obedience or order, orderly or prescribed conduct or pattern of behavior; +training that corrects, molds, or perfects the mental faculties or moral character; +a field of study; +a rule or system of rules governing conduct or activity; +to punish or penalize for the sake of enforcing obedience and perfecting moral character; +to train or develop by instruction and exercise especially in self-control; +to bring (a group) under control, to impose order upon; +to become pregnant; +to cause to begin; +to take into one's mind; +to form a conception of; +to understand; +to have an opinion; +a faculty member of the highest academic rank at an institution of higher education; +a teacher at a university or college; +one that teaches or professes a special knowledge of an art; +a word or expression that has a precise meaning in some uses; +expression of a specified kind; +a limited extent of time; +the time for which something lasts; +to take to or upon oneself; +to place oneself in; +to pretend to have or be; +to take as granted or true; +to take over; +to put on; +to receive; +to take into use; +to exhibit; +to offer for sale; +to perform; +to point out; +direct attention to; +to set forth, declare, allege, plead; +to demonstrate or establish by argument or reasoning, inform, instruct; +to present for judging in a show; +to appear in a particular way, seem, appear; +to exhibit one's artistic work; +to tell someone to get out; +natural scenery; +the inherent character or basic constitution of a person or thing; +humankind's original or natural condition, a simplified mode of life resembling this condition; +a kind or class usually distinguished by fundamental essential characteristics; +the physical constitution or drives of an organism; +the genetically controlled qualities of an organism; +a creative and controlling force in the universe; +an inner force (instinct, appetite, desire) or the sum of such forces in an individual; +spontaneus attitude; +stretched tight, made taut, rigid; +feeling or showing nervous, tension, marked by strain or suspense; +produced with the muscles involved in a relatively tense state; +a distinction of form in a content word to express distinctions of time or duration of the action or state it denotes; +a set of inflectional forms of a content word that express distinctions of time; +an inflectional form of a content word expressing a specific time distinction; +to have possession or ownership of or have at one's disposal; +to have as a privilege or position of responsibility; +to have as a mark of distinction; +to keep under restraint; +to prevent free expression of; +to prevent from some action; +to keep back from use; +to delay temporarily the handling of; +to make liable or accountable or bound to an obligation; +to have or maintain in the grasp; +to support in a particular position or keep from falling or moving; +to bear the pressure of; +support, aim, point; +to prevent from leaving or getting away; +to avoid emitting or letting out; +to restrain as a captive; +to have strong appeal to; +to enclose and keep in a container or within bounds; +to be able to consume easily or without undue effect; +to have as a principal or essential feature or attribute; +to have in store; +to have in the mind or express as a judgment or opinion; +to think of in a particular way; +to cover a part of the body with one or both hands for protection or comfort; +to maintain position, refuse to give ground; +to continue in the same way or to the same degree; +intense hostility and aversion, extreme dislike or disgust; +a systematic and especially politically exploited expression of hatred; +an object of hatred; +to regard with active hostility, to have a strong aversion to; +to find very distasteful; +a large organized body of armed personnel trained for war; +a unit capable of independent action; +a great multitude, multiple, many; +a body of persons organized to advance a cause; +a lightning strike; +a wood or metal bar or rod used to fasten a door; +the part of a lock that is shot or withdrawn by the key; +a roll of cloth or wallpaper of specified length; +to move suddenly or nervously; +to move or proceed rapidly; +to break away from control or set course; +to dart off or away; +to break away from or oppose one's previous affiliation; +to secure with a bolt; +to attach or fasten with bolts; +to eat hastily or without chewing; +to say impulsively; +in an erect or straight-backed position; +a building for religious practices, a place devoted to a special purpose; +the flattened space on each side of the forehead; +one of the side supports of a pair of glasses; +the right or left part of the wall or trunk of the body; +a place or direction with respect to a center or to a line of division; +one of the longer bounding surfaces or lines of an object especially contrasted with the ends; +either surface of a thin object; +the space beside one; +an area next to something; +a slope considered as opposed to another slope; +the attitude or activity of one person or group with respect to another; +a position that is opposite to or contrasted with another; +situated on the side, of or relating to the side; +directed toward or from the side; +additional to the main portion; +to agree with, to be side by side with; +to set or put aside; +to furnish with sides or siding; +to provide with visual features intended to explain or decorate; +to make clear by giving an example, to clarify, to show clearly; +a mental grasp, comprehension; +the power to make experience intelligible by applying concepts and categories; +a mutual agreement not formally entered into but in some degree binding on each side; +friendly or harmonious relationship; +an agreement of opinion or feeling; +endowed with understanding, tolerant, sympathetic; +empath; +a child's bedroom; +something that fosters, develops, or promotes; +a place in which people are trained or educated; +a place where young animals grow or are cared for; +a means of testing; +a series of questions or exercises for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group; +a procedure used to identify or characterize a substance or constituent; +a critical examination, observation, or evaluation, a basis for evaluation; +an ordeal or oath required as proof of conformity with a set of beliefs; +to put to test or proof; +to require a doctrinal oath of; +to undergo a test; +to be assigned a standing or evaluation on the basis of tests; +to apply a test as a means of analysis or diagnosis; +lacking a natural, usual, or appropriate covering; +lacking any tool or weapon; +open to view, exposed; +unfurnished or scantily supplied, destitute; +having nothing left over; +devoid of amplification or adornment; +to make or lay something bare; +one that labors; +a person who does physical work for wages; +moral principles, teachings, or conduct; +the mental and emotional condition of an individual or group; +a sense of common purpose; +the level of individual psychological well-being based on such factors a sense of purpose and confidence in the future; +the main trunk of a plant; +a plant part that supports another; +the main upright member at the bow of a ship; +the bow or prow of a ship; +a line of ancestry; +the part of an inflected word that remains after the inflected part is removed; +to make headway against something; +to check or go counter to something adverse; +to remove the stem from; +to stop or dam up; +to restrain or check oneself; +to slide the heel of one ski or of both skis outward usually in making or preparing to make a turn; +having an imperfection; +at a soft volume; +a musical instrument having steel wire strings that sound when struck by felt-covered hammers operated from a keyboard; +the process of becoming pregnant; +the capacity or process of forming or understanding ideas or abstractions or their symbols; +a general idea; +a complex product of abstract or reflective thinking; +the sum of a person's ideas and beliefs concerning something; +the originating of something in the mind; +extent or lapse of time; +an action or process of solving a problem; +the answer to a problem; +an act or the process by which a solid, liquid, or gaseous substance is homogeneously mixed with a liquid or sometimes a gas or solid; +the condition of being dissolved; +a bringing or coming to an end or into a state of discontinuity; +a book for notes; +a particularly small or light laptop; +to suffocate my submersion; +to submerge; +to soak, drench, or cover with a liquid; +to engage deeply and strenuously; +to cause a sound not to be heard by making a loud noise; +to drive out, overwhelm; +to strike something with a sharp blow; +to collide with something; +a usually enclosed wagon or motortruck used for transportation of goods or animals; +a multipurpose enclosed motor vehicle having a boxlike shape, rear, or side doors, and side panels often with windows; +emphasis, emotion or confirmation; +non-cute animal; +used to form a yes-no question; +to hunt, forage, seek; +to try to, attempt; +to continue to, to keep; +between multiple subjects; +coordinates modifiers in a pi-phrase or objects of a preposition; +thing, phenomenon, object, matter; +internal organ, stomach; +human being, person, somebody; +yellow, yellowish; +fish, marine animal, sea creature; +to produce a sound; +recite, utter aloud; +to become, manage to, succeed in; +to be able to, be allowed to, can, may, possible; +to use, with, by means of; +hard object, metal, rock, stone; +hidden reality, unseen agent; +of or relating to the LGBT+ community; +pay attention to, obey; +between the context phrase and the main sentence; +blue, green; +cover, layer of privacy; +between any subject except mi alone or sina alone and its verb; +to introduce a new verb for the same subject; +long and flexible thing; +flat object; +red, reddish; +located at, present at, real, true, existing; +affirmative response; +five; +touch or feel physically, interact, press; +look for, seek; +to try to; +large domesticated animal; +wife; +animal noise or communication; +non-speech vocalization; +moon, night sky object, star; +glow, glowing light, light in the dark; +love, have compassion for, respect, show affection to; +turn on; +do, take action on, work on; +long hard thing; +used to divide a second noun group that describes a first noun group; +introduces a genitive noun; +an emotion, a direct experience; +along with, beside; +cooking element, chemical reaction, heat source; +outer form, outer layer; +area above, highest part, something elevated; +body of a person or animal, physical state, torso; +round or circular thing; +know, be skilled in, be wise about, have information on; +to know how to; +horizontal surface, thing to put or rest something on; +from the perspective of; +going to; +car; +have sexual relations with; +to show contempt by turning up the nose, or by a particular facial expression; +to insinuate contempt by a covert expression; +to speak derisively; +to show mirth awkwardly; +to speak in a loud distinct voice so as to be heard at a distance; +to make a request or demand; +to utter a characteristic note or cry; +to speak to or attempt to reach someone by means of a call; +to make a demand in card games; +to make a brief visit; diff --git a/nimitu.txt b/nimitu.txt new file mode 100644 index 0000000..f01effd --- /dev/null +++ b/nimitu.txt @@ -0,0 +1,105 @@ +emphasis, emotion or confirmation; cross-like shape, intersection, overlap +non-cute animal, reptile, amphibian; general interjection, context-dependent; no, not, zero +used to form a yes-no question; nothing; to hunt, forage, seek; (pre-verb) try to, attempt +all; abundant, countless, bountiful, every, plentiful +abundance, everything, life, universe; one hundred; between the main sentence and the context phrase +bowing down, downward, humble, lowly, dependent; different, altered, changed, other +bottom, lower part, under, below, floor, beneath; or; guilt, shame, shun, stigma, disgrace +low, lower, bottom, down; choose, decide; to accuse, to single out, to expose, to dishonor, to embarrass +bump, knock, jolt; enduring, kept, protected, safe, waiting, staying; (pre-verb) to continue to, to keep +before the direct object; cross-like shape, intersection, overlap; between multiple subjects +coordinates modifiers in a pi-phrase or objects of a prepostion; space, place, distance, size +epic, cool, awesome, amazing; market, shop, fair, bazaar; beyond, exceeding, outside of, more than +business transaction; stone, gravel, rock, pebble, lava, magma; he, she, it, they +thing, phenomenon, object, matter; bad, negative; tool, implement, machine, device +non-essential, irrelevant; two; centre, content, inside, between +complicated, complex; internal organ, stomach; to think, to imagine, to believe, to remember, to recall +a thought, an idea; Schadenfreude, indirect insult or disrespect, shade +disgusting, obscene, sickly, toxic, unclean, unsanitary; one hundred; foot; yummy +eliciting or stimulating a positive sensory experience; human being, person, somebody +reflect, resound, mirror, be on the opposite/polar end of; a particular group of people; one +indicating excitement; yellow, yellowish; to have, carry, contain, hold; goose, goose noise +dream; nine; fish, marine animal, sea creature; to produce a sound; pirate noise +recite, utter aloud; arriving, coming, future, summoned; anarchy, uprising, revolt, rebellion +(pre-verb) to become, manage to, succeed in; with, among, in the company of; extrusion, protrusion, hill, mountain, button +brown, gray; plant, vegetation; acknowledgement or acceptance; possible +herb, leaf; to be able to, be allowed to, can, may; to use, with, by means of +queer, LGBT+; relative clause marker; raccoons, coatis, kinkajous, olingos, ringtails, cacomistles +raccoons, weasels, otters, skunks, red pandas; spiky, sharp, angle, point, triangular +fruit, vegetable, mushroom; indeed, too, also, as well; split, cut, slice, sever +sharp; cat; hard object, metal, rock, stone; clay, clinging form, dough, semi-solid, paste, powder +to speak a non-Toki Pona language in an environment where Toki Pona is more appropriate +air, breath, essence, spirit; animacy, life, autonomy; to notify, to let know +hidden reality, unseen agent; autonomous being, living thing, organism; guard, protect, defend, shield, brace, fortify from outside +alive, animate, dynamic; colorful, pigmented, painted; LGBT+ +to animate, to bring to life; casual expression of appreciation or acknowledgement; community, company, group, nation, society, tribe +cool, fine, okay; six; laughter, chuckle, laugh, comedy, humor +ear; between the context phrase and the main sentence; sleeping, resting +to hear, listen; blue, green; head, mind +pay attention to, obey; take, seize, catch, receive, get; to control, direct, guide, lead, own, plan, regulate, rule +stairs, square, block, corner, cube; cloth, clothing, fabric, textile; zero; cold, cool +cover, layer of privacy; uncooked, raw; between any subject except mi alone or sina alone and its verb +to introduce a new verb for the same subject; to agree; collection, assortment, menagerie, arrangement, handful, harvest +with laughter; seven; little, small, short; long and flexible thing +few; a bit; young; cord, hair, rope, thread, yarn +line, connection; flat object; before the prepositional phrase +network, internet, connection; book, document, card, paper, record, website +weave, braid, interlace; red, reddish; limb; six +located at, present at, real, true, existing; arm, hand, tactile organ +affirmative response; touch/feel physically, interact, press; five +eye; woman, female, feminine person; parent, ancestor; caretaker, sustainer +look at, see, examine, observe, read, watch; capybara; sapphic, lesbian, wlw +I, me, we, us +outdoors, world; look for, seek; door, hole, orifice, window +(pre-verb) try to; earth, land; money, cash, savings, wealth +old, aged, ancient; question particle modifier; creator, originator; country, territory +soil; middle, medium, mediocre; man, male, masculine person +gay, mlm; rat, mouse, squirrel, rabbit, rodent; husband +neither one not the other, neither fully is nor isn't; medicine, medical; to eat, drink, consume, swallow, ingest; dead, dying +a squishy animal; wife; back, behind, rear; fear, dread; animal noise or communication; moon, night sky object, star +snail, slug, or sponge; artistic, entertaining, frivolous, playful, recreation; animal noise or communication; many, a lot, more, much, several, very +monster, predator; indicates thinking, pondering, recognition, agreement, or humming; pizza; embellishment, spice; extra, additional +ordinal number; glow, glowing light, light in the dark; unusual, strange; threat, danger +way, custom, doctrine, method, path, road; numbers; relationship, correlation, commonality; silly +quantity; four; transparent material/object, lack of privacy; bump, button, hill, mountain, nose, protuberance +that, this; name, word; meow, feline sound; cross, knot, junction, intersection; three (or more), 20 +foot, leg, organ of locomotion; new; five; to make clear, to make transparent, to remove obstructions; to overlap, to fold +newer; drunk, intoxicated; hey!; acknowledgement or acceptance; boomer, Baby Boomer, inconsiderate elder +clear, transparent, unobstructed; eye, ocular, visual; to overstep, to exceed to a point; love, have compassion for, respect, show affection to +vocative, imperative, or optative; goodbye, farewell, see you later, eat a good fish; sarcasm, irony; bottom, lower part +dream, daydream, imaginative play, vision, mystical state; interjection/insult; begin, start; totalitarian +interjection; botched, broken, damaged, harmed, messed up; stop, cease, halt; ten; bruh +do, take action on, work on; long hard thing; open; cereal, grain; give, send, emit, provide, put, release +twenty; good, easy; to block the way, to interrupt; brother, sister, sibling; expression of disbelief, exasperation, or excitement +to entrance; eight; green, greenish; negative five; turn on; used to divide a second noun group that describes a first noun group +to prevent; electric, electronic, conductive, mechanical, online; fuck +electricity, lightning, thunder, network; heart (physical or emotional); branch, rod, stick; black, dark, unlit +verdant, alive; car; build, make, prepare; ago, completed, ended, finished, past; bug, insect, ant, spider; annoy, annoyance, bothersome, boring +four; hip, side; container, bag, bowl, box, cup, cupboard, drawer, vessel; bowling pin; barley, corn, oat, rice, wheat +effective, useful, give good results; good, positive, useful; introduces a genitive noun +unreal, false, untrue; simple, relaxed, peaceful, uncomplicated; pretend; fluffy, soft, squishy +feeling (an emotion, a direct experience); bread, pasta; same, similar; wanting to create new words +friendly, peaceful; three; each other; next to, nearby, vicinity; ecofriendly; four +deceive, trick; simple; fire; outer form, outer layer +question-word; along with (comitative), beside; area above, highest part, something elevated; body (of person or animal), physical state, torso +something that can be compressed and will try to go back to its original shape; round or circular thing; on a higher tier/plane, enlightened, epic +cooking element, chemical reaction, heat source; new, fresh; you; sibling, peer, fellow; face, foremost, front, wall +image, picture, representation, symbol, mark, writing; fungus, fungi; bark, peel, shell, skin; know, be skilled in, be wise about, have information on +left, left side, port side; animal, beast, land mammal; ball, circle, cycle, sphere, wheel; as, like; yes/no question marker +big, heavy, large, long, tall; awe-inspiring, divine, sacred, supernatural; sun; boundary; horizontal surface, thing to put or rest something on +additional, another, extra; to an exceedingly great extent; platypus; sweet, fragrant; of one year +seven; sticky, magnetic; by, from, because of; but, however; (pre-verb) know how to; going to, toward +particle introducing a quote; right, right side, starboard; water, liquid, fluid, wet substance +important; time, duration, moment, occasion, period, situation; focus, attention, concentrate, resolution, fineness; communicate, say, speak, talk, use language, think +indoor space; light, brightness, glow, radiance, shine; non-binary, gender-non-conforming; two; three +adult; amaze people by being on the top of the leaderboard of a toki pona game; have sexual relations with; origin, cause +purple; cute, innocent, adorable; magic, sorcery; light source +mouth, lips, oral cavity, jaw; particle closing a quote; only; for +focus on; battle, challenge, compete against, struggle against; interjection, indicating awe or amazement; bond, attract, attach, clip +context, topic, salience, pertinent, topical, pertain to, be relevant; white, whitish; beverages; enchant; light-coloured, pale +from the perspective of; unique, united; bird, flying creature, winged animal; strong, powerful +hello +separate, cut; confident, sure; trans, non-cisgender; something that appears to break the rules but doesn't +moving; acts as a transition from one complete sentence to another; absent, away, ignored; we; building, home, house, room +must, need, require, should, want, wish; magical, supernatural, occult, incomprehensible; to revise your old creative works and actually make them worse; (pre-verb) going to +one; energetic, intense; leave and come back, be temporarily absent with the expectation of returning; faux edginess, provocation diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..bf5b2af --- /dev/null +++ b/src/main.rs @@ -0,0 +1,17 @@ +use markov::Chain; +mod toki; +mod nimi_sin; + +fn main() { + let nimi_sin = nimi_sin::pali(4); + println!("{}", nimi_sin); //o pali e nimi sin + markov(); // o pali e kon pi nimi sin ni + println!("{}", toki::pali(&nimi_sin)); +} + +fn markov() { // pali e nimi sin kepeken ilo Mako. + let mut mako = Chain::new(); + mako.feed_file("nimi").expect("lipu li lon ala a"); + println!("{}", mako.generate_str()); +} + diff --git a/src/nimi_sin.rs b/src/nimi_sin.rs new file mode 100644 index 0000000..527fcbc --- /dev/null +++ b/src/nimi_sin.rs @@ -0,0 +1,48 @@ +use rand::Rng; + +pub fn pali(i: u8) -> String { + let mut npsa = rand::thread_rng(); //ni li pali e nanpa pi sona ala (npsa) + let mute = npsa.gen_range(1..i); //suli nimi la ken mute li lon + + let mut x = 0; + let mut nimi_pini = 'x'; //nimi 'x' li ken ala lon la ni li nimi_pini lon open + let mut nimi_sin = String::new(); + + while x < mute { + let mut nimi: char; + if rand::random() || x > 0 { + loop { + nimi = nimi_w(); + if nimi_pini != 'n' { break; } + if nimi != 'n' && nimi != 'm' { break; } + } + nimi_sin.push(nimi); + nimi_pini = nimi; + } + + loop { + nimi = nimi_e(); + if nimi_pini != 'w' && nimi_pini != 'j' && nimi_pini != 't' { break; } + if nimi_pini == 'w' && nimi != 'o' && nimi != 'u' { break; } + if (nimi_pini == 'j' || nimi_pini == 't') && nimi != 'i' { break; } + } + nimi_sin.push(nimi); + if rand::random() { + nimi = 'n'; + nimi_sin.push(nimi); + } + nimi_pini = nimi; + x += 1; + } + nimi_sin +} + +fn nimi_w() -> char { + let kulupu_nimi = ['w', 't', 'p', 's', 'j', 'k', 'l', 'n', 'm']; + kulupu_nimi[rand::thread_rng().gen_range(0..kulupu_nimi.len())] +} + +fn nimi_e() -> char { + let kulupu_nimi = ['e', 'u', 'i', 'o', 'a']; + kulupu_nimi[rand::thread_rng().gen_range(0..kulupu_nimi.len())] +} diff --git a/src/toki.rs b/src/toki.rs new file mode 100644 index 0000000..e45622e --- /dev/null +++ b/src/toki.rs @@ -0,0 +1,54 @@ +use rand::Rng; + +pub fn pali(nimi_sin: &str) -> String { + let nimi = ["akesi", "ala", "alasa", "ale", "anpa", "ante", "awen", "esun", "ijo", "ike", "ilo", "insa", "jaki", "jan", "jelo", "jo", "kala", "kalama", "kama", "kasi", "ken", "kepeken", "kili", "kiwen", "ko", "kon", "kule", "kulupu", "kute", "lape", "laso", "lawa", "len", "lete", "lili", "linja", "lipu", "loje", "lon", "luka", "lukin", "lupa", "ma", "mama", "mani", "mi", "moku", "moli", "monsi", "mu", "mun", "musi", "mute", "nanpa", "nasa", "nasin", "nena", "ni", "nimi", "noka", "olin", "ona", "open", "pakala", "pali", "palisa", "pan", "pilin", "pimeja", "pini", "pipi", "poka", "poki", "pona", "pu", "sama", "seli", "selo", "seme", "sewi", "sike", "sin", "sina", "sinpin", "sona", "sitelen", "soweli", "suli", "suno", "supa", "suwi", "tan", "taso", "tawa", "telo", "tenpo", "toki", "tomo", "tu", "unpa", "uta", "utala", "walo", "wan", "waso", "wawa", "weka", "wile", "tonsi", "ku", "epiku", "jasima", "kijetesantakalu", "kin", "kipisi", "kokosila", "lanpan", "leko", "meso", "misikeke", "monsuta", "monsuta", "namako", "oko", "soko"]; //nimi pi ku suli + let nimi_ante = ["kepeken", "sama", "tan", "tawa", "lon"]; + let mut x = 1; + let suli = rand::thread_rng().gen_range(0_u8..5); + let mut nimi_suli = String::new(); + let mut mi_anu_sina = false; + let mut nimi_sin_li_lon = false; + loop { + if x == 2 { + if rand::thread_rng().gen_range(0_u8..10) == 0 { + nimi_suli.push_str("o "); + } else if !mi_anu_sina{ + nimi_suli.push_str("li "); + } + } + if x == 3 { + nimi_suli.push_str("e "); + } + if x == 4 { + nimi_suli.push_str(nimi_ante[rand::thread_rng() + .gen_range(0..nimi_ante.len())]); + nimi_suli.push_str(" "); + } + let mut y = 0; + let suli_kipisi = rand::thread_rng().gen_range(1_u8..4); + while y < suli_kipisi { + let nimi_ni = nimi[rand::thread_rng().gen_range(0..nimi.len())]; + if (nimi_ni == "mi" || nimi_ni == "sina") && suli_kipisi == 1 { + mi_anu_sina = true; + } + if (rand::thread_rng().gen_range(0..4) == 0 || (x+1 == suli && y == suli_kipisi-1)) && !nimi_sin_li_lon { + nimi_suli.push_str(nimi_sin); + nimi_sin_li_lon = true; + } else { + nimi_suli.push_str(nimi[rand::thread_rng() + .gen_range(0..nimi.len())]); + } + nimi_suli.push_str(" "); + y += 1; + if suli_kipisi-y > 1 && rand::random() { + nimi_suli.push_str("pi "); + } + } + + + x += 1; + if x > suli { break; } + } + nimi_suli + +}