Skip to content
/ jvoxaskei Public

Haskell implementation of the Lojban lujvo-making algorithm

License

Notifications You must be signed in to change notification settings

lynn/jvoxaskei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

la jvoxaskei

A Haskell implementation of the Lojban lujvo-making and lujvo-scoring algorithms.

You can try it online here.

The Lojban what?

Lojban is a constructed human language. The root content words in Lojban, such as cabna (current) and djedi (day), can be smashed together into compound words called lujvo, such as cabdei (today). This process follows a non-deterministic algorithm called the lujvo-making algorithm. Another algorithm exists to score its outputs for brevity and niceness: the lujvo that is assigned the lowest score is often chosen as the dictionary form of a new compound word.

My program takes list of content words, generates all possible lujvo, optionally scores each of them, and then optionally selects the best result.

Usage

-- % ghci Lujvo.hs
-- GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
-- [1 of 3] Compiling Lojban           ( Lojban.hs, interpreted )
-- [2 of 3] Compiling Rafsi            ( Rafsi.hs, interpreted )
-- [3 of 3] Compiling Lujvo            ( Lujvo.hs, interpreted )
-- Ok, modules loaded: Lujvo, Lojban, Rafsi.
>>> let tanru = ["lujvo", "xamsi", "kelci"]
>>> mapM_ print $ take 5 $ scoredLujvoList tanru
(8796,"jvoxaskei")
(9916,"luvyxaskei")
(10866,"jvoxaskelci")
(10926,"jvoxamsykei")
(10946,"lujvyxaskei")
>>> bestLujvo tanru
"jvoxaskei"
>>> bestLujvo ["tisna", "mabru"]
"tisymabru"

About

Haskell implementation of the Lojban lujvo-making algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published