Red-discordbot: [V3 Trivia] Trivia answers should ignore some special characters

Created on 1 Oct 2018  路  8Comments  路  Source: Cog-Creators/Red-DiscordBot

Feature request

Select the type of feature you are requesting:

  • [x] Cog
  • [ ] Command
  • [ ] API functionality

Describe your requested feature

Right now I can see this situation with the special characters in some of the trivia's answers:

From games.yaml
`Mega Man's traditional nemesis in the Mega Man series is whom?:

  • Dr. Wily
  • Dr wily

Who is Mega Man's creator?:

  • Dr. Light
  • Dr Light`

From leagueults.yaml
`Which champion's ultimate is named: Void Rush?:

  • Rek'sai
  • reksai
  • rek sai

From gamesofthrones.yaml
`What are the official words of House Martell?:

  • Unbowed, Unbent, Unbroken
  • Unbowed Unbent Unbroken`

I would suggest to ignore at least this special characters: . : , ' from the answers on the trivia list and from the user's answers to avoid having so many options, so you can be more flexible with your answers.

So following the first example you can have:

`Mega Man's traditional nemesis in the Mega Man series is whom?:

  • Dr. Wily`

Then dr. wily or dr wily are correct answers, just by having one answer in the trivia. There are a lot of cases like this in all the trivia lists. I've just named a few of them.

Accepted Enhancement

Most helpful comment

Might be worth adding a util to "normalize" trivia lists (create backup answers automatically and insert into lists, with options for which chars to do this for) It's cheaper to transform the expectation once and store, than on each response. each time.

All 8 comments

I would also consider interpreting & as "and"

I would add apostrophes to the list. Also what about number formating if an answer is a number? Currency? Date?
And as I am German I need to add Umlaute (盲=ae, 眉=ue, 枚=oe) and 脽 (equal to ss) to the list.

Fuzzy string matching for typos, too?

To be honest a lot of this is already possible (and done in existing trivia lists) by adding more alternate answers to the trivia lists. For example, if an answer contains &, Umlaute or other characters which have alternate ways of specifying, simply have multiple answers:

Question 1:
  - One & two
  - One and two
Question 2:
  - Stra脽e
  - Strasse

I would prefer this than trying to process these alternate spellings within the trivia cog, as I'm sure there are a plethora of these characters.

Yes, I know. Also in Spanish we have 谩 茅 铆 贸 煤 which is the same as normal vocals but makes the word to be pronounced different. Im only asking for those universal special characters : ' , . not a whole character mapping system. The point of this is making the whole trivia list system a little bit more easier, friendly user and flexible for the list creator and for the people who answer.

@Tobotimus if you have a trivia of 50 questions, fine. I can write them. But I have a trivia of +2200 questions and it's a pain in the ass.

Might be worth adding a util to "normalize" trivia lists (create backup answers automatically and insert into lists, with options for which chars to do this for) It's cheaper to transform the expectation once and store, than on each response. each time.

@mikeshardmind Yeah that sounds better. Trivia list creators should be careful though with the answers and write them as correct as possible.

As this hasn't been discussed more since 2018 and there's a way to handle this by including more valid answers with a normalized version of the characters included, I'm closing this. PRs which add more valid answers based on this to Trivia are welcome though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sinnoma picture Sinnoma  路  4Comments

Fozar picture Fozar  路  4Comments

TrustyJAID picture TrustyJAID  路  3Comments

StaffTroll picture StaffTroll  路  5Comments

Jqd0n picture Jqd0n  路  4Comments