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.
I would love if you make a mod out of this, please make a mod out of this, i beg you! :D You would be awesome if you do so.
Hi Bluephoenix,
Why would I need to make a mod?
@telephonekiosk
Hi telephonekiosk,
I'm extremely sorry for this very late reply, but
plugin development has been put on the back burner for me at the moment...He says just before releasing an update!. I cannot guess what's going on there, and to be honest I don't have the time to investigate. When I do, I shall have a look, but for now I'm sorry.There are various problems that can come about from adding corrections directly to the spellings file, I am now recommending that corrections all go through the command as it will take care of some of the potential issues.
@ReddChicken
You could include it in your mod packaged as a separate 'optional' file.
also, I'm having the problem with it not reading from the spelling file :/
@bradgillap
Hi bradgillap,
That's very kind of you, thanks for the list! If I'm brutally honest though, I don't fancy packaging ForcedGrammar with a massive list of corrections. Including extremely common mistakes such as "alot" would be good, but I don't want to do something on the scale that you are talking about. If the user wants that, it's up to them to do it I'm afraid. :)
When I finally get around to including a list of common mistakes, I will use your list as a guide. Don't worry, your work was not in vain!
Thanks, Redd
You need a list of common mistakes. I sat down to write one for you but it became very painful and it is incredibly hard to purposefully misspell words for a long period of time.
Here is my starter list. It may not be perfect.
http://pastebin.com/0eg9dHtU
What we need is a script that parse large tabular data from websites that have done this task already and move it into your " wrongword: right word " formula.
Unless there is a bigger list out there that I haven't seen yet?
@MiachBiatch
Thank you very much! It's very encouraging to hear that.
I love this plugin, you deserve a medal Sir!
@mobilephone2003
That's not me! Or at least I hope not, that would be extremely strange. I'll have a look at that later, but there's no reason that it should do that.
Could you please open a ticket, so we can debug all this without filing the comments section, please?
@ReddChicken
Just noticed if you have a correction to "yes", e.g.
yep > yes
it replaces it with "true" - just a heads up
@mobilephone2003
It's no problem, just let me know if and when you do!
@ReddChicken
So it does. Odd, it seemed to be doing that before.
I'm running 1.6.2 at the moment, and not a fan of restarts with a bunch of players on, so I'll return with results from 1.6.3.
Sorry!
@mobilephone2003
Right, there seems to be something odd going on here!
I cannot recreate your 'happy' -> 'happwhy' result. The advice I gave to rbos was actually pretty rubbish (sorry, again!), the plugin already takes into account words and shouldn't be doing what you say it is.
It would be really helpful if you were able to run a server with only ForcedGrammar on it, to confirm (or not) that the problem is coming from another plugin. Like I've said, I am unable to recreate any of your problem on my machine.
Ignoring triggers should be easy enough! They're simply words beginning with an exclamation mark? This actually makes me think that I should have a way of making custom exceptions, so that these kind of things don't have to be hard coded in... In the future maybe!
@ReddChicken
Sure, no problem.
I'm essentially looking to do the same as the other admin, replacing singled out words.
For example, the plugin can do the following:
dont > don't
but if i want to remove text speak, e.g:
y > why
Result:
happy > happwhy
I like the spacing method, showing that it is an individual word, just need the way to add it to the config so it is recognised by the plugin
Also, a bit unrelated but is it possible for the plugin to ignore !triggers, these are used in things like IRC and autoresponders which won't recognise the result of !trigger. (full stop at the end)
By the way, this has cleaned up my chat no end, thanks so much :)
@mobilephone2003
Hello again,
I've had a play around with ForcedGrammar and EssentialsChat and have seen no apparent issues. If you can think of anything else, please let me know!
As to the "y" problem, I believe that I actually gave rbos some flawed advice (sorry!) If you can give me the exact corrections that you want to make then I'll tell you how it is possible.
@ReddChicken
Hey,
Sorry, the older plugin is working as intended after a full restart
I'm having a shot at the "y" you've posted below with the spaces but i'm not having much success, can you give a pastebin of exactly how it should be added?
Thanks
@mobilephone2003
Hi mobile,
In-game commands and spellings are both working fine for me, with a fresh install of the plugin on both the latest RB and Dev servers. It could be EssentialsChat that's messing things about, I'll check it out soon!
Thank you for the report.
The plugin is not loading from spellings.yml
The plugin isn't registering the /fg command in-game, works in console
No errors in console on load
The basic capitalisation and full stops are working.
Your older version works with commands in-game but the corrections don't apply. I'm using EssentialsChat.
@BrennoBot
ForcedGrammar will fix everyone's grammar by default, including operators.
If this is not the case for you, then the operators have likely been given the permission node 'fg.exempt', which means that ForcedGrammar will leave them alone.
So, to make ops have their chat checked, you'll need to make sure they don't have that permission.
Can I make it where it fixes Operators Grammar?