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
I see.. and you're welcome :-)
Something else i've noticed: when making changes to the config, the changes don't apply when doing /fg reload. But this is intended, as you're only reloading spellings.yml
I just forgot to disable update notifications, as those can interfere with server starts (i.e. delaying startup time or worse...).
Luckely there aren't many settings for the config, so a config-reload isn't that necessary ;-)
Thanks! +1
@ThisUsernameIsMine
Update The fix for this is in v1.8.3 which is currently under review. Should be available in the next couple of days.
Hey ThisUsernameIsMine,
I've just investigated this. The problem is that the plugin is applying both corrections one after the other. Taking your example: the plugin changes the word 'yes' to the word 'no' then from 'no' back to 'yes'.
If the corrections' order in the spellings file were reversed then you'd see the opposite behaviour (which explains why only odd numbered lines are working).
This is a bug and it will be fixed in the next patch, which I should have ready for release within a week.
Thanks for letting me know, I wouldn't have noticed otherwise!
- Redd
Is it possible to add variations e.g.:
yes: no
no: yes
I've done this with many words but it only seems to work for the entries that are on line 1..3..5..7..and so on.
@whatever711
Hey whatever711,
Thanks! I'm happy to hear that your staff can be safe from your dislike of bad grammar.
- Redd
I needed this for my server! All my staff have terrible grammar and I want to murder them for it.
@felixlechat62
Bonjour felixletchat62,
Merci beaucoup! Non, je ne pense pas que c'est un problem. Seulement un peu est fait à le message - rien trop intensif. J'essaierai garder il ce façon.
J'ai considéré traduire le plugin, mais il sera difficile faire. Il serait aussi seulement les ordres que serait a traduiré. Le plugin peut corriger le français ou l'anglais tout de suite.
Merci encore, et je suis désolé pour mon mauvais français!
- Redd
Is a good idea but you not feared by lower reponse serveur for each word than the player write in a tchat ?
A version Fr maybe ?
@ThePassingStar
Hey ThePassingStart,
The source is on GitHub, and I welcome any contributions. :) I would mention however that I left this project in the middle of a rewrite and the code it pretty messy at the moment. The GitHub repo can be found here.
I'm happy that people care enough about this plugin to want it to continue and I'm sorry that I'm not in a position to make it do so. I will accept any positive contributions via GitHub pull requests.
Thanks, Redd
UPDATE
I'd like to update this comment to mention that I have finished the rewrite mentioned above and have finalised a new release of ForcedGrammar! All going well, v1.8.2 should turn up soon. However, I would still be delighted to recieve contributions of any kind.
@ReddChicken
Will you put the source on Github so other devs can pick up where you left off? Even asking for help on the forums would be more than appreciated.
@Denzed
Hey Denzed,
Yes you will be able to, but this will be a feature of whatever permission manager that you're using. I can't say how you would do it. :)
Thanks, Redd
@ReddChicken
Is there a way a permission to stop exempt like fg.exempt.false from op/owners because I gave my owners '*' which gives them access to all commands, but it does not edit owners text.
@mobilephone2003
Sorry about that. Will look at it!
Hey again, just noticed that with fullstop:false
It's still adding a full stop.
@Penguinking4
Hi Penguinking4,
Thank you! Correcting single letters can be done at the moment, but the plugin does have trouble when it comes to full stops. The plugin was designed to change words, not arbitrary strings of characters. Admittedly, this does limit its power and leads to issues like the one that you have pointed out. The plugin interprets "U.S." as two different sentences, not as one word.
As I have unfortunately told everyone else with suggestions recently, ForcedGrammar is not currently being worked on as I simply don't have the time to do so. Therefore this will not be solved any time soon and I do not think that there is a way to work around it. Sorry.
Thank you, Redd
Thank you for the very great plugin. However, do you think you could ever auto-correct single letters like "u", "r", or "y". I know you can sort of do this but when you type things like "U.S", it will look like this "You.S." Any possible way? Thank you.
@mobilephone2003
Hello again :)
Yes, I remember this being an issue with the YAML parser that Bukkit uses. It interprets your "yes" as a boolean value instead of a string.
You may be able to solve this my going into plugins/ForcedGrammar/spelling.yml and replacing your
with
Please let me know if this works, I haven't tried it myself!
@rangewonk
Hi rangewonk,
To be perfectly honest, I've never considered private messages, although I can see no reason why it wouldn't fit in with the plugin. Unfortunately, as can be seen by the date of the last released version, ForcedGrammar is not have much work done to it at the moment. I simply don't have time to give to it.
Thank you for the suggestion, but I cannot implement it any time soon.
very good plugin, works well but does not pick up anything sent in private messgaes. will this be added soon?
Forgot about this as it's set and forget, but revisited it to add variations of "yes"
Still getting "true" back
@mikkel8260
Hey mikkel8260,
It's likely that you have given those with your owner rank every permission available. This will include ForcedGrammar's
fg.exempt
permission which will cause them to not have their chat modified.
This can be fixed by making sure that your owners do not have the exempt permission. :)
Thanks, ReddChicken
So Im an owner on my server, and the grammar only works for people lower rank then owner, how do i make the grammar also work for me too?