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.
@ReddChicken
Thank you for answer and for your plugin :)
@gepardo43
It is possible, but, as of the moment, will require you to edit the spelling dictionary file directly. A simple line in the file like this will do what you want:
It is due to imperfections in the way the in-game commands are implemented that this cannot be achieved with a command, sorry!
@ReddChicken
Hmm How can i change 2 words to one? For example "wh ere" to "where". Is it possible?
@rbos
Set it to correct " y " to " why ". Spaces!
I have "y" translated to "why", but that gives me constructs like
why'know why'all
any ideas?
@Sabinno
No problem. Hmm... Wild cards. Well, if they're wanted then I guess I better implement them! Please don't expect them soon though; Christmas! I'm not worrying about difficulties implementing them, I'll enjoy the challenge. What I do worry about is making more promises. So, they're coming. Eventually. ;)
Sorry about bothering you, replacements seem to be working just fine! The plugin was running on a friend's server. Also, I second the motion of implementing wildcards. We need *perfect* spelling and grammar with this plugin, or as close to such as possible. I do understand the difficulty of implementing it though.
This is fantasic, works very smoothly, easy to configure. Thanks alot for creating this, very light, neat plugin. Much appreciated! Though, I would like a command to display changed words, but overall, very neat, thanks alot.
Thank you, that means a lot to me.
My only problem with showing changed words would be that some servers have very large lists of corrections. It can be done though, and I may just do so!
@schmidtbochum
Damn, I thought I had it that time! Expect another fix soon.
@ReddChicken It still doesn't work in 1.6.1:
http://dev.bukkit.org/server-mods/forcedgrammar/
gets converted to
Http://dev.bukkit.org/server-mods/forcedgrammar/
Minecraft doesn't detect it because of the capitalized "H".
__
http://dev.bukkit.org/server
with only one "/" after the http works properly...
__
http://colony.schmidt-bochum.eu/viewtopic.php?id=86
becomes:
Http://colony.schmidt-bochum.eu/viewtopic.php?id=86.
@retricide
Heya Retricide,
What you want could be accomplished by giving normal players the exempt permission while taking it away from staff.
This would be an easy task in any of the permission managers I've ever used. I'm not sure where you're seeing the complexity. If you need more help please don't hesitate to ask!
@notif
On your note about avoiding the filter, there's a built in way of telling it to get lost for a particular message: you prepend it with a backslash. However, I'm getting the feeling that this is not known about enough; I'm going to add it to the in-game documentation to bring more attention to it.
But we were talking about wildcards!
I expect your prediction about them being complex to implement would ring true, although not out of the question. I'm not going to put them in, at least for the time being, simply because I don't want to touch the major features for a while. I don't have much time on my hands, so I'm going to stick to bug fixes for a while. :)
[ Blast : er > ed > tard > ing > ers > er's > up > ups > s > etc ] Instead: blast*
Config: *craft, * craft, craft, craft*, craft * To filter everything related to craft.
Config: *craft, *~ craft, craft, craft*, craft *~ To filter everything related to craft, but to keep the suffix and prefix for the filtered words.
Example: *craft: raft "minecraft" = "Mineraft"
blast*: exploder
blast: explodes
blasted: exploded
"blastXIX for then it blast the blasted bomb with the blastXIXIX." =
"Exploder for then it explodes the exploded bomb with the exploder.
While it might not be used by that many, it would be useful for those who would use it. As it is, someone can bypass the filter by adding some character to the start or end of words (Which is good, because it prevents improper filtering). From what I can tell, would be very confusing and complicated to implement, and be a lot of work.
Would it be possible to add an "inverse" mode to this plugin?
For example, I don't want to infringe on how normal players speak but I wan't staff to speak properly - so, I basically want the plugin to only affect players that have a permission node, instead of how it only affects players that don't have the "exempt" permission node.
Does that make sense? If it's too much of a hassle, I can probably accomplish what I want to with a permission manager, though inheritance might complicate things.
@Sabinno
Fine on my end. Open a support ticket if you're still having bother and we'll sort it out. It's no problem, thank you for the great idea!
@notif
Thanks for letting me know about replacements working! A wildcard character is a possibility, I'd just want to know that it was useful. I don't to add something for the sake of adding it.
Wildcard characters perhaps? That guesses the whole word, until the character after the * shows up. That way it can conveniently change variations of words. I know this kind of parameter is possible with PHP, but I have very little knowledge of Java.
The replacements are working fine for us, in 1.4.5 R0.2.
Replacements don't seem to be functioning at all on the latest CraftBukkit beta build for Minecraft 1.4.5, even with no edits to the default dictionary. Other than that I've been testing this for the first time since its release; It's absolutely wonderful! Our server base certainly appreciates the far more readable chat. Again, thank you very much for making this dream into a reality! ^_^
@coolo1
Thank you!
I love this!
@schmidtbochum
This should already happen. Could you please send me any links that you've tried, and are being messed with?
Thanks, ReddChicken