ForcedGrammar
ForcedGrammar modifies chat messages as they are sent to correct spelling and basic grammatical errors. It is capable of changing any words in a find and replace style customisable by you, as well as performing automatic grammatical corrections. The idea for this plugin came from Sabinno, here.
Features
This is a quick run down of the plugin's abilities.
The spelling correction relies on a list of corrections that is compiled by you. A list of common misspellings is included to get you started, provided by Bradgillap.
- Capitalise sentences
- Ensure sentences end with full-stops
- Correct spelling
- Update notification
- Enable/disable features via configuration file
- Escape individual messages from alteration
- Edit spelling correction list directly or with in-game commands.
- Restrict usage with permission nodes
An example
A message like i cant do grammar. sorry about that
could become I can't do grammar. Sorry about that.
In this example the plugin capitalised the first letter of each sentence, appended a full-stop onto the end of the message and corrected "cant" to "can't". However, you'll notice that the first sentence still doesn't make sense. Although ForcedGrammar can handle formal errors, it will not improve eloquence or style!
Questions? Problems?
Please visit the documentation if you want to know anything about ForcedGrammar that can't be found on this page. While this page is a summary, the documentation goes into a lot more depth.
If you would like to report an issue with the plugin then please do so using either the BukkitDev or GitHub issue trackers.
Also, if you've given yourself every permission node then you will have ForcedGrammar's fg.exempt
. Make sure that you negate this if you want your chat to be corrected!
Change log
version | level | date | changes |
---|---|---|---|
1.8.4 | patch | 7 July 2014 | fixes a bug which caused regular expressions to be output into the chat |
1.8.3 | patch | 24 May 2014 | several bug fixes, see file notes. Removes wildcard feature, sorry. |
1.8.2 | patch | 6 May 2014 | this-is-still-alive update! Sorry, mostly boring things. |
1.8.1 | patch | 12 July 2013 | include missing class file |
Contributing
This is really just a note to say that I am open to contributions if ever anyone has any to give. The project's source is available on GitHub.
@dudes45
No problem, please do. :)
@ReddChicken
Hi Redd, Thanks for the reply! Sorry I've taken so long to get back to you! Okay so I'm doubtful its another plugin (However I will investigate). I know we have no other grammar related plugins. The only chat related plugin we have is Essentials Chat! I don't believe there is any way to put the smiley's into the spellings.yml as of course the file is separated with comma's which are normally part of a smiley!
Let me have a play and if I get nowhere I'll open a ticket. Thanks!
@dudes45
Hi dudes45,
That behaviour definitely isn't intentional and I am not able to reproduce it myself. Could it be that this is being caused by another plugin? Could your custom corrections be causing it?
If you can't work it out, please open a support tick (click on Tickets at the top of this page) and I'll try to help you out further. :)
Thank you, ReddChicken
Hi, we love the plugin but we were wondering if there's anyway to get around the grammar correction when using smilies such as XD, :P and :D - It tends to correct them too xd, :p and :d. This is a request from our users rather than us but I was wondering if it was possible?
@iWareWolf
Edit: I have not been able to recreate either of these issues. Could they have been caused by another plugin?
That is how it should work, I would be worried if it is doing differently. I'll check it out.
The $/S thing is also very weird, I'll have a look.
Thanks, ReddChicken.
@ReddChicken
So it does not change the "i" in every sentence to "I"? I wanted it to be like:
Default Message: I went to the beach and i did not fill the bucket. to: I went to the beach and I did not fill the bucket. not: I went to the beach and I did not fIll the bucket.
Also when I try to change $, it also changes S.
@iWareWolf
Hi iWareWolf,
Sorry, I don't understand what you're asking.
Can you not simply do: i: I?
Could you make it so that "_" would be read as a space? I'm trying to make the letter i turn to I when alone.
@IdealIdeas
Thank you, it's wonderful to hear that you're finding my plugin useful (and having some fun with it). :)
@ReddChicken
Well its better than most others. The last one I found boots the player after x amount of attempts and if you turn the kick off it stops working after those attempts.
This so far has been the best plugin because it doesnt worry about kicking a player every time they poorly spell a word.
Its definitely been a fun one to use especially when I changed omfg to "oh my hairy nipples" when they discovered that, they all died of laughter.
@IdealIdeas
Hmm... I can see that what you're trying to prevent is very similar to what I made ForcedGrammar to prevent, but I'd really like to not make it an impenetrable filter.
One of the main things I have debated on is whether the plugin should be able to catch any arbitrary string of text, or only individual words. I have so far opted for the later, which is why your corrections don't work - the full-stops effectively split it into multiple words.
I could try detecting excessive numbers of full-stops, but I can see this making more trouble by catching legitimate uses - something that I have been very eager to avoid. I'm sorry that ForcedGrammar can't live up to your need, but I think that for now it is better off without it.
Thanks again, ReddChicken.
@ReddChicken
Well, im not using it for censorship really. I just have this guy who purposely likes to misspell words and he talks all the time and its horrendous seeing it all the time.
Basically all im using it for is to check for words and making them spelled correctly. So far I have fixed like 15 different variations on my name and it bugs him, but I love it.
I also am using it for minor things like wat, waht, wut, fak, fuk, iz and things like that.
@IdealIdeas Hey IdealIdeas,
Yes, corrections will not work with punctuation in them. ForcedGrammar is really only designed for casual spelling and grammar corrections, not censorship.
plugin doesnt seem to prevent words spelt out like t.h.i.s
I tried doing f.a.y.g.i.t__f.a.g.i.t__f|a|g|i|t
But when ever they used the letter "a" it censored it.
@icon256
Hi icon,
Thank you! If you can send me your spellings.yml, then I will have a check through it for you.
Thanks again, ReddChicken.
Hi Great Plug in.
Is there any way to do syntax correction on the spelling.yaml. I use an Online YAML Parser, and still something is messing it up and not allowing any custom dictionary. Almost like an error-check. I imported some words and format them as usual, however, I can't find the one that is causing the plug-in not to correct the spelling.yaml.
I just put the fg.exempt permission for the guests and then a negative permission on the staff.
@ocasek3232
Ne, je mi líto, že to není možné. Můžete hledat pouze jednotlivá slova. :)
@RobinHood999
Nice idea! It's always good to look like you know what you're doing.
@fungreenfox
Try adding the word to spelling.yml manually.
I'm going to use this to make sure my staff looks professional! Thanks!