Abbreviation List


#23

I suppose I’m over-engineering this when we can manually add plurals.


#24

There’s that, yeah. Or get lazy with the regex. What’s that about problems, again?

[How about this.](https://regexper.com/#\b((\s)cdirk(s|(es))%3F|cdirk(s|(es))%3F(%3F%3D\s))\b)

Side note: ’ counts as a word boundary, so no worries there.


#25

Hnnng. Regex visualisations. You know how to get a girl going.

Even if you don’t… need… the first \s with \b… sorry.

But that doesn’t cover all situational plurals.

asses
msellers’ ~ Nevermind
cdirks

God damn English language.


Edit: My kingdom for a positive lookbehind group in JS Regex


#26

Chill Man :ok_hand: :joy:


#27

It’s derived from the plugin itself.

Works for me? http://www.regexr.com/3e2ur

I got all the visuals. :slight_smile:


#28

Apostrophes: I’d say as it works now is fine, so “the cdirk’s the best dagger” flags just cdirk (correct).

If someone wants to say they looted two cdirk’s (wrong use) then it still flags albeit only on the first bit.


#29

Odd approach. The extra \s check at the start causes this to fail:
\b((\s)ass(s|(es))?|ass(s|(es))?(?=\s))\b
all the phat  asses


#30

Looks like the whitespace check is to avoid it parsing URL’s/concatenated strings. See here.


#31

Ah that makes sense. My bad.

Looks like the issue only occurs when encountering double spaces which Discourse won’t even allow.


#32

Yeah, I think that’s all I see, too. We good with that amended regex then?


#33

Looks solid to me but without positive lookbehinds we may have the issue of words becoming other words by adding “es” to the end.

Quick glance at the list and it looks safe to me though.


#34

Excellent. We’ve created yet another problem.

@mreyeball: would it be possible to edit the abbreviation plugin code? This adds support for detection of plural abbreviations and case-insensitive matches.

abbreviations_dialect.js line 16 from this:

text = text.replace(new RegExp("\\b((\\s)" + couple[0] + "|" + couple[0] + "(?=\\s))\\b","g"), '$2<abbr title="' + couple[1] + '">'+ couple[0] +'</abbr>');

To this:

text = text.replace(new RegExp("\\b((\\s)" + couple[0] + "(s|(es))?|" + couple[0] + "(s|(es))?(?=\\s))\\b","gi"), '$2<abbr title="' + couple[1] + '">'+ couple[0] +'</abbr>');

Edit:

I guess javascript regexp doesn’t support positive lookbehinds? That’s what i’m finding anyway. :unamused:


#35

Sometimes I feed the masochist in me and do some Regex Crosswords.


Sadly the case. Another instance of Wat.


#36

Should all of the abbreviations from things that aren’t items/dungeons be added?

Asking this because of https://www.realmeye.com/wiki/rotmg-slang-to-english, since it has all the terms like 2nd, aggro, anchor etc. with a small explanation next to each one.


#37

Eh. I think if they’re pretty much in line with their dictionary definition – ie if someone new would probably figure it out based on context – it’s probably overkill.

Edit: aren’t we branching out to dictionaries instead of abbreviations then? I say lets stick to the original purpose: abbreviations and acronyms to English. Not all slang are abbreviations.


#38

IMHO this list is more for the abbreviations, especially weird ones that could cause someone reading the post to stop and have to go look up what the letters mean, so I’d say no point to include ones like autoaim, ent sitting, roll/rolling, etc.

I’ve been just doing them as I see them in posts - if there is a post that doesn’t make immediate sense because of the abbreviation, then add it to the list.

Like “Damn I died with my cleg and cdirk.” makes sense for them to be on the list.


#39

Alright, thanks for the clarifications


#40

I just noticed that commas don’t count as word boundaries (example: ot, shats, djl, …). Would be nice if that could get changed. Thanks :slight_smile:


#41

Any punctuation screws it up.


#42

I suppose grammar is hard for regexp?