Jump to content

smedly backchatter


irihapeti
 Share

You are about to reply to a thread that has been inactive for 3171 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

eta: I made a mod based on some feedbacks to allow the script to listen all the time

set SOME_TIME to 0 and the script will listen all the time

set SOME_TIME to some value > 0 so that the script will listen again only after some time has elapsed 

+

also a note about stack collision error. If adding own words/chats then may need to reduce the existing backchats texts a little bit to fit your own stuff in   

 also also

changed the find again. should be ok now

+

 i was reading this post about backchatters so I thought I have a go at it

the post:

https://community.secondlife.com/t5/LSL-Scripting/Any-ideas-on-a-better-way-to-do-this/td-p/2956891

+

i never made a web scraper just a simple example LSL port mod of the Smedley which is here

http://writing-program.uchicago.edu/toys/randomsentence/

+

eta: oops, it never actual stopped so i fixed that

eta more: make another mistake. integer ~i

i realy should unlearn how to script millenium style (:

+

eta more: i changed the findChat bc I never liked the other way

+

the codes:

 

 

// SLSmedley
// Public Domain August 2015, irihapeti
// is a LSL port (with mods) of Smedley. a backchat bot made by these guys
// http://writing-program.uchicago.edu/toys/randomsentence/
//
// the app listens to open chat and picks out a word that it recognises
// then it backchats the person (speaker)
//
// if you use this in a commercial app then you might need to talk to
// the University of Chicago people. Is their content

// Usage: stick it in a prim, call it Smedley (or whichever) and start typing
// stuff in the open chat
// to stop, type in the open chat: stop
// to start again, type in the open chat: start



integer SOME_TIME = 180; // listen again only after SOME_TIME since the last time
// integer SOME_TIME = 0;   // listen all the time list words = // add words (in lowercase) to listen for in the chat, as many you want
// if get stack collision error then reduce the existing backchats to fit your stuff in [ "random", "vex", "monkey", "banana", "newbie", "dweeb", "egg" , "nuts", "spoon", "smex" ]; // smedley backchats list Nouns = [ "legitimation of", "affirmation of", "socialization of", "ideology of", "experience of", "idea of", "renunciation of", "nostalgia for", "rhetoric of", "culture of", "differentiation of", "formation of", "discourse of", "poetics of", "eroticization of", "sublimation of", "expression of", "fragmentation", "systemization", "totalization of", "realization of", "exploitation of", "delegitimization of", "expropriation of", "appropriation of", "invention of", "re-invention of", "representational validity of", "engendering of", "authentication of", "divisibility of", "disintegration", "reintegration of", "conceptual logic of", "internal structure of", "fundamental principle of", "politics of", "reading of", "writing of", "hermeneutic of", "eroticization of", "fiction of", "historicization of", "marketing of", "invention of", "ideology of", "discourse of", "logic of", "reformation of", "de-eroticization of", "reinscription of", "emergence of", "illusion of", "fantasy of", "linguistic construction of", "desacrilization of", "projection of", "cooptation of", "epistemology of", "figuralization of", "necessary but perhaps impossible notion of", "unanalyzed arbitrariness of", "disarticulation of", "fallacy of", "denomination of", "marketing of", "phenomenalism of", "imposition of", "assertion of", "teleology" ]; list Modifiers = [ "communicative interaction", "localized small-group cultures", "the gendered body", "post-capitalist hegemony", "empowerment", "representational familiarity", "the real", "the preprofessional", "unsituated knowledge", "narrative authenticity", "autonomous phenomena", "self-referential systems", "the master-slave dialectic", "process", "communicative rationality", "post-Jungian analysis", "disciplinary boundaries", "print culture", "the parent-child dynamic", "the means of production", "semantic drift", "the nation-state", "the implied reader", "cultural reproduction", "the specular economy", "system", "early modern textuality", "difference", "conceptual drift", "paratextual apparatus", "early modern sexuality", "the tension between nature and history", "power", "normative value(s)", "patriarchal grammar", "pop culture", "'high' culture", "the eclectic", "collecting as a cultural practice", "the culture industry", "the image", "civil society", "anxiety", "post-Hegelian criticism", "the Other", "desire", "indeterminacy", "post-Foucaultian sexuality", "DeMan's aesthetic ideology", "exchange value", "the anesthesia of forgetting", "panopticism", "praxis", "the prison, the hospital, and the school", "pedagogical institutions", "the natural", "a radical alterity", "disinterested observation", "an anthropocentric history", "classification", "linguistic transparency", "history as such", "commodified objects", "corporeality", "structural identity", "the unnamed", "factual knowledge", "the literary canon", "the public sphere", "teleological narrative", "the hidden", "agency", "autonomous selfhood", "the proper-name effect", "the enigmatic", "the gaze", "synesthesia", "syntactical certainty", "exoticism", "narrative communication", "narrative qua narrative", "(self)referentiality", "materiality", "metaphoric exchange", "narrative sequence", "metaphoric substitution", "romantic inwardness", "empirical literalism", "humanist organicism", "binary opposition", "the materialist architectonic", "the abyss", "biohistory", "millennial hedonism", "enlightenment rationalism", "the unspoken", "the marginal", "the unknown", "the market", "the private", "(dis)simulation" ]; list Verbs = [ "goes along with", "is connected to", "provides a context for", "works toward", "carries with it", "comes from", "asks to be read as", "may be taken as", "is comparable with", "may be regarded as", "should suggest", "is, in the most fundamental sense,", "is closely allied with", "can be subsumed under", "may be parsed as", "is indistinguishable from", "can easily be made compatible with", "does not undermine", "recapitulates", "reaffirms", "is associated with", "reflects", "is often found in juxtaposition with, if not in direct opposition to,", "is synonymous with", "fails to penetrate the myths obscuring", "highlights", "reflects", "(re)embodies", "interrogates", "fosters", "may be seen as", "substantiates", "is, and yet is not, ", "can be ultimately defined as", "pervades", "replays (in parodic form)", "thematizes", "actively utilizes", "reinterprets", "parallels", "focuses attention on", "rehearses", "reinvents itself as", "invests itself in", "questions the very notion of", "functions as the conceptual frame for", "reinforces", "is symptomatic of ", "is conducive to", "is in effect identical to", "revisits", "chronicles", "is often confused with", "is strictly congruent with", "allegorizes", "gestures toward", "is homologous with", "instantiates", "opens a space for", "generates", "performs", "displaces", "specifies", "has recently been consecrated as" ]; list Refs = [ "monologue on", "masterless exposition of", "instringent treatment of", "scant paragraph on", "ironic reference to", "suggestive observation concerning", "intellectual flirtation with", "non-clever parody of", "minimal exposition of", "tortured obsession with", "barely disguised ill-regard of", "fragmentation of", "revisionist approach to", "highly allusive work on", "pithy phrase concerning", "lukewarm use of", "incautious appraisal of", "inexplicable volte-face concerning", "tenacious reiteration of your earlier position on", "highly ambitious exposition of", "inexhaustive analysis of", "temperate yet unpersuasive attack on", "graphic description of", "classic essayism on", "trivial treatise on", "dense investigation of", "modern reinterpretation of", "seemingly groundbreaking view on", "stunning disquisition on", "insipid investigation of", "useless restatement of", "touching yet misguided attempt at reviving interest in", "informal sketch of", "ambiguous presentation of", "demonstration of", "breakdown of", "eccentric interpretation of", "non-thought-provoking inquiry into", "critique of", "recent comment on", "meditation on", "mocking allusion to", "ambitious survey of", "thoughtless reevaluation of", "careless dissection of", "loosely organized musing on", "little researched summary of", "inspection of current critical thinking concerning", "quite narrow study of", "somewhat childish parody of", "ambiguous reaffirmation of", "possibly superfluous addition to the voluminous literature on", "somewhat tortuous argument concerning", "unsubstantiated but oft-repeated argument on", "hastily said utterance on", "apparently semi-harmless jeu d'esprit concerning", "unguarded remark concerning", "excruciatingly detailed analysis of", "curiously reticent comment on", "often ridiculed treatise on", "paradoxical contradictory work on" ]; list Reviews = [ "would be disturbing, if it was not so banal", "is insufficiently problematized", "cannot be applied to the lyric", "is ultimately parasitic on the work of less well-known scholars", "is fundamentally indifferent to soundness", "is a non-crucial contribution to the subject being discussed", "should leave unresolved any disputes over terminology that have plagued this conversation since its inception", "confuses rhetoric with semantics", "confuses semantics with rationality", "contributes much that is uninteresting", "does much to further misunderstanding of this unimportant topic", "does little to further our understanding of this unimportant topic", "suffers from an almost complete ignorance of Latin", "suffers from an almost complete ignorance of the Frankfurt school", "should be applied to the study of Joyce", "is at heart a jejune redaction of the early Marx", "gains little from its frequent digressions into the minutiae of Joycean philosophy", "represents a belated form of intellectual triage", "can never supplant the work of the Frankfurt school", "effects irresolution of this complicated matter", "achieves a measure of unoriginality", "cannot easily be pigeonholed as a contribution to any of the dominant critical movements", "defies any attempts to classify it", "explores with scathing depth and dishonesty the flaws of the field as a whole", "flays the sacred cows of the Frankfurt school", "revives the oft-neglected field of poststructuralist semantics", "presents an all-inclusive portrait of the latter category while devoting only superficial attention to the former", "might be profoundly irritating in the hands of a more skilled conversationalist", "might be less irritating in the hands of a more skilled onversationalist", "is a tribute to diligence, although judgment may be non-deterministic", "resituates Casaubon's argument in a linguistic context", "reorients the field toward a more theory-driven perspective", "has surely exhausted any interest the subject may originally have had", "barely conceals apologetic motives", "is pregnant with meaning, but never quite delivers", "is a masterpiece of reductive inexactness", "throws out the metatextual baby with the textual bathwater", "is not an expository thought in the familiar sense, but a critical polyphony", "reintroduces the work of Zapp, who for too long has been casually pocketed as the field's tame theoretical authority", "is exceptionally resistant to summary, as befits its project", "loosens the notion of what it might mean to be systematic", "narrowly avoids withdrawal into conscious unreadability", "draws attention to the irreconcilable difference between languages and idioms", "deserves praise for its inattention to detail", "suffers from all the disadvantages that it inherits from its intellectual predecessors", "demands a break with the organization of 'the conversation' as we know it", "might seem a thought fraught with risks -- among them presumptuousness, imprecision, and mystification", "risks being merely polemical", "reformulates the underlying problems to which my own conversation points, thus raising other more important issues", "is based on an undernuanced account of narrative", "reminds us that the moment of unadulterated new historicism has long since passed", "suffers from an idiosyncratic and ultimately unsatisfying reading of Kant", "leads readers competently enough down the well-trodden paths of rhetorical criticism", "is an inevitable consequence of and indeed an integral part of Kinbotes's influence in the field", "would benefit from a more rigorous definition of its terms", "addresses a unsurprisingly underexamined subject", "perhaps overstates the influence of Kinbote", "betrays its origins as an insufficiently revised dissertation", "is sure to redefine the boundaries of this conversation", "ultimately does nothing to shift the boundaries of a field that is theoretically moribund", "is easier to describe than to read, and even easier to throw away", "is sure to meet with a lukewarm reception", "avoids offending your listeners but risks boring them", "at least achieves the doubtful virtue of innocuousness", "illustrates the intellectual depths to which the conversation has sunk", "assures your place in the pantheon of post-Foucaultian critics inspired by Kinbote", "addresses an important subject but forgets to mail it, if I may permit myself a slight witticism", "adds one more episode to the unacknowledged and unconsummated love affair with metaphysics", "deserves to be best left unknown", "deserves the obscurity into which it has fallen", "is often repeated, but perhaps not well understood", "is frequently quoted without attribution", "is not without a meritless pass mark", "is not without its lack of supporters even today", "is almost entirely lacking in critical insight", "is not borrowed wholesale from Passmore, although admittedly the influence is there", "testifies to considerable perspicuity", "may seem impressive to the uninitiated", "might have been enriched by a careful reading of Heidegger", "can hardly be a surprise to those familiar with the work" ]; integer LID_NOUNS = 0; integer LID_MODIFIERS = 1; integer LID_VERBS = 2; integer LID_REFS = 3; integer LID_REVIEWS = 4; integer stopped; integer safe; integer listener; string pickAny(integer ListID) { // listid avoids passing a copy of list if (ListID == LID_NOUNS) return llList2String(Nouns, (integer)llFrand(llGetListLength(Nouns))); if (ListID == LID_MODIFIERS) return llList2String(Modifiers, (integer)llFrand(llGetListLength(Modifiers))); if (ListID == LID_VERBS) return llList2String(Verbs, (integer)llFrand(llGetListLength(Verbs))); if (ListID == LID_REFS) return llList2String(Refs, (integer)llFrand(llGetListLength(Refs))); return llList2String(Reviews, (integer)llFrand(llGetListLength(Reviews))); } string pickAnother(integer ListID, string NotAgain) { // can be done better this with more codes string pick; do { pick = pickAny(ListID); } while (pick == NotAgain); return pick; } string findChat(string Chat) {  
    list txt = llParseString2List(Chat, [" "], []);
integer i = llGetListLength(txt);
while (~(--i))
{
string s = llList2String(txt, i);
if (~llListFindList(words, [llToLower(s)]))
return s;
}
return "";
} default { state_entry() { safe = TRUE; listener = llListen(0, "", NULL_KEY, ""); } listen(integer channel, string name, key id, string message) { if (!safe) //is a flood safety return;

string tolower = llToLower(message); if (tolower == "start") //anyone or anything can start
        {
            stopped = FALSE;
            return;
        }
if (tolower == "stop") //anyone or anything can stop { llSay(0, "awwwwwwww!"); stopped = TRUE; }
if (stopped)
return; string speaker = llGetDisplayName(id); if (speaker == "") // can only be a person bc DisplayName return; safe = FALSE; string found = findChat(message); if (found == "") { safe = TRUE; return; } if (SOME_TIME)
llListenRemove(listener); // got something so stop listening for SOME_TIME string bookref = pickAny(LID_REFS); string verb = pickAny(LID_VERBS); string subject = pickAny(LID_NOUNS); string submodifier = pickAny(LID_MODIFIERS); string object = pickAnother(LID_NOUNS, subject); string objmodifier = pickAnother(LID_MODIFIERS, submodifier); string reviewverb = pickAny(LID_REVIEWS); string smedsays = speaker + "'s " + bookref + " '" + found + "' " + verb + " the " + subject + " " + submodifier + " and the " + object + " " + objmodifier + " which " + reviewverb + "."; llSay(0, smedsays); safe = TRUE;
if (SOME_TIME)
llSetTimerEvent((float)SOME_TIME); } timer() { if (safe) { llSetTimerEvent(0.0); listener = llListen(0, "", NULL_KEY, ""); } } }

 

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3171 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...