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.
The plugin makes a full-stops after urls. You cant open them because of that. Can you make it so it excludes sentences including http: or www.?
@rbos
Thanks, that helped alot. ;)
Does anyone have a well defined spelling setting file? Currently mine only has a few things on it:
plz: please jk: just kidding kk: okay wtf: whatthe lmao: teeheehee wut: what lllaaaggg: lag laaag: lag llaaagg: lag
@nurwin22
Thank you very much! I'm glad that you like it.
I literally lol'ed when I saw this!
I didn't know this was possible, but now you can make minecraft players appear smarter! Lmao fantastic work!
@Puttemull
Thank you, I'm happy that you find it useful.
@SilverKytten
Thank you, I appreciate it. I took both of your recommendations and they have been added to the latest release! (Version 1.6)
I love this plugin so much... ^_^
But... Could the next update include permissions, so as to opt-out certain ranks/people?
Also, maybe a way to reload the config, without having to restart the server?
Thanks for this plugin, works great!
@notif
Hello again,
I see no problem with adding words in game, I'll also make a refresh command so that the server doesnt have to be restarted after you edit the file.
I must admit, I love chat bots, but I don't think that that or phrase-triggered-commands are for this plugin. This was created as a spelling/grammar plugin and I'd like to stick to that, however, I'm very much considering making a new plugin that would include these things. :D
Suggestions and Ideas:
1. A way to add words from in-game.
So that one doesn't have to manually edit the list and then restart.
2. For commands to run when someone types words.
Executing server side commands could be tricky, however running player commands should be in the realm of possibility. Such as warping someone somewhere when they type the magic word. Or running some command for when someone asks the forbidden question; "Can I be OP?" which therein warps them to the lava pit, to answer their question. Or, for the more subtle approach, run /rules for them.
Player commands would be limited, if only server commands were possible, one could do so much more!
3. Send a custom message whenever someone types something specific, for use as a simple chat bot.
This is my favorite idea, and it could be done with server commands, perhaps.
Or better yet, to have the responses be from the ForcedGrammar itself.
I have searched for chat bots, and could not find one that was up to date, or that worked in the right way. So it would be really cool if this plugin had a one!
@notif
Hello Notif,
There used to be a default spelling list, but it had some issues. I have been thinking about reintroducing it with some basic corrections through!
Corrections are already meant to be case insensitive. It's a bug, sorry! It's at top of the fix list.
Although I've not attempted with that many words, I would expect performance to hold up just fine. When you think about it, there are a lot more intensive actions that a computer has to preform all the time. We're basically just iterating over a list, comparing words.
Thank you for creating this! We've had a lot of fun with the word phaser.
A default spelling list would be a nice touch! For example: i: I u: you r: are y: why tho: though
Another suggestion, the option to make some words case insensitive, if it's not too much trouble.
I have a question however, would adding 100+ of these cause the plugin to be bloated and resource intensive?
Hi Andrew,
No, you're definitely not doing anything wrong! In this respect the spelling system is rather symplistic, apart from ignoring capitalision it will take the corrections literally.
I could try a fix for dots being used to avoid censors, but to be very honest I don't have the time to work on this plugin at the moment (as you may have noticed from some of the comments below). It seems like a simple thing to achieve but I see it having unintended consequences that I'd have to look out for and take care of. It's on the todo list but I really can't promise anything. :(
Sorry for lack of support I'm giving to this plugin at the moment, but it can't be helped due to other things.
Thanks, Liam
I notice the plugin doesn't like dots being used in words I want it to spelling correct in the config.
For example, I have the plugin set to turn their swears into funny words or phrases to make them look silly, however, they can bypass this if they put dots between their letters.
So I can make it correct 'abcd' for example, but not 'a.b.c.d'
Is there any chance this will be fixed in the near future? Or am I just doing something wrong?
Thanks
- Andrew
@WarmakerT
Should be possible by setting custom spelling corrections for 1337 phrases.
@xBlueXFoxx
Looks like you two have seen the same problem, thanks for pointing it out. I have very little time to give to this plugin at the moment, but I'll check it out soon. Sorry for the very late reply.
You should also check for 1337 grammar and translate it.
It seems if people a word in all caps it will go undetected by forcedgrammar.
Hey, I really love your plugin ;) It will teach those kids how to write properly. But I have a feature request. Could you force plugin to do not make difference about lower, or uppercase in the first word? Let me explain. If we have word "computr", then we write computr: computer but when someone writes coMputr, then the plugin recognizes this word as something else, and doesn't correct it. It would be hard to write Computr: computer cOmputr: computer coMputr: computer COMPUTR: computer We have uncountable ways to write it. So my request is to DO NOT recognize the lower/uppercase difference in the wrong word place. (but it should still work for the correct form, for expample: chicago: Chicago)
Hope you understand :)
@deleted_7116233
Apostrophes are not a problem, the strings aren't enclosed in quotes. The format is search: replace
In reply to your original comment, 1.5 will not work with 1.2.5 or earlier. Also, the spellings file was indeed missing the examples, these are back in for 1.5.1.
@rbos
Using your
http://www.blahblah.com
link, I tested out the link exemption and it worked fine, not capitalising or adding a full stop. Never the less, there is a slight improvement with link recognition in the next bug fix.Hey - Is there anything we have to do if using apostrophes in the spellings.yml file?
Thanks!