ctext

natural language processing for computational literature

     FEATURES:

  • Support for probabilistic context-free grammars (CFGs)
  • Support for generation via Markov (N-Gram) models
  • Integration with WordNet, and JSAPI for text-to-speech
  • Constraint-based word substitution (see CSubstitute)
  • Support for user-customizable lexicons
  • Audio support for cText objects (see CSample)
  • Pluggable 'behavior' model for events/animations etc.
  • Position & transparency animations for cText
  • Background image support for cText objects

     Installation:

  • To install cText unzip ctext.zip and place the 'ctext' folder inside the Processing 'libraries' folder or in your 'sketchbook' folder.

    Optional: if you wish to use the sound features of cText (.wav/.aiff/.mp3 files & streams), unzip & install a sound support library: Minim (recommended), Ess, or Sonia as above.

 

     Core Objects

     Examples

                                  [ questions/downloads ]

 Author:Daniel C. Howe
 Version:alpha [034]
 Optional:Minim/Sonia/Ess for audio
 Acknowledgements:
Ken Perlin
Matthew Stone
Braxon Soderman
[CWordnet]

CWordnet
checkExists ( )
getAllAlsoSees ( )
getAllAntonyms ( )
getAllCoordinates ( )
getAllDerivedTerms ( )
getAllExamples ( )
getAllHolonyms ( )
getAllHypernyms ( )
getAllHyponyms ( )
getAllMeronyms ( )
getAllNominalizations ( )
getAllSimilar ( )
getAllSynonyms ( )
getAllVerbGroups ( )
getAlsoSees ( )
getAntonyms ( )
getAnyExample ( )
getBestPos ( )
getCommonParent ( )
getCommonParents ( )
getCoordinates ( )
getDerivedTerms ( )
getDescription ( )
getDistance ( )
getExamples ( )
getGloss ( )
getHolonyms ( )
getHypernyms ( )
getHyponyms ( )
getMeronyms ( )
getNominalizations ( )
getPos ( )
getRandomExample ( )
getRandomExamples ( )
getRandomWord ( )
getRandomWords ( )
getSenseCount ( )
getSenseIds ( )
getSimilar ( )
getStems ( )
getSubstringMatches ( )
getSynonyms ( )
getSynset ( )
getVerbGroup ( )
ignoreCompoundWords ( )
ignoreUpperCaseWords ( )
isAdjective ( )
isAdverb ( )
isCompound ( )
isIgnoringCompoundWords ( )
isIgnoringUpperCaseWords ( )
isNoun ( )
isStem ( )
isVerb ( )
removeNonExistent ( )

[CTextInput]

CTextInput
setActiveColor ( )
setBgColor ( )
setFgColor ( )

[CText]

CText
font
image
sample
x
y
z
addBehavior ( )
align ( )
boundingBoxFill ( )
boundingBoxPadding ( )
boundingBoxSelectedFill ( )
boundingBoxSelectedStroke ( )
boundingBoxStroke ( )
boundingBoxStrokeWeight ( )
contains ( )
createLines ( )
createLinesFromFile ( )
createWords ( )
disableAutoDraw ( )
dispose ( )
disposeAll ( )
drawAll ( )
fadeAllIn ( )
fadeAllOut ( )
fadeColor ( )
fadeIn ( )
fadeOut ( )
fill ( )
getAlignment ( )
getAlpha ( )
getBehaviors ( )
getBoundingBoxFill ( )
getBoundingBoxStroke ( )
getFill ( )
getFont ( )
getImage ( )
getImageHeight ( )
getImageWidth ( )
getInstances ( )
getPicked ( )
getPos ( )
getSample ( )
getSelected ( )
getSelectedColor ( )
getText ( )
getWordOffset ( )
getX ( )
getY ( )
isBoundingBoxVisible ( )
isInvisible ( )
isMouseDraggable ( )
isOffscreen ( )
isSelected ( )
isVisible ( )
length ( )
loadSample ( )
moveBy ( )
moveTo ( )
pauseAllBehaviors ( )
pauseBehaviors ( )
regexReplace ( )
regexTest ( )
removeBehavior ( )
removeBehaviors ( )
replace ( )
replaceFirst ( )
scaleImage ( )
setAlignment ( )
setAlpha ( )
setBoundingBoxesVisible ( )
setColor ( )
setFont ( )
setFontSize ( )
setImage ( )
setImageBaseAligned ( )
setImageHeight ( )
setImageSize ( )
setImageWidth ( )
setLocation ( )
setMouseDraggable ( )
setSelected ( )
setSelectedColor ( )
setText ( )
setVisible ( )
setX ( )
setY ( )
showBoundingBox ( )
split ( )
textFont ( )
textHeight ( )
textMode ( )
textSize ( )
textWidth ( )

[CSample]

CSample
fadeVolume ( )
getCurrentFrame ( )
getNumFrames ( )
getPan ( )
getVolume ( )
isLooping ( )
isPlaying ( )
load ( )
loop ( )
mute ( )
pan ( )
pause ( )
play ( )
setCurrentFrame ( )
setVolume ( )
stop ( )
stopFade ( )
stopPan ( )

[CMarkov]

CMarkov
addSentences ( )
dumpModel ( )
generate ( )
getInfo ( )
getLexicon ( )
getMaxSentenceLength ( )
getMinSentenceLength ( )
getNFactor ( )
getSentenceCount ( )
getStrictSentenceStarts ( )
getUniqueCount ( )
getWordCount ( )
loadFile ( )
loadString ( )
setMaxSentenceLength ( )
setMinSentenceLength ( )
setStrictSentenceStarts ( )

[CLexicon]

CLexicon
containingStringsByLetter ( )
getAlliterations ( )
getSimpleAlliterations ( )
getSimpleRhymes ( )
isAlliteration ( )
isContaining ( )
isLetterEx ( )
isRhyme ( )
isSoundex ( )
isSubstring ( )
isSuperstring ( )
similarByLetter ( )
similarBySound ( )
similarBySoundAndLetter ( )
substringsByLetter ( )
superstringsByLetter ( )

[CGrammar]

CGrammar
dumpDefinitions ( )
expand ( )
expandFrom ( )
getDefinition ( )
setDefinition ( )

[CAnalyze]

CAnalyze
getAvailableFeatures ( )
getFeature ( )
getFeatureArray ( )
getFeatureString ( )
getPhonemes ( )
getPos ( )
getStresses ( )
getSyllables ( )
getText ( )
getWordArr ( )
getWords ( )
replace ( )
setText ( )
wordAt ( )
wordCount ( )
wordIdx ( )