MSPA Forums
Page 22 of 60 FirstFirst ... 121920212223242532 ... LastLast
Results 526 to 550 of 1485

Thread: Pesterchum Quirks thread: Request and post your quirks here!

  1. #526
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Regepx: (\w)([^.?!]*)([.?!]*)
    replace: upper(\1)\2\3

  2. #527

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by lightningRecluse View Post
    I just tried that. Annnnd it didn't work. :c

    Unless I'm putting it in the wrong field.
    I made a mistake.
    try
    regex:
    (\S+)([^.?!]*)([.?!]\s)?
    upper(\1)\2\3
    EDIT:ninjad

  3. #528
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Okay, here's one that I'm having a bit of difficulty figuring out. I want a quirk that puts as many exclamation marks at the end of a word as there are "I"s and "O"s in that word.

    Here is! an example of! what I! am talking about!. Obviously!! this! is! more! difficult! than just putting! one! exclamation!! mark after words! with "I"s! and "O"s! in! general.

    I hope that example is enough so that you know what I mean. Any ideas?

  4. #529

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by XP105 View Post
    Okay, here's one that I'm having a bit of difficulty figuring out. I want a quirk that puts as many exclamation marks at the end of a word as there are "I"s and "O"s in that word.

    Here is! an example of! what I! am talking about!. Obviously!! this! is! more! difficult! than just putting! one! exclamation!! mark after words! with "I"s! and "O"s! in! general.

    I hope that example is enough so that you know what I mean. Any ideas?
    If I could iterate the regex I could get that...

    if there was a maximum number of exclamation marks that could also work.
    ick.

    I doubt that can be done in a single line of regex.
    I know that paren matching cant be done in one line of regex...

    anyway, I would suggest making it so every word ends with some placeholder
    and then replace every i or o wiith an i or o and then a placeholder
    and move those placeholders to after the other placeholder
    and then turn them into explamation points.

  5. #530
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    I'm a little too tired to attempt to figure this out tonight, sorry. I'll try again tomorrow.

  6. #531
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by humbleElitist View Post
    If I could iterate the regex I could get that...

    if there was a maximum number of exclamation marks that could also work.
    ick.

    I doubt that can be done in a single line of regex.
    I know that paren matching cant be done in one line of regex...

    anyway, I would suggest making it so every word ends with some placeholder
    and then replace every i or o wiith an i or o and then a placeholder
    and move those placeholders to after the other placeholder
    and then turn them into explamation points.
    Yeah this is the way I was thinking of doing it, but it seemed overly complex. Bluh, I'll do it in python.

    Code:
    def exclaimer(text):
        count = 0
        for x in text:
            if x == 'i' or x == 'o':
                count += 1
        return text + ('!' * count)
    Regexp: (\w+)
    Replace with: exclaim(\1)
    Last edited by XP105; 08-12-2012 at 12:12 PM.

  7. #532
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Curses, XP105.


    I must learn python!


    Does that pick up capital I's and O's as well?

  8. #533
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    I can make it so it does, but the quirk combo I was making was for lowercase anyway.

    This would do it for capitals too.
    Code:
    def exclaimer(text):
        count = 0
        for x in text:
            if x == 'i' or x == 'o' or x == 'I' or x == 'O':
                count += 1
        return text + ('!' * count)

  9. #534

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by XP105 View Post
    I can make it so it does, but the quirk combo I was making was for lowercase anyway.

    This would do it for capitals too.
    Code:
    def exclaimer(text):
        count = 0
        for x in text:
            if x == 'i' or x == 'o' or x == 'I' or x == 'O':
                count += 1
        return text + ('!' * count)
    Instead of
    If x =='i' or ...
    I would use
    If x in ['i','I','o','O']:
    More concise, looks better, etc.

  10. #535
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by humbleElitist View Post
    Instead of
    If x =='i' or ...
    I would use
    If x in ['i','I','o','O']:
    More concise, looks better, etc.
    Yeah, true. But I was just quickly throwing it together, rather than trying to make it concise.

  11. #536
    Witch of Time (~*0*)~
    Join Date
    Jun 2012
    Posts
    18

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    is it possible to make some sort of spellchecker?

    not like just going and doing simple replace or such, that would take FOREVER.

    i mean would it be possible using python or something? to install a spell checker into pesterchum? :/


    im reallyyyyyyy bad with code XD and i dont even do scripting like this (only themes ;w; ) so help me out guys oAo;
    Last edited by ripplePounce; 08-13-2012 at 01:44 AM.

  12. #537

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by ripplePounce View Post
    is it possible to make some sort of spellchecker?

    not like just going and doing simple replace or such, that would take FOREVER.

    i mean would it be possible using python or something? to install a spell checker into pesterchum? :/


    im reallyyyyyyy bad with code XD and i dont even do scripting like this (only themes ;w; ) so help me out guys oAo;
    yes.
    that is possible.
    might be hard, and you wouldn't be able to check if for miss-corrections...
    but yes it can definitely be done.

    I might maybe work on it?

    but probably not.

    i don't see exactly how to...

    well, ok, checking for 1 char off could be done...
    oh, I suppose it could be done recursively?

    oh, yeah.
    that should be doable.

    hey, in case anyone is less lazy than me sooner, heres the outline(its a slow algorithm, but it might not be too slow):

    ok, so there would be three types of modifications that would be used.
    one inserts a character
    one removes a character
    one adds a space NOTE:optional, if you add this, make sure to add sanity checks so words ghsdjk doesnt end up turning into a a a a a a a a a a ghsdjk
    NOTE:this does not check for added spaces
    NOTE:if you type something that is not at all a word, this algorithm will keep modifying it until it IS a word, or it reaches the specified maximum depth value. this might take a long time.

    this spell checks a single "word", consisting solely of letters.

    the argument it takes is the word, and an optional depth value
    (the optional depth value defaults to something like 5 or whatever)

    algorithm:
    for each method of modifying:
    for each place to modify:
    modify it with the method at that location.
    check to see if the result is a word
    if it is, return it.
    otherwise continue as follows.
    check if the depth value is equal to 1.
    if so return False
    otherwise
    get the value of the function applied to the modified value, with the depth value decreased by one.
    if the result of that is False, continue
    if it is anything other than False, return the result

    that should work, but there are many improvements that could be made.
    this algorithm is a depth first search.
    depth first is not a very good way to do this, as it will waste time looking at
    aaaaaawhteveryoutypeed
    before looking at anything more reasonable, like for example:
    wahteveryoutypeed

    this contributes to this algorithm being SLOWWWWWW
    you may want to find a better algorithm, possibly based on this one.

    I believe this algorithm takes worst case time of
    (28*lengthofword)^search depth

    which is exponential time

    well...
    its exponential with search depth
    its polynomial with lengthofword
    which I suppose isn't that bad.

    I expect his algorithm is relatively likely to come up with a word that you did not mean.
    I have neither implemented nor tested this algorithm.

  13. #538
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    I have no freaking clue how to do any of that.

  14. #539
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Err..... you do know there are, like, a million python based spell checkers out there which, with a simple function calling a pre-built class, could be easily made into a quirk, right?

  15. #540

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Yes.
    But I don't know what they are called.
    And that was more fun to do than tea search what spell check libraries for python are good.

  16. #541
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by XP105 View Post
    Err..... you do know there are, like, a million python based spell checkers out there which, with a simple function calling a pre-built class, could be easily made into a quirk, right?
    No.



    I do not.


    I don't even know python.

  17. #542

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Hello ive been trying to make a quick nsucsesfully and wondered if you could help. im trying to replace all the letters of the alphabet with the greek letters , im not sure if the letters alt-codes are compatible for pesterchum or if i just havnt managed to find the right alt-codes yet, any help would be aprciated. i would also like a quicrk that starts a new line after every ' , ' ' . ' ' ? ' and/or ' ! ' again, eany help you can provide will be apreciated
    i am silverShadow on trolian, Troll me whenever you want.

  18. #543
    Witch of Time (~*0*)~
    Join Date
    Jun 2012
    Posts
    18

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    :O how do i incorporate one of those spell checkers into a quirk then??


    one of my trolls uses very high grammar and such (and to be honest i am not the best speller lol ;w

  19. #544
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by silvershadow View Post
    Hello ive been trying to make a quick nsucsesfully and wondered if you could help. im trying to replace all the letters of the alphabet with the greek letters , im not sure if the letters alt-codes are compatible for pesterchum or if i just havnt managed to find the right alt-codes yet, any help would be aprciated. i would also like a quicrk that starts a new line after every ' , ' ' . ' ' ? ' and/or ' ! ' again, eany help you can provide will be apreciated
    You can copy and paste the greek letters on wikipedia, and they'll work for your replacements.


    As for the second quirk, that's impossible. Simply end the line after typing a comma, period, question mark, or explamation point.

    Quote Originally Posted by ripplePounce View Post
    :O how do i incorporate one of those spell checkers into a quirk then??


    one of my trolls uses very high grammar and such (and to be honest i am not the best speller lol ;w

    I think you'd just place the python function in the quirks folder with a name for the quirk added to the end, hit the reload quirks button, then regexp replace ^(.*)$ with quirkname(\1).



    As I've said though, I don't know python, so I'm not entirely sure.

  20. #545

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by cardiacAtrophy View Post
    As for the second quirk, that's impossible. Simply end the line after typing a comma, period, question mark, or explamation point.
    No.
    Not quite.
    It would require use of what I think is a bug, but it can be done in with python.
    As you may or may not have noticed, pester chum messages have a maximum length.
    If the message exceeds this length AFTER QUIRKS ARE APPLIED
    It will split it into Separate messages.

    All one has to do is make a python function that takes the part of the text that you want to be it's own message, and make it so the function pads it to the appropriate length.
    However, one should insure that this is the last quirk applied,
    Or take special care that quirks applied afterwards do not interfere undesirably.

  21. #546
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Yes, well, I am not going to promote spamming the servers with useless characters just so someone doesn't have to press enter 3 times, and I'd rather no in here do so.

    Sure, if one person's doing it, it's not much of a problem, but with enough people, all it results in is tons of short messages with large overhead, and nobody wants that.

  22. #547
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    You know, it sure would be nice if IRC accepted \n characters!

  23. #548

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    I'd like to request a quirk where words like 'like' become 'liek'? I basically wanna transpose any e at the end of a word back to just behind the nearest vowel in the word but I have no clue how to do so. Any help? 3:

  24. #549
    Game Guru & Quirk Queller XP105's Avatar
    Join Date
    Feb 2012
    Location
    Land of Kilts and Bagpipes
    Posts
    248

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by Mr. Max View Post
    I'd like to request a quirk where words like 'like' become 'liek'? I basically wanna transpose any e at the end of a word back to just behind the nearest vowel in the word but I have no clue how to do so. Any help? 3:
    Not entirely sure what you mean by "behind the nearest vowel" as that would make "like" -> "leik", but here goes.
    Regexp: (\w+)(\w)([eE])\b
    Replace with: \1\3\2

  25. #550
    His Honorable Tyranny cardiacAtrophy's Avatar
    Join Date
    Dec 2011
    Location
    Land of Lack and Struggle
    Pronouns
    he/him/his
    Posts
    1,092

    Re: Pesterchum Quirks thread: Request and post your quirks here!

    Quote Originally Posted by XP105 View Post
    Not entirely sure what you mean by "behind the nearest vowel" as that would make "like" -> "leik", but here goes.
    Regexp: (\w+)(\w)([eE])\b
    Replace with: \1\3\2
    Behind the nearest vowel, not ahead of it. As in like -> liek (You read english left to right, so any word to the left precedes it, therefore is ahead of it.


    regexp: (\w*)([aAeEiIoOuU])(\w*)([eE])\b
    replace: \1\2\4\3


    Works better.

Page 22 of 60 FirstFirst ... 121920212223242532 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •