OtakuMegane / DerpyBot

An active learning chatbot using Markov chains.
MIT License
5 stars 3 forks source link

Bot dosent save text correctly #10

Closed DelphiDv closed 3 years ago

DelphiDv commented 4 years ago

I noticed it never saved people being pinged as <@id>, but just as if it copised and pasted their username, is this an intentional bit in the code to prevent the bot from pinging people or the byproduct of something else.

OtakuMegane commented 4 years ago

I actually forget why it doesn't, but I never tried changing it because it would annoy a bunch of people if it actually pinged them.

I can look at if it's possible to do and if so add an opt-in setting to allow pings.

DelphiDv commented 4 years ago

Okay thanks

DelphiDv commented 4 years ago

Also why does it not saves any capital letters.

OtakuMegane commented 4 years ago

It's fairly difficult to get capitalization right when generating replies and handling stuff in lowercase was more practical. It does preserve URLs since those aren't subject to grammar.

DelphiDv commented 4 years ago

I see, but in what part of code the code does it cancels capitalisation, i wanna see how it would look like with capitalisation enabled.

OtakuMegane commented 4 years ago

The new release now has settings to enable both these things.

Preserving capitalization turned out to be fairly simple but it may somewhat reduce the chances of getting a sentence for keywords. This is activated in the markov config by enabling preserve_case.

The other part with pinging was trickier but doable. Ids can now be stored by enabling raw_to_markov. The replies generated can also do pings if ids or other mentions are in the text; this one is activated by disabling clean_output.