dhowe / RiTaV1

RiTa: the generative language toolkit
http://rednoise.org/rita
GNU General Public License v3.0
354 stars 78 forks source link

RiTa v2.0 API #568

Open dhowe opened 5 years ago

dhowe commented 5 years ago

Ticket for discussion of the reduced API for version 2.0 of RiTa. The goal here is to provide a minimal (and thus more easily maintained/tested) version that includes core features of the library but removes the sort of utility functions (strings, files, etc) which can be easily handled in the host language, whether JavaScript, Java, or whatever else)

Main items to be added

Main items to be removed

Questions

dhowe commented 5 years ago

RiTa RiTa.VERSION

RiTa.alliterations() RiTa.concordance() RiTa.conjugate() RiTa.hasWord() RiTa.env() RiTa.pastParticiple() RiTa.phonemes() RiTa.posTags() RiTa.posTagsInline() RiTa.presentParticiple() RiTa.stresses() RiTa.syllables() RiTa.isAbbreviation() RiTa.isAdjective() RiTa.isAdverb() RiTa.isAlliteration() RiTa.isNoun() RiTa.isPunctuation() RiTa.isQuestion() RiTa.isRhyme() RiTa.isVerb() RiTa.kwic() RiTa.pluralize() RiTa.random() RiTa.randomOrdering() RiTa.randomSeed() RiTa.randomWord() RiTa.rhymes() RiTa.parseDial() RiTa.similarBy(opts) RiTa.singularize() RiTa.sentences() RiTa.stem() RiTa.tokenize() RiTa.untokenize() RiTa.words()

~RiTa.addWord()~ ~RiTa.isW_Question()~ ~RiTa.lexicalData()~ ~RiTa.minEditDistance()~ ~RiTa.randomItem()~ ~RiTa.similarByLetter() RiTa.similarBySound() RiTa.similarBySoundAndLetter()~ ~RiTa.stripPunctuation()~ ~RiTa.substrings()~ ~RiTa.superstrings()~ ~RiTa.trimPunctuation()~

RiGrammar addRule() addRules() expand() expandWith() hasRule() removeRule()

~expandFrom()~ ~getGrammar()~ ~load()~ ~loadFrom()~ ~print()~ ~ready()~ ~reset()~

RiMarkov generate() generateTokens() generateUntil() getCompletions() getProbability() addTokens() addText() size()

~generateSentence()~ ~generateSentences()~ ~getProbabilities()~ ~loadFrom()~ ~loadText()~ ~loadTokens()~ ~print()~ ~ready()~

~RiWordNet~ ~RiString~

triptych commented 5 years ago

Please don't remove the file loading functionality -- or at least perhaps move it to its own module. If you do remove it, please have some demo with the host language option shown.

dhowe commented 5 years ago

Indeed -- we'll make sure to have simple file-loading examples in the major environments